Extending the data model in Pega Customer Decision Hub
Speed up your implementation process by extending the Customer Analytics Record (CAR) data model to suit your business needs.
The first part of any project is planning and analyzing your data. Pega Customer Decision Hub for Communications provides the data attributes for you in the form of a data model (CAR) that you can build upon to create a personalized, extended Customer Analytics Record (xCAR).
In general, an xCAR is a single object that holds extra data from multiple sources. For example, you can extend a customer record with their purchase history, subscriptions, activity on social media platforms, and so on.
Pega provides the CAR as a fully formed data model that is updated on an as-needed basis and published independently from Pega releases. You can download the Communications Customer Analytical Data Model component from Pega Marketplace and use the model in Next-Best-Action Designer in the following ways:
- As a reference to verify the data that is available to them. See Communications Customer Analytical Data Model.
- To create marketing strategies for particular business scenarios using Next-Best-Action Designer. See Creating a discount using CAR data in Pega Customer Decision Hub.
Create the following classes in your implementation layer that inherit from the standard classes that you want to extend:
YourOrganization-Data-Comms-Account class that inherits directly from PegaCDH-Data-Comms-Account.
YourOrganization-Data-Comms-Subscription class that inherits directly from PegaCDH-Data-Comms-Subscription.
YourOrganization-Data-Comms-Holding class that inherits directly from PegaCDH-Data-Comms-Holding.
For more information, see Creating classesCopy the table definitions of the classes that you created:
In the navigation pane of Dev Studio, click
.In the Class name column, search for PegaCDH-Data-Comms-Account, and then open the record by clicking it.
Click Test connectivity.
Use the Results browser tab for reference to create your own table definitions for Account, Subscription, and Holding, for example, UComm-Data-Comms-Account.
Edit the data table rule for each of your classes to map them to the database tables, for example, UComm-Data-Comms-Account maps to ucomm_account.
Extend the data model with a new property in the Account, Subscriber, or Holding class:
Create a new property.
For more information, see Properties.Add the new property, for example, SocialSecurityNumber, to your Account implementation class, for example, UComm-Data-Comms-Account.
Add the new column, for example, social_security_number, to your Account table definition, for example, ucomm_account.
Update the external mapping of your Account implementation to map the column to the property.
Modify the ETL procedure to populate the new property.
If you want to modify a property that already exists in the data model, for example by changing the type of the PaymentPlusStatus property from Text to Number:
Add the modified property to your Account implementation class with the name and the type, for example, by adding PaymentPlusStatusNum to the UComm-Data-Comms-Account.
Add the new column to your Account table definition, for example by creating the payment_plus_status_num column in ucomm_account.
Update the external mapping of your Account implementation to map the column to the property.
The payment_plus_status_num column name maps to the .PaymentPlusStatusNum property.Modify the ETL procedure to populate the property.
Previous topic Communications Customer Analytical Data Model Guide Next topic Creating a discount using CAR data in Pega Customer Decision Hub