Using guest delete
The Guest Delete endpoint in the Sitecore CDP Batch API enables you to delete a guest record and all entities associated with the guest including orders, sessions, and events. This is an irreversible operation. After you delete a guest record, you cannot retrieve the guest record or any related entities.
The following steps provide an overview of how a guest is deleted:
-
Upload a batch file containing guest records. If you are deleting the guest records in order to meet GDPR compliance, use
gdpr_delete
mode. If you are deleting the guest records for any other reason, usedelete
mode. -
If there is enough identifying information, proceed to the next step. If there is not enough identifying information, the Guest Delete endpoint returns a 400 Response
Not Enough Identifying Info
for the guest record. -
If the guest record is found, proceed to the next step. If the guest record is not found, the Guest Delete endpoint returns a 404 Response
Guest not found
. -
The Guest Delete endpoint attempts to find any and all Guests with matching identity:
-
The Guest Delete endpoint only finds one guest with matching identities, the Guest Delete endpoint returns a 200 Response
Guest and associated entities deleted
. The guest record is permanently deleted along with their orders, order items, sessions, and events. -
Alternatively, if the Guest Delete endpoint finds more than one guest with matching identities, the Guest Delete endpoint returns a 200 Response
n matches found for this guest, 1st match deleted
. In this 200 Response, n represents the number of guests with matching identities. Only the first guest with matching identities is deleted. You must perform this procedure again to delete any remaining guest records with matching identity.
-
Ensuring GDPR Compliance
If you are deleting a guest due to maintaining GDPR compliance, you must perform the above procedure for each matching identity. As the data controller, it is your responsibility to ensure that none of your systems send any of the deleted guest's PII to Sitecore CDP.