Article

Erasing customer data

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 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 erase customer data
  3. Running the activity to erase customer data
  4. Optional: Erasing additional customer data from Pega Marketing applications

Optional: Downloading the PegaCustomerDataPrivacy ruleset

The PegaCustomerDataPrivacy ruleset contains predefined activities that help you to 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. 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 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, 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 applications

If your environment includes Pega Marketing, 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, 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 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 7.4 – Delete from <<Segment table – MKTSEGxxxx>> where PYSUBJECTID = <<Customer ID>>
    • For Pega Marketing 7.31 or earlier – Delete from <<Segment table – MKTSEGxxxx>> where CUSTOMERID = <<Customer ID>>
    • For Pega Marketing 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.

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

Have a question? Get answers now.

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