Adding more tracking time periods for contact policies
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.
Result: The Contact Policies under the Constraints tab of Next-Best-Action Designer should include the custom N days time period
in the list.
- In Dev Studio, click .
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. - Open the Data-pxStrategyResult class.
- Create an Integer property CountOverNDays,
where N is the number of days.
Note: Only days are supported. - In the Advanced tab, check Do not save property data under Persistence.
- In the History tab, add pyDecisioningItem custom field set to StrategyProperty.
- Go to , and click Create, to create a new field value.
- In the Field Value Record Configuration tab, enter IHSummaryDuration in Field Name field.
- Label the value CountOverNDays.
- 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.
- 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. - Click Check out
- Click Add aggregate.
- Select the .CountOverNDays property.
- In the Function list, select Count of all records.
- 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. - Click Submit.
- Click Check in.
- 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. - Click Add icon or right-click on the canvas to add a new shape.
- Name the shape Count Over N days.
- In Define action, target, and source section, click Add item.
- In the Action list, select Set.
- Set Target to .Count.
- Set Source to
.CountOverNdays.
Count Over N Days shape properties - Click Submit.
- Connect the shape from Select Direction filter shape, to the
Select IH Summary Aggregate switch shape:
Check Outcome Limits IH Summary strategy - Double click on the Select IH Summary Aggregate switch shape, or right click and select Properties to edit shape properties.
- In Switch section, click Add item.
- In the Component list, select Count Over N Days.
- In the Condition field, enter @contains(ExternalInput.IHSummaryDuration,"CountOverNDays").
- Click Submit.
- Click Check in.
Previous topic Creating a contact policy Next topic Frequently asked questions about contact policies