Salesforce CDP API Developer Guide
Winter '25 (API version 62.0)
Summer '24 (API version 61.0)
Spring '24 (API version 60.0)
Winter '24 (API version 59.0)
Summer '23 (API version 58.0)
Spring '23 (API version 57.0)
Winter '23 (API version 56.0)
Summer '22 (API version 55.0)
Spring '22 (API version 54.0)
Winter '22 (API version 53.0)
Summer '21 (API version 52.0)
Spring '21 (API version 51.0)
Initialization
Data Collection
Identity
Consent
Integrations
Debugging
Connect MuleSoft with Customer Data Platform
API Reference
This section provides guidance around references provided with the Salesforce
Interactions Web SDK.
-
Initialization
The recommended initialization flow for the Salesforce Interactions SDK follows a general pattern. -
Data Collection
Before the Salesforce Interactions SDK can begin capturing data, initialize the Salesforce Interactions SDK and consent to track must be granted. -
Identity
The Salesforce Interactions SDK supports identification of new and returning customer using the first-party cookie _sfid_${domainHash}. Also, the domainHash is produced by running the website’s domain through a hashing function. -
Consent
The Salesforce Interactions SDK has been designed to respect user privacy and doesn’t store or transmit data collected until it has been granted consent. If your site has existing consent management features, those features must integrate with the SDK to signal when the user has given consent to track. -
Sitemap
Salesforce Interactions SDK Sitemap provides the ability to extract data during page navigation, The Sitemap can also share data capture logic across multiple pages, and separate data capture logic from web page presentation logic. -
Integrations
Salesforce Interaction SDK features built-in CustomEvents you can use for binding listeners to events that are specific to the Web SDK. Data passed by these events are in the detail properties of the event object passed to a listener's callback function. -
Debugging
When configured, the Salesforce Interaction SDK can output messages to the browser console for debugging purposes. By default, the logger is configured with a log level of none. The logger used by the Web SDK wraps the standard browser console.log function and can be accessed at SalesforceInteractions.log.