Article

Retrieving customer data

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 Exchange. 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 for objectives such as regulatory compliance. You can download the ruleset from Pega Exchange 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 Exchange. 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.

Tags:

  • Pega Marketing
  • Data Integration
  • Solutions Engineer
  • System Administrator
  • System Architect
  • Solutions Consulting Manager
  • Solutions Consultant
  • Senior Business Architect
  • Senior System Architect
  • UAP Student
  • UI/UX Specialist
  • Scrum Master
  • Sales Manager
  • Decisioning Consultant
  • Engagement Leader
  • Customer Service Representative
  • Customer Service Architect
  • Business Architect
  • Business User
  • Lead Business Architect
  • Lead System Architect
  • Robotics System Architect
  • Sales Consultant
  • Project Manager
  • Product Owner
  • Marketing Consultant
  • Practice Leader
  • Account Executive

Published May 23, 2018 — Updated June 4, 2018


100% found this useful

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.