Delete profiles

Learn how to delete data from the Profile Store using the Real-Time Customer Profile API. By using the Profile API, you can remove data from the profile store without affecting the data lake or identity graph. This can be helpful when troubleshooting identity graph issues and correcting occasional errors in data ingestion that only affect a few profiles.

Transcript
In this video, we’ll show you how to delete data from the Profile store using the Real-Time Customer Profile API. As a data engineer, sometimes you may need to remove data related to individual customer profiles. This can be helpful when troubleshooting identity graph issues and correcting occasional errors in data ingestion that only affect a few profiles. All data ingested into Platform is stored in the Data lake as datasets, and these datasets can be enabled for use in the Identity graph and customer profile construction. Customer profiles themselves are contained in the Profile store, and it’s this latter store that we’re interested in today. By using the Profile API, you can remove data from the Profile store without affecting the Data lake or Identity graph. If you need to remove data from Experience Platform completely, you need to delete the entire dataset. Watch our video guide on deleting data sets for more details. If you’re just looking to update or correct existing profile data rather than delete it, check out our guide on using the UPSERT method for profiles. Before we start, let’s take a quick look at an example profile that we want to remove data from. From the dashboard, we can see it has some basic attributes, and clicking into the Identity graph, it has a number of connected nodes like their email address, loyalty ID and so on. Now let’s see how we can use the API to delete data from this profile. Here I’m in Postman and I’m using a collection for the Real-Time Customer Profile API. You can find and download this yourself from our developer documentation, but it’s not required if you prefer to set up your call manually. You can see here I’ve already added my authentication credentials for the request headers that are required for all Platform APIs like my Access token, API key, and so on. If you’re unfamiliar with these headers or how to obtain your own credentials, check out our authentication tutorial for Platform APIs. Under the Profile API collection, I’ll navigate to the Entities folder and find the Delete method. Here in the path, you can see we’re using the “entities” endpoint under “ups/access”. While entities aren’t strictly profiles themselves, you can think of them as the collections of data that populate those profiles based on their identity values. So in this context, the Delete method will look up a specific profile based on an identity value that we provide, and then delete its associated data from the Profile store. So to use this method we need to add some query parameters to the request. First we’ll need to enter the schema name parameter. In most if not all cases, you’ll want to set this to _xdm.context.profile. This is the name of the Experience data model or XDM individual profile class, that forms the basis of individual people-based profiles in Platform. If we’re dealing with B2B entities like accounts, however, we would put a different class name here. Next, we need to provide some info that’ll tell the system what profile or entity we want to delete. There are a couple ways of doing this, but the simplest approach is to provide one of the identities found in the customer’s identity graph, specifically in the form of a namespace and a value. In our case, we know our profile is used customer email addresses as a primary identity, and we know the email of the profile we want to delete. So for the namespace I’ll put an email. And for the value I’ll enter the customer’s corresponding address. Finally, we can add an optional parameter that lets us specify a merge policy. Assuming we don’t want to use our default merge policy that it will otherwise fall back on. If we provide a merge policy that does not use identity switching, then the delete operation will only remove data directly tied to the specific identity value we provided. In our case, the specific email ID. However, if we provide a merge policy that does use identity stitching, then in addition to the identity we provide, the delete operation will also remove data tied to all other identities contained in the profile’s identity graph as it appears under that merge policy. Once we’re sure that we have all the required parameters, let’s make the call.
And it looks like we’ve gotten a 200 response so we know our call was successful. Keep in mind, though, that it may take up to 24 hours for the changes to reflect in Platform and that we’ve only deleted data from the Profile store when we tried looking up our profile later, we can see that it’s no longer available, since we’ve effectively deleted all attributes and events that were tied to it. But if we go to Identities in the left nav and look at the same email ID from there, we can see that the profile’s identity graph is preserved. This means that any net new data we ingest that contains these identities will be mapped and linked to this profile just like before, without needing to reestablish how these identities are linked to each other. So that was a quick rundown of how to delete data from the Profile store using API calls. You should now know what’s required to make these calls and how they affect your profile data in isolation from the Data lake and Identity graph. Thanks for watching.
recommendation-more-help
9051d869-e959-46c8-8c52-f0759cee3763