Extending Interaction History
Learn about the underlying configuration of Interaction History and how to extend it to match your business objectives. You can extend Interaction History to record more aspects of customer interactions as property values and use those values to determine the next best action for your customers or as key performance indicators (KPIs) of your decisioning strategy. As an example, Interaction History can be extended with two properties: ProductID and HandleTime.
Interaction History is the Pega Decision Management data layer that stores all interactions with customers (responses to specific propositions). Information that is collected during each interaction is written into the appropriate Interaction History database table. Each database table contains several default properties that are defined on the corresponding class. Case-sensitive name matching is used between properties in the database table, Strategy Result (SR) properties, and Interaction History properties. Typically, the same Interaction History is used by multiple applications that use a shared implementation.
The pyInteractionHistoryConfiguration data transform that is defined in the Data-Decision-IH-Configuration class configures Interaction History by setting the properties in this class. In your application ruleset, you can override the pyInteractionHistoryConfiguration data transform to customize Interaction History. The following table provides an overview of the properties that you can set by using the pyInteractionHistoryConfiguration data transform.
|pyFactProperties||Value List (Text)||
Lists FACT properties.
|pyActionProperties||Value List (Text)||
Lists action dimension properties.
|pyApplicationProperties||Value List (Text)||
Lists application dimension properties.
|pyChannelProperties||Value List (Text)||
Lists channel dimension properties.
|pyContextProperties||Value List (Text)||
Lists context dimension properties.
|pyCustomerProperties||Value List (Text)||
Lists customer dimension properties.
|pyLocationProperties||Value List (Text)||
Lists location dimension properties.
|pyOperatorProperties||Value List (Text)||
Lists operator dimension properties.
|pyOutcomeProperties||Value List (Text)||
Lists outcome dimension properties.
|pyMeasurements||Value List (Text)||
Lists the subset of pyFactProperties that can be used as KPIs.
For more information, see About Data Transforms.
The process of extending the Interaction History layer in your application consists of the following steps:
Select the most appropriate database table. It is recommended that you add a column to the FACT table if you expect that the column will contain multiple values that are unique or if the column will represent a property to be used as a KPI. In any other case, consider adding columns to dimension tables. For example, you can extend Interaction History with the ProductID and HandleTime properties.
- Perform the following steps to add ProductID, which is the ID of the offered product, to a dimension database table:
- Add the column to the action dimension table, because the list of product IDs consists of a limited number of values, and ProductID is part of a proposition.
- Specify the data type of the database column as one that can hold characters and numbers, for example, VARCHAR2(255), because ProductID has a text value.
- Perform the following steps to add HandleTime, which is the duration of the conversation, to the FACT table:
- Add the column to the FACT table, because a large number of distinct values is expected and the property is used as a KPI.
- Specify the data type of the database column as one that can hold integers, for example, NUMBER(18,0), because HandleTime has an integer value.
For more information, see About Database Table data instances.
Add the properties that are extensions of Interaction History to the FACT, dimension, and SR class.
- Perform the following actions to extend Interaction History with the ProductID property for all applications in the action dimension table:
- Add a new property ProductID of type Text to the Data-Decision-IH-Dimension-Action data model in the application rulesets of the call center and outbound marketing applications.
- Add the ProductID property of type Text to the Strategy Result (SR) class of both applications.
- Override the pyInteractionHistoryConfiguration data transform in the Data-Decision-IH-Configuration data model for both application rulesets:
- Add a Set action and set Primary.pyActionProperties(<APPEND>) to "ProductID".
- Enable the Call superclass data transform setting to ensure that the default configuration is included.
- Perform the following actions to extend Interaction History with the HandleTime property for the call center application:
- Add a new property HandleTime of type Integer to the Data-Decision-IH-Fact data model in the application ruleset of the call center application.
- Add the HandleProperty to the SR class of the call center application.
- Override the pyInteractionHistoryConfiguration data transform in Data-Decision-IH-Configuration for the call center ruleset:
- Add a Set action and set Primary.pyFactProperties(<APPEND>) to "HandleTime".
- Add a Set action and set Primary.pyMeasurements(<APPEND>) to "HandleTime". This step is necessary so that you can use the property as a KPI.
- Enable the Call superclass data transform setting.