Skip to main content


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

Adding more tracking time periods for contact policies

Updated on September 15, 2022

Contact policies track responses to actions over a specific period of time. By default, responses are tracked over a period of 7 or 30 days. If required, you can add more tracking periods by creating a new Interaction History time period, and then updating the part of the Next-Best-Action Strategy that references it.

Pega Customer Decision Hub
Contact policies determine when and for how long an action or a group of actions should no longer be shown to the customer. For example, if a customer views an ad for an action five times without responding, the add will no longer be shown to that customer over the next seven days. Suppressing or pausing an action prevents over-saturation by limiting the number of times that a customer is exposed to the same action.
  1. In Dev Studio, click ConfigureDecisioningDecisionsData SourcesInteraction History Summaries.
    Note: Previously, when adding a new tracking period, you would use Action Outcomes for the past 7 Days or Action Outcomes for the past 30 Days rules. In 8.7 release, this method is deprecated. Use Action Outcomes by Channel dataset. While upgrading to 8.7 version, it is recommended that you remove these two data sets. For more information, see Removing deprecated Action Outcomes data sets.
  2. Open the Data-pxStrategyResult class.
  3. Create an Integer property CountOverNDays, where N is the number of days.
    Note: Only days are supported.
    1. In the Advanced tab, check Do not save property data under Persistence.
    2. In the History tab, add pyDecisioningItem custom field set to StrategyProperty.
    3. Go to Records Data Model Field Value, and click Create, to create a new field value.
    4. In the Field Value Record Configuration tab, enter IHSummaryDuration in Field Name field.
    5. Label the value CountOverNDays.
    6. Apply the field value to PegaMKT-Data-NBA-SR class.
      The localized value must be the number of days, for example 60 for CountOver60Days.
      Note: The following properties are included by default: CountOver1Day, CountOver7Days, CountOver14Days, and CountOver30Days. You can modify them by using the Save as option, or use them as reference when creating new properties.
  4. Update the ActionOutcomesByChannel dataset to include the new .CountOverNDays property:
    Note: Make sure that the dataset belongs to Data-pxStrategyResult class and is copied into the implementation ruleset.
    1. Click Check out
    2. Click Add aggregate.
    3. Select the .CountOverNDays property.
    4. In the Function list, select Count of all records.
    5. In the Time window list, select Last, then enter the number of days (N), and select Days.
      Note: In Next-Best-Action Designer, only days are supported.
    6. Click Submit.
    7. Click Check in.
  5. Search for and open the Strategy CheckOutcomeLimitsIHSummary strategy.
    Note: Make sure that the strategy belongs to implementation customer class and is copied into the implementation ruleset.
    1. Click Add icon or right-click on the canvas to add a new EnrichmentSet Property shape.
    2. Name the shape Count Over N days.
    3. In Define action, target, and source section, click Add item.
    4. In the Action list, select Set.
    5. Set Target to .Count.
    6. Set Source to .CountOverNdays.
      Count Over N Days shape properties
      Defining action, target, and source in Count Over N Days Set Property shape
    7. Click Submit.
    8. Connect the shape from Select Direction filter shape, to the Select IH Summary Aggregate switch shape:
      Check Outcome Limits IH Summary strategy
      Adding new Count Over N Days Set Property shape to an existing strategy to add new tracking time period
    9. Double click on the Select IH Summary Aggregate switch shape, or right click and select Properties to edit shape properties.
    10. In Switch section, click Add item.
    11. In the Component list, select Count Over N Days.
    12. In the Condition field, enter @contains(ExternalInput.IHSummaryDuration,"CountOverNDays").
    13. Click Submit.
  6. Click Check in.
Result: The Contact Policies under the Constraints tab of Next-Best-Action Designer should include the custom N days time period in the list.

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