Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
CDPCloud Portal
Sitecore CDP Developer Documentation
  • Developing with Sitecore CDP
    • Authentication
    • Base URL
    • Batch file formatting requirements
        • Guest data model
        • Send additional guest data
        • Guest extension data model
        • Guest extension data model for flight
        • Guest identifiers data model
        • Using guest profile migration
        • Guest migration data model
        • Using guest delete
        • Guest delete data model
  1. Batch API Guest
  1. Batch API
  2. Batch API Guest
  3. Using guest delete

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:

  1. 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, use delete mode.

  2. 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.

  3. 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.

  4. 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 sessions and events. Orders and order items are deleted only if you use the gdpr_delete mode, not if you use the delete mode. For more information, see how to delete order data in delete mode.

    • 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.

Caution

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.

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 terms help you understand how Sitecore CDP deletes guests:

  • Contact - the contact on the order is the owner of the order. For example, the person who purchased a flight on behalf of the consumer.

  • Consumer - the consumer of an order is someone who is listed as traveling or consuming a product or service. They might or might not be the contact on the order.

The following steps provide an overview of how a guest is deleted:

  1. 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, use delete mode.

  2. 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.

  3. 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.

  4. 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 sessions and events. Orders and order items are deleted only if you use the gdpr_delete mode, not if you use the delete mode. For more information, see how to delete order data in delete mode.

    • 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.

  5. If the guest is a consumer on an order but not also the contact, the following occurs:

    • Sitecore CDP creates a new guest record to replace the original guest record. The new guest record has a guestType of traveller.

    • If you performed the guest delete operation using the gdpr_delete mode, the guest profile in the UI has a first name of GDPR_Delete and a last name of GDPR_Delete, and does not contain any Personally Identifiable Information (PII).

    • If you performed the Guest Delete operation using the delete mode, the new Guest Profile has a first name of Deleted and a last name of Deleted, and does not contain any PII.

    • The purpose of creating the new Guest Profile is to maintain the referential integrity of Sitecore CDP. This means that if gdpr_delete mode was used, a user looking at orders in the contact's guest profile can see that there is a consumer on an order with a first name of  gdpr_delete and a last name of gdpr_delete but with no PII. Likewise, if delete mode was used, a user looking at orders in the contact's guest profile can see that there is a consumer on an order with a first name of deleted and a last name of deleted but with no PII.

    • Similar to any other guest profile, you can search for the deleted guest profile, but it does not contain any PII.

Caution

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.

If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use