Adding stream data aggregates in the Customer Profile Designer
You can associate customer records with aggregate stream data by using the Customer Profile Designer.
Starting in Pega Customer Decision Hub version 8.6, you can manage associated data in Customer Profile Designer. Customer Profile Designer allows users to define their customer profile data with aggregate properties and summaries, and enables Pega Customer Decision Hub to handle real-time aggregation based on specified aggregation logic and source data. These aggregates can then be associated with the extended customer analytical record (xCAR) data through the new Customer Profile Designer landing page, and used as predictors in adaptive models or as conditional properties in engagement policies.
Customer Profile Designer is available in Pega Customer Decision Hub 8.7 as a fully working early preview version. The functionality will be further expanded in future releases.
Creating the data class for Customer Profile Designer summaries
To add a new association for an entity (for example, PurchaseData) to a customer context, first create the class and service integration for the data source that you want to aggregate.
- In Dev Studio, create a class for the source data that you
want to use for the associated entity. For more information, see Organizing rules into classes.For the purposes of being the data class for your source data, your class should inherit from Data- and be defined as a concrete class. Your class key should the identifier value of the source data and your class should be saved to your Pega Customer Decision Hub implementation ruleset.
- Define the properties of your source data in this class.
- Create a Data Set rule for the associated entity.
- In Dev Studio, click .
- Click Create.
- Provide a Label, and then select the Stream data type.
- Enter the Applies to class of the source data class that you created in step 1.
- Select to save your data set into your Pega Customer Decision Hub implementation ruleset.
- Set the Partition key to be the same as your class key.
- Save and check in your changes.
- Optional: Create a data flow that starts from your source data set and ends in an abstract shape, and then define and add a data transform to help transform your data as needed.
- Create the service integration by doing the following steps:
- In Dev Studio, create an integration service class. For
more information, see Organizing rules into classes.For the purposes of being an integration service class, your class should be defined as an abstract class and saved into your Pega Customer Decision Hub implementation ruleset, or your integration ruleset, if it is separate from the implementation ruleset.
- Create a Page property in your source data class.
- Create a service activity that saves into your source stream data set.
- Create a service package rule.
- Create a REST service.Define the Resource class of your integration class in the REST service, and set your service activity as the POST implementation activity. Configure your POST method to map to JSON based on the Page property in your integration class.
- In Dev Studio, create an integration service class. For
more information, see Organizing rules into classes.
Defining the data source on the Profile Data Sources landing page
The Profile Data Sources landing page is used for managing the rules associated with your Customer Profile Designer aggregation. After creating the data class, use the Profile Data Sources page to define the aggregated data source.
- In the Pega Customer Decision Hub interaction portal, click .
- Select the data set that you want to associate with a customer context by clicking .
- In the Add data set window, select the data set that you created, and click Add.
- Create a summary to aggregate the events in the data set by performing the following
steps:
- Click .
- In the Create summary window, select the data set to
aggregate, and then click Create.
Associating a data summary with a customer context
You can associate the summary that you created with a customer context by using the Customer Profile Designer landing page. This allows the back-end data flows to use your summary aggregates as part of the customer record for use in decision management.
- Open the Customer Profile Designer by clicking .
- Click Edit.
- Next to the context with which you want to associate the summary, click and then select the summary from the list.
- Click Save.
Testing the data aggregates
To test your summary and aggregates, use the integration service that you defined to send JSON-based POST method calls.
- Open the data set rule.
- Click .
- Select Browse, and then click Run.
- Confirm that your data is loaded into your summary by opening the real-time data flow
that is responsible for managing the data load:
- In Dev Studio, click .
- Find the data flow for Customer Profile Designer that lists the number of successfully processed records.
- Verify that the number matches the number of records that you sent in through the REST service.
- Confirm the aggregation by opening the summary data set and browsing the data:
- Open your summary data set.
- Click .
- Select Browse, and then click Run.
- Open your summary data set.
Previous topic Adding associated static data in the Customer Profile Designer Next topic Data Management with Customer Profile Designer