Skip to main content


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

Erasing customer data

Updated on May 3, 2022

If one of your customers requests that you erase their data, you can run an activity that removes all data about the customer from Pega applications. Data about Staged Decisions, Interaction History and Customer Movie is removed 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 erase customer data
  3. Running the activity to erase customer data
  4. Optional: Erasing additional customer data from Pega Marketing and Pega Customer Decision Hub applications

Optional: Downloading the PegaCustomerDataPrivacy ruleset

The PegaCustomerDataPrivacy ruleset contains predefined activities that help you to 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. If you are using an older version of Pega Platform, see Optional: Creating an activity to erase 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, then verify that you can open the activity DeleteCustomerData.

Optional: Creating an activity to erase customer data

For Pega Platform 7.2.1 and 7.2.2, to delete 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 and then remove data from the following data sets:

pxDecisionResults (Staged Decisions)

For information about requesting data from pxDecisionResults, see Creating an activity to retrieve customer data - pxDecisionResults.

To delete data from pxDecisionResults, configure the activity's Steps page:

  • Method – DataSet-Execute
  • Method Parameters
    • Data Set – pxDecisionResults
    • Operation – Delete by keys
  • Key – pxSubjectID
  • Value – Param.customerId

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

Screenshot - Delete Decision Results

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

pxInteractionHistory (Interaction History)

For information about requesting data from pxInteractionHistory, see Creating an activity to retrieve customer data - pxInteractionHistory.

To delete Interaction History entries from pxInteractionHistory, use the RDB-Delete method with the following Method Parameters:

  • ClassName – Data-Decision-IH-Fact
  • RequestType – DeleteByCustomerID
  • Access – All

Screenshot - Delete Interaction History

pxEventStore (Customer Movie)

For information about requesting data from pxEventStore, see Creating an activity to retrieve customer data - pxEventStore.

To delete the Event Summary for a customer, create a data flow.

Screenshot - Delete Even Summary

Use Event summary as the Abstract shape, and Event store as the Destination shape.

Under Event store > Properties > Save options, set Specify time to live (in seconds) to 1. This means that the events are deleted after one second.

Screenshot - DeleteRecordsFromEventStore data flow

Running the activity to erase customer data

  1. Log in to Designer Studio.
  2. Search for and open the activity that erases 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 DeleteCustomerData.
    The DeleteCustomerData activity removes all of the data that you collected about the customer. If you want to retain some data, for example, the customer's email address, create a custom activity.
  3. Click Actions > Run.
  4. Enter the ID of the customer whose data you want to erase.

The activity erases the data and returns a .json file with the number of entries that were erased from each data set.

Optional: Erasing additional customer data from Pega Marketing and Pega Customer Decision Hub applications

If your environment includes Pega Marketing or Pega Customer Decision Hub, you need to erase additional customer data references from your application. Run queries on your database to remove the customer data.

  1. For all versions of Pega Marketing and Pega Customer Decision Hub, remove the following data:
    • Contact summary – Delete from MKT_CONTACT_SUMMARY where CUSTOMERID = <<Customer ID>>
    • Subscription management – Delete from MKT_SUBSCRIPTION where CUSTOMERID = <<Customer ID>>
  2. For Pega Marketing or Pega Customer Decision Hub 7.31 or later, remove the following data:
    • Email bounce management – Delete from MKT_BOUNCE_DETAILS where CUSTOMERID = <<Customer ID>>
  3. For environments that include Pega Field Marketing, remove the following data:
    • Staging records for Pega Field Marketing campaigns – Delete from MKT_CAMPAIGN_CONTACTS where CUSTOMERID = <<Customer ID>>
  4. Identify all segment tables in your application. Segment tables follow the pattern MKTSEG.
  5. For every segment table, delete references to the customer whose data you want to remove.
    • For Pega Marketing or Pega Customer Decision Hub 7.4 – Delete from <<Segment table – MKTSEGxxxx>> where PYSUBJECTID = <<Customer ID>>
    • For Pega Marketing or Pega Customer Decision Hub 7.31 or earlier – Delete from <<Segment table – MKTSEGxxxx>> where CUSTOMERID = <<Customer ID>>
    • For Pega Marketing or Pega Customer Decision Hub 7.13, 7.21, or 7.22 – also Delete from MKT_DATA_SEGMENT where CUSTOMERID = <<Customer ID>>
Your customers might not exist in all segment tables. If the segment contains no references to the customer, the Delete operation does not remove any rows.
  • Previous topic Managing customer data to implement your GDPR and other regulations compliance strategy
  • Next topic Erasing customer data in Pega Platform

Tags

Pega Marketing 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