In Pega Platform 7.4 and earlier, you can run an activity to erase customer data. For Pega Platform 7.3 and 7.4, you can download a ruleset that contains the activity from Pega Exchange. For earlier Pega Platform versions, you need to manually create the activity.
- Optional: Downloading the PegaCustomerDataPrivacy ruleset
- Optional: Creating an activity to erase customer data
- Running the activity to erase customer data
- 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. For Pega Platform 7.3 and 7.4, you can download the ruleset from Pega Exchange and import it into your application.
The ruleset is available on Pega Exchange for Pega Platform 7.3 and 7.4. If you are using an older version of Pega Platform, see Optional: Creating an activity to erase customer data
. Pega Infinity contains the ruleset by default, so you do not need to download it.
- Download the component Pega GDPR Compliance for Decisioning and Marketing from Pega Exchange. This component contains the PegaCustomerDataPrivacy ruleset.
- Log in to your application as an administrator.
- Click Designer Studio > Application > Distribution > Import.
- Follow the import wizard and import the PegaCustomerDataPrivacy ruleset.
- After the import finishes, click . In the search field of the App Explorer, enter Data-.
- 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:
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
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.
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.
Running the activity to erase customer data
- Log in to Designer Studio.
- Search for and open the activity that erases customer data. This can be the activity within the PegaCustomerDataPrivacy ruleset or a custom activity that you created. If you are using 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.
- Click Actions > Run.
- 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.
- 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>>
- For Pega Marketing 7.31 or later, remove the following data:
- Email bounce management –
Delete from MKT_BOUNCE_DETAILS where CUSTOMERID = <<Customer ID>>
- 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>>
- Identify all segment tables in your application. Segment tables follow the pattern MKTSEG.
- 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.