---
title: "Right to erasure"
slug: "right-to-erasure"
abstract: "Guide to deleting Sitecore personal contact, user, customer, session and forms data for users wishing to be forgotten."
---
# Right to erasure

| Applies to | GDPR, CCPA |
| --- | --- |

> [!warning]
> This Privacy Guide provides technical guidance on how your developers can choose to configure your Sitecore product implementation to support you on your data privacy compliance journey. This guide does not provide exhaustive guidance, and should not be construed or used as legal advice about the content, interpretation, or application of any law or regulation. You, the customer, will always be in the best position to assess your own risks, and must seek your own legal counsel to understand the applicability of any law or regulation to your business, including how you process personal information. Your resulting implementation is based entirely on your own configuration choices.

The right to erasure (also known as the right to be forgotten) concerns the individual’s right to request the deletion of personal information. This topic describes how Sitecore facilitates the ability to remove an individual’s personal information.

<details>
<summary><h2>Erasing personal contact data</h2></summary>

Within your Sitecore implementation, you can:

- Use the [xConnect Client API](https://doc.sitecore.com/xp/en/developers/91/sitecore-experience-platform/xconnect-client-api--c--.html) to erase data marked `[PIISensitive]` by calling the `ExecuteRightToBeForgotten()` method. The `ClearSupressionListWhenExecutingRightToBeForgotten` handler automatically clears the contact’s past and current email addresses from the suppression list.
- Execute the right to erasure from the Experience Profile interface.

The organization is responsible for the following:

- Implementing a process or interface that allows individuals to request deletion of personal information.
- Ensuring that personal information in custom contact facets is marked `[PIISensitive]`. Any facet or facet property marked `[PIISensitive]` is deleted when the right to erasure is executed.

> [!important]
> Interaction facets cannot be marked `[PIISensitive]` and are not deleted when the right to erasure is executed.

</details>

<details>
<summary><h2>Erasing personal user data</h2></summary>

Within your Sitecore implementation, you can:

- Use the [Security API](http:///legacy-docs/SC75/security-api-cookbook-sc60-and-later-a4.pdf) to clear profile properties that contain personal information.
- [Edit a user in the User Manager interface](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/edit-and-manage-a-user-account.html "Edit and manage a user account").

The organization is responsible for the following:

- Implementing a process or interface that allows individuals to request that their data is deleted.
- Ensuring all user profile properties that contain personal information are identified and cleared.

</details>

<details>
<summary><h2>Erasing personal customer data</h2></summary>

Within your Sitecore implementation, you can:

- Use the [Commerce Service API](https://doc.sitecore.com/xp/en/developers/91/sitecore-experience-commerce/en/commerce-service-api.html) to delete a customer. You must set the `ForgetCustomer` property to `true` in the `CustomersRemovePolicy`. This ensures that the customer entity is deleted rather than marked as inactive.
- [Manage a customer’s data in the Customers dashboard](https://doc.sitecore.com/xp/en/users/91/sitecore-experience-commerce/en/work-with-customer-accounts.html)

The organization is responsible for the following:

- Configuring the `CustomersRemovePolicy` correctly.
- Implementing a process or interface that allows individuals to request that their data is deleted.
- Ensuring all customer profile properties that contain personal information are identified and cleared.

> [!note]
> Deleting a customer does not delete the shipping address and email address associated with the order. This data also exists for anonymous orders.

</details>

<details>
<summary><h2>Erasing active session data</h2></summary>

If a contact requests that their data be erased, consider clearing session data and removing cookies to ensure that all connections between the device and the contact are severed:

- Call `Session.Clear()`
- Call `Session.Abandon()`
- Remove the `SITECORE_GLOBAL_ANALYTICS_COOKIE` (although tracking will not resume after the right to erasure has been executed, xConnect Client API can be used to link a cookie to a device profile, and then to an anonymized contact record)

</details>

<details>
<summary><h2>Erasing forms submission data</h2></summary>

By default, form submission data is stored in the [Forms database](https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/forms-database.html "Forms database"). Form submissions stored here are not associated with a contact ID. This means that the data is not automatically deleted if a contact requests to be forgotten. Therefore, if you store email addresses or other personal information that can be used to identify an individual, you must consider how to handle requests for this data to be removed. If a form submission is linked to an identifier such as a contact identifier or an email address, you can use SQL to clear or delete rows associated with a specific individual.

You can do this in a fashion similar to what is detailed in the topic [Walkthrough: Creating a custom submit action that updates contact details](https://doc.sitecore.com/xp/en/developers/91/sitecore-experience-manager/walkthrough--creating-a-custom-submit-action-that-updates-contact-details.html) except the submit action deletes contact info stored in the Forms database instead of updating contact details stored in xConnect.

> [!important]
> If you create a custom submit action that stores personal data in a third-party system such as a CRM, you are responsible for ensuring that individuals can access their data in that system.

</details>