---
schema_version: "1"
id: b27c0d59f8c0920d0b6d32c915f374d2afd7ddaebf773dcbe9f412ead561c0f5
title: Consent Data
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/interactions-sdk/guides/c360a-api-consent-data.md
canonical_url: https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-consent-data.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9c9b18601d2db54bc91a3a07288c324cd37badd1abed11fd3c46085d257e347a
products:
  - Salesforce Interactions SDK
  - Data 360 Developer Documentation
---
# Consent Data

Consent data is used to explicitly capture and report a customer's decision to grant or revoke tracking permission within the Salesforce Interactions SDK. This is essential for adhering to privacy regulations (like GDPR, CCPA, and so on).

When a customer opts in to tracking, the consent details are attached to the first tracked event, and typically included in subsequent events, ensuring a verifiable consent record is maintained.

## Consent Object Structure

The [`consent` object](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-consent.md) is included within the event payload to record the user's tracking preference.

| Field      | Type   | Description                                                                                                 |
| ---------- | ------ | ----------------------------------------------------------------------------------------------------------- |
| `provider` | string | **Required**. A named identifier indicating the consent management system providing the consent to the SDK. |
| `purpose`  | string | **Required**. Specifies the type of activity the customer consented to. For example, `Tracking`.            |
| `status`   | string | **Required**. The customer's decision regarding the purpose. Values: `Opt In` or `Opt Out`.                 |

This JSON structure shows how consent data is formatted before being attached to an event.

```json
{
  "provider": "Example Provider",
  "purpose": "Tracking",
  "status": "Opt In"
}
```

## SDK Constants for Consent

Use these built-in constants to populate the purpose and status fields.

| Name                                             | Value    | Description                                                      |
| ------------------------------------------------ | -------- | ---------------------------------------------------------------- |
| `SalesforceInteractions.ConsentPurpose.Tracking` | Tracking | Used to denote consent for general behavioral tracking.          |
| `SalesforceInteractions.ConsentStatus.OptIn`     | Opt In   | Indicates the customer has explicitly granted consent.           |
| `SalesforceInteractions.ConsentStatus.OptOut`    | Opt Out  | Indicates the customer has explicitly denied or revoked consent. |

**See Also**

- [Translation of SDK Events to Web Connector Schemas](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-translating-sdk-events-to-web-connector-schemas.md)
- [Custom Events](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-custom-events.md)
