Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Using the trigger strategy to test an engagement policy

Updated on September 15, 2022

If you see that strategy results are getting dropped from one of more of the engagement policies in the trigger strategy, this is often expected behavior since the policy conditions may be legitimately excluding actions that do not meet the criteria. However, if the results are not as expected, the next step is to test the engagement policy strategy to find the issues and groups where the results are unexpectedly dropping out.

Pega Customer Decision Hub
You can use the combination of the Persona data transform and the trigger strategy to unit test an engagement policy.
  1. Right-click on the Engagement Policy strategy that you wish to investigate, and then click Open strategy.
  2. Open the Test Run panel by clicking the slider button on the upper right side of the strategy canvas.
  3. In the Settings section, select Data transform, and then select a persona transform already created for the trigger strategy test.
  4. In the For external inputs use strategy field, enter the trigger strategy name, for example, Trigger_NBA_TopLevel.
  5. Select Specify a single component within the strategy, and then enter the name of the component that is immediately prior to the engagement policy you wish to test.
    In the figure below, the Subscriber Actions filter component is chosen to test the NBA_TopLevel_Subscriber policy.
    Testing the NBA_TopLevel_Subscriber engagement policy
  6. Click on each sub-strategy to see where actions are unexpectedly dropping out or where the strategy results are unexpected.
  7. Drill down by right-clicking and selecting Open strategy and repeat the process until you find the component that is causing the problem.
    Note: Each time you drill down you may use the same data transform and trigger strategy component for the test, but bear in mind that each time you drill down you will be losing the filter from the previous level, and so some unwanted actions from other issues or groups may also be processed.
  8. To narrow down the actions being processed, you may directly select the action import strategy for a specific Issue and Group as the external inputs strategy.
    The action import strategy will be named NBA_Import_<Issue>_<Group> where <Issue> and <Group> represent the issue and group that you require.
    Note: Once you do this, you will lose the context filter, and so will be processing actions for all contexts, so bear this in mind when viewing the test results.
  9. If the component causing the issue is a Proposition Filter, you can check out the strategy and select the Explain results option to examine the results for each action.
    1. Double-click on the Proposition Filter to open it.
    2. Select Explain results in the lower left of the Properties panel.
    3. Store the results in the .Eligible property, and store explanation in the .pyNote property, as shown in the figure below.
      Enabling the Explain results option
  10. Click Save and run.
    Result: The Test Run panel shows the results for Eligible and Note, as shown in the following figure:
    Viewing the results
    Note: The value of the Eligible property is set to true if the action met all of the filter conditions, otherwise it is set to false. The Note property contains results of all conditions evaluated.
  11. After you finish testing, discard your changes to the strategy.
  • Previous topic Testing trigger strategies
  • Next topic Using the trigger strategy to test the NBAStrategyFramework component

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us