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.6 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. Confirm that the values have been received by opening your source data set and running a Browse operation on it.
- 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.
Manually importing customer data
In addition to the automated data ingestion process, you can use the import mechanism on the Records tab of Customer Profile Designer to import multiple instances using a .csv file.
At a high level, the import process has the following three steps:
- In the Pega Customer Decision Hub interaction portal, click .
- Click on the context where you want to import customer records, for example, Subscriber.
- Upload a .csv file and select one of the following import purposes:
- Add or update - Use this option to create new records for those instances in the import file that do not currently exist in the system, and to update records for those instances that do exist.
- Add only - Use this option to only create new records for those instances in the import file that do not currently exist in the system. Records for existing instances will not be updated.
- Delete - Use this option to delete matching records from the system.
- Click Map fields to select the field to use for matching records, and specify the mappings for all fields to import.
- Click Import records to start the import process.
- To download a .csv file containing the records which failed to import, click
See more.The last column in this file contains a description of the error that occurred.
- Optional: Click the Export link above the list of imported records to export them to a .csv file.
- Optional: To manually add, update or remove records, perform one of the following actions:
- Add an instance - To add an instance, click the Add record link at the bottom of the grid. Fill in all necessary fields and click anywhere outside the input row. To cancel your changes and discard the new record, click the delete icon at the end of the row.
Modify an instance - To modify an instance, click anywhere in the desired row. The row will toggle to editable mode. After making the desired changes, click anywhere outside the row to save the modified instance.
- Delete an instance - To delete an instance, click the delete icon at the end of the row.
Previous topic Adding associated static data in the Customer Profile Designer Next topic Manually configuring the customer class