Configuring audiences for multiline decisioning strategies

You can configure the pyDictionary Decision Data rule to define the audiences that you want to use as contexts in complex strategies with multiple targets. By creating a set of preconfigured audiences, you simplify the design and configuration process of complex multiline strategies.

Pega Platform provides the default pyDictionary rule that is part of the @baseclass class. You must save that rule as part of your application context to use it. Alternatively, you can create an instance of a Decision Data rule of the Data-Decision-Dictionary class under the Applies To class of your strategy.
  1. Access the default pyDictionary Decision Data rule by performing the following actions:
    1. In the Designer Studio search field, enter pyDictionary and click the Search icon.
    2. Open the pyDictionary rule by clicking it.
  2. Save the pyDictionary rule as part of your strategy's Applies-to class by performing the following actions:
    1. Click Save as in the top-right corner of the rule form.
    2. Specify the rule context.
      Important: Do not change the default rule name. Save this rule in the Applies To class of the strategy in which you want to use the audiences that are defined as part of the pyDictionary rule.
    3. Click Create and open.
  3. Add an audience to use as a context for your strategy by performing the following actions:
    1. On the Data tab, click Add decision data.
    2. Optional: To set this audience as the context on the Strategy rule form, select the Is Possible Recipient check box.
    3. Specify the name for your audience, for example, Subscriber.
    4. In the Iterate over field, enter the name of a single page, page group, or page list property for the strategy to iterate over while processing the records that apply to this audience, for example, Primary.
    5. Optional: To set the label for this audience on the Strategy rule form, complete the Refer to plural of as field.
      If not set, the value of the Access the data for each entity within as is used to refer to this audience on the Strategy rule form.
    6. In the Access the data for each entity within as field, specify the alias name for your audience.
      This field is used to reference this audience for each iteration within the Embedded strategies shape at run time.
      If your audience's name is FamilyMembers, you can configure the strategy to access the data for each entity within that audience as FamilyMember.
    7. Optional: To designate a property on the StrategyResult class that will hold the value of the property for subject ID that is configured for this audience, provide that property's name in the Property for subject ID field.
      For example, you can perform this step when the property that holds the subject ID is embedded but the structure of StrategyResult class is flat, that is, it has only one layer of properties.
    8. Optional: To designate a property on the StrategyResult class that will hold the value of the property for the subject type that is configured for this audience, provide that property's name in the Property to hold ClassName field.
      For example, you can perform this step when the property that holds the subject type is embedded but the structure of StrategyResult class is flat, that is, it has only one layer of properties.
  4. Click Save.
    You can now select this audience as the context on a Strategy rule form.