Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore CDP
Data privacy
Before you start sending data
Integrating with Sitecore CDP
Stream API
Batch API
REST APIs
Data lake export service
  • Sitecore CDP for developers
  • Batch API
  • Batch API Guest
  • Guest delete data model

Guest delete data model

The method of identifying guests varies per organization. Some organizations only use identifiers to determine identity, such as provider and id. Other organizations only use guest attributes to identify a guest such as firstName, lastName, and email. Of these organizations, the number of guest attributes required to perform identity is optional, but there must be enough guest attributes provided for potential matching guest records to be identified. For example, firstName and lastName do not provide enough identifying information to match a guest record for deletion.

There are two available modes for deleting a guest:

  • delete mode - deletes the guest profile and the associated sessions and events, but not the associated orders and order items. To delete the orders and order items, you must first delete the orders using the Batch API order delete endpoint, before using delete mode.

  • gdpr_delete mode - deletes the guest profile and all associated entities including sessions, events, orders, and order items.

Guests have a right to be forgotten and you must use the gdpr_delete mode if you are deleting the guest in order to meet GDPR compliance.

When you create a batch file, ensure that you include all required attributes in addition to any attributes from the following table:

Attribute

Description

Type

Example(s)

Required/optional

ref

A unique ID of the record that the organization generates for the purpose of identification outside of Sitecore CDP.

string UUID

"17AC5C03-F7A1-461F-A3B1-C96F43143522"

Required

schema

The type of record contained in the value field that is being deleted.

string

"guest"

Required

mode

Indicates how or what mechanism must be used to delete the record.

string

"delete", "gdpr_delete"

Required

value

The container for the identifiers or the identity values required for guest delete.

container

N/A

Required

identifiers

The container for any identity attributes used to match guests for potential deletion.

container

N/A

Required if your organization uses identifiers to perform identity.

email

The email address of the guest.

string (recommend lowercase)

"[email protected]"

Required if your organization uses the email attribute to perform identity.

firstName

The first name of the Guest.

string (title case)

"John"

Required if your organization uses the firstName attribute to perform identity.

lastName

The last name of the guest.

string (recommended title case)

"Doe"

Required if your organization uses the lastName attribute to identify a guest.

provider

The provider of the identifier.

string

"IDENTITY_SYSTEM"

Required if your organization uses identifiers to perform identity.

id

The unique ID of the identifier.

string

"BX_201504"

Required if your organization uses identifiers to identity a guest.

Here's a JSON example that uses identifiers to identify a guest:

RequestResponse
{
  "ref": "17AC5C03-F7A1-461F-A3B1-C96F43143522",
  "schema": "guest",
  "mode": "delete",
  "value": {
    "identifiers": [
      {
        "provider": "IDENTITY_SYSTEM",
        "id": "BX_201504"
      }
    ]
  }
}

Here's a JSON example that uses Personally Identifiable Identifiers (PII) to identify a guest:

RequestResponse
{  
   "ref":"17AC5C03-F7A1-461F-A3B1-C96F43143522",
   "schema":"guest",
   "mode":"delete",
   "value":{  
      "email":"[email protected]",
      "firstName":"John",
      "lastName":"Doe"
   }
}

Example responses

The following is a response where a single matching guest was found:

{"ref":"<UUID>","code":"200","message":"Guest and associated entities deleted"}

The following is a response where multiple matching guests were found:

{"ref":"<UUID>","code":"200","message":"3 matches found for this guest, 1st match deleted"}

The following is a response where no matching guests were found:

{"ref":"<UUID>","code":"404","message":"Guest not found"}

The following is a response where there was not enough identity information provided to find a matching guest:

{"ref":"<UUID>","code":"400","message":"Not enough identifying information"}

The following is a response where the guest could not be deleted because they were currently online:

{"ref":"<UUID>","code":"403","message":"Unable to delete Guest: Guest has an open session"}

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore