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.
The consent
object 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.
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