Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Retrieving customer data

Updated on May 3, 2022

If one of your customers requests that you provide them with all data you collected about them, you can run an activity that retrieves all data about the customer from Pega applications. Data about Staged Decisions, Interaction History and Customer Movie is retrieved from the pxDecisionResults, pxStrategyResults, and pxEventStoreResults data sets. For Pega Platform 7.3 and later, you can download a ruleset that contains the activity from Pega Marketplace. For earlier Pega Platform versions, you need to manually create the activity.

  1. Optional: Downloading the PegaCustomerDataPrivacy ruleset.
  2. Optional: Creating an activity to retrieve customer data.
  3. Running the activity to retrieve customer data.

Optional: Downloading the PegaCustomerDataPrivacy ruleset

The PegaCustomerDataPrivacy ruleset contains predefined activities that help you manage customer data to implement your own compliance strategy. You can download the ruleset from Pega Marketplace and import it into your application.

The ruleset is available for Pega Platform 7.3 and later versions. If you are using an earlier version of Pega Platform, see Creating an activity to retrieve customer data.
  1. Download the component Pega GDPR Compliance for Decisioning and Marketing from Pega Marketplace. This component contains the PegaCustomerDataPrivacy ruleset.
  2. Log in to your application as an administrator.
  3. Click Designer Studio > Application > Distribution > Import.
  4. Follow the import wizard and import the PegaCustomerDataPrivacy ruleset.
  5. After the import finishes, click App. In the search field of the App Explorer, enter Data-.
  6. Click Technical > Activity and verify that you can open the activity RequestCustomerData.

Optional: Creating an activity to retrieve customer data

For Pega Platform 7.2.1 and 7.2.2, to retrieve customer data, you must manually create an activity in your application ruleset. For more information about creating custom activities, see About Activities.

The activity that you create must be able to request data from the following data sets:

pxDecisionResults (Staged Decisions)

To request data from pxDecisionResults, configure the activity's Steps page.

  • Line 1
    • Method – Page-New
    • Step page – CustomerData
  • Line 2
    • Method – DataSet-Execute
  • Method Parameters
    • Data Set – pxDecisionResults
    • Operation – Browse by keys
  • Key – pxSubjectID
  • Value – Param.customerId
  • Store results in – CustomerData.pxResults
  • Line 3
    • Method – Property-Set
    • Step page – CustomerInfo

For an example of this configuration, refer to the following image:

Screenshot - Request Decision Results

This allows the activity to search for decision results to retrieve by using a key, which in this example, is the ID of the customer.

pxInteractionHistory (Interaction History)

To request data about Interaction History entries from pxInteractionHistory, configure the activity's Steps page.

  • Line 1
    • Method – Page-New
    • Step page – CustomerData
  • Line 2
    • Method – DataSet-Execute
  • Method Parameters
    • Data Set – pxInteractionHistory
    • Operation – Browse by keys
  • Key – pySubjectID
  • Value – Param.customerId
  • Store results in – CustomerData.pxResults
  • Line 3
    • Method – Property-Set
    • Step page – CustomerInfo

For an example of this configuration, refer to the following image:

Screenshot - Request Interaction History

This allows the activity to search for Interaction History entries to retrieve by using a key, which in this example, is the ID of the customer.

pxEventStore (Customer Movie)

To request data about the Event Summary for a customer, use the Property-Set method with the following Method Parameter:

  • .EventStoreResults – D_pxEvents[customerId:Param.customerId,startTime:"19700101T000000.000 GMT",endTime:@(Pega-RULES:DateTime).CurrentDateTime()].pxResults

Screenshot - Request Event Summary

This allows the activity to search for all events for this customer, regardless of the time frame.

Running the activity to retrieve customer data

  1. Log in to Designer Studio.
  2. Search for and open the activity that retrieves customer data. This can be the activity that you imported with the PegaCustomerDataPrivacy ruleset or a custom activity that you created. If you imported the PegaCustomerDataPrivacy ruleset, in the Data- class, the name of the activity is RequestCustomerData.
  3. Click Actions > Run.
  4. Enter the ID of the customer whose data you want to retrieve.

The activity returns a .json file with the requested customer data.

  • Previous topic Erasing customer data in Pega Platform 7.4 and earlier
  • Next topic Retrieving customer data in Pega Platform

Tags

Solutions Engineer System/Cloud Ops Administrator System Architect Solutions Consulting Manager Solutions Consultant Business Architect Senior System Architect Experience Designer Sales Manager Next-Best-Action Analyst Pega Delivery Leader Lead System Architect Robotics System Architect Sales Consultant Account Executive Data Integration

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us