kameleoon_visitor_code.
After synchronization, you expose Salesforce audiences and attributes as Kameleoon custom data to use them as targeting conditions in the Kameleoon Segment Builder.
This integration is available on demand. Contact your Customer Success Manager (CSM) for more information.
- Target visitors belonging to a specific Salesforce audience, such as High-value customers.
- Target customers based on a specific attribute, such as a
customer_tierof Gold. - Personalize an experience based on behavioral data, such as
loyalty_status,lifetime_value_band, orchurn_risk. - Combine Salesforce data natively with any other Kameleoon targeting condition.
How the Salesforce Data 360 synchronization works
The integration relies on the Kameleoon visitor code acting as the common identifier across both platforms. The synchronization follows this continuous workflow:- Send the identifier: Your website sends the Kameleoon visitor code to Salesforce Data 360 during the user’s visit.
- Export the data: Salesforce periodically publishes audience memberships and selected customer attributes to an S3 or SFTP destination.
- Ingest the data: Kameleoon processes these activation files and stores the Salesforce data against the corresponding
kameleoon_visitor_code. - Target the visitor: On the visitor’s next interaction, Kameleoon retrieves this information via custom data and evaluates it for active targeting segments.
Prerequisites for the Salesforce Data 360 integration
Before you configure the integration between Kameleoon and Salesforce Data 360, verify that you meet the following requirements:- You have a Salesforce Data 360 account with administrative permissions to configure Data Model Objects, mappings, segments, connections, and activation targets.
- You have an active Kameleoon project.
- Your Kameleoon representative has provided the specific S3 or SFTP connection credentials for your project.
Step 1: Send the Kameleoon visitor code to Salesforce
To associate Salesforce profiles with Kameleoon visitors, your environment must send the Kameleoon visitor code to Salesforce Interactions. Add the following JavaScript to your global script in Kameleoon. This logic ensures the script sends the visitor code to Salesforce exactly once per visit, firing only when the Salesforce object becomes available on the page:Step 2: Add and map the visitor code in Salesforce Data 360
With the visitor code flowing into your Salesforce environment, create a destination field on the Salesforce Individual Data Model Object (DMO) to store it.Create the field in Salesforce Data 360
- In Salesforce Data 360, navigate to Data Model.
- Open the Individual DMO and click Edit.
- Click Add Field and configure it using the exact values below:
- Click Save to update the DMO.
Map the field to the Data Lake Object
Creating the DMO field does not automatically populate it. You must map the field from the incoming Data Lake Object (DLO) to your new DMO field.- Navigate to the relevant Data Lake Object (for example, your website DLO).
- Map the source field containing the Kameleoon visitor identifier to
Individual.kameleoon_visitor_code.
Step 3: Configure the connection between Salesforce and Kameleoon
Kameleoon supports Salesforce Data 360 activations through either Amazon S3 or SFTP. Select and configure one of the following transport methods based on the credentials your Kameleoon representative provided.Option A: Configure Amazon S3 for Salesforce Data 360
- In Salesforce Data 360, navigate to Data Cloud Setup.
- Under External Integrations, select More Connectors > New.
- Under Target, select Amazon S3.
- Enter a connection name (for example, Kameleoon integration).
- Select Access Key/Secret Based authentication.
- Enter the AWS Access Key, AWS Secret Access Key, S3 bucket, and Parent Directory provided by Kameleoon.
- Click Test Connection, then click Save.
- Navigate to Activation Targets > New.
- Under File Storage, select Amazon S3 and select your newly created Kameleoon connection.
- Select CSV as the file format, enter a target name (for example, Kameleoon audience sync), and click Save.
Option B: Configure SFTP for Salesforce Data 360
- In Salesforce Data 360, navigate to Data Cloud Setup.
- Under External Integrations, select Other Connectors.
- Click New and select Target > Secure File Transfer (SFTP).
- Enter a connection name (for example, Kameleoon integration).
- Enter the Kameleoon SFTP host, port, username, and Parent Directory provided by Kameleoon.
- Enter your SSH private key and optional passphrase.
- Click Test Connection, then click Save.
- Navigate to Activation Targets > New.
- Under File Storage, select SFTP and select your newly created Kameleoon connection.
- Select CSV as the file format, enter a target name (for example, Kameleoon audience sync), and click Save.
Step 4: Activate Salesforce audiences and attributes to Kameleoon
With the connection established, select the specific Salesforce Data 360 segments and attributes to push to Kameleoon.- In Salesforce Data 360, navigate to Segments.
- Select the segment you want to synchronize with Kameleoon.
- In the Activations tab, click New and select your Kameleoon Audience Sync target.
- Select Individual as the Activation Membership object.
- Click Add Attributes, expand the Individual entity, and add
kameleoon_visitor_code. - Add any additional Salesforce attributes you want to use for targeting in Kameleoon (for example,
customer_tierorchurn_risk).
When configuring the activation refresh type in Salesforce, select Incremental, which ensures audience memberships and attributes synchronize efficiently by updating only the changed records, rather than transferring the entire audience on every run.
Step 5: Retrieve Salesforce data in your global script
To make the synced Salesforce data available for targeting, retrieve it from the Kameleoon remote data store and register it as custom data using the JavaScript Activation API. Add this code to the same global script that sends the visitor code to Salesforce, not to a custom data’s own retrieval code. The retrieval call is asynchronous and requires a callback, so calling it once here lets you register every attribute and audience from a single server response instead of triggering a separate remote lookup for each one:retrieveDataFromRemoteSource() and setCustomData().
Retrieve Salesforce data for Feature Experimentation
If you target visitors with Kameleoon Feature Experimentation instead of web experimentation, no global script runs in the browser. Retrieve the data with a Kameleoon SDK instead, usinggetRemoteData() to fetch the payload and addData() to register each value before you evaluate a feature flag:
getRemoteData(), addData(), and isFeatureFlagActive(). For the complete Feature Experimentation workflow, view Use external data to target users.
Step 6: Create custom data in Kameleoon
Kameleoon automatically processes the incoming Salesforce CSV activation files. To use this data for targeting, create custom data objects in the Kameleoon platform that match the values your script sets. Navigate to Settings > Custom data > New custom data and configure the objects based on your required data types. For more information on Kameleoon custom data, view Create custom data.Example 1: Map Salesforce audiences (list data)
To target visitors based on their presence in multiple Salesforce audiences, configure the custom data with the following settings:- Name: Salesforce Audiences
- Retrieval method: Kameleoon Activation API
- Type: List
- Format: String
- Scope: Visit
Example 2: Map Salesforce profile attributes (string data)
To target visitors based on a specific, singular profile attribute, such as a customer tier, create a separate custom data entry with the following settings:- Name: Salesforce Customer Tier
- Retrieval method: Kameleoon Activation API
- Type: Single
- Format: String
- Scope: Visitor
If you target visitors with Kameleoon Feature Experimentation, select Kameleoon SDK method as the retrieval method for both custom data entries instead of Kameleoon Activation API.
Step 7: Target Salesforce audiences in Kameleoon
After you map the custom data, the Salesforce information becomes natively available within the Kameleoon Segment Builder. To use the data in a segment:- Navigate to the Segment Builder (Settings > Segments > New segment).
- Drag your newly created custom data condition into the segment rule.
-
Configure the logic operator. For example, to target high-value customers, configure:
Salesforce Audiencesis amongHigh-value customers
Considerations for the Salesforce Data 360 integration
Factor in the following system behaviors when maintaining the integration between Salesforce Data 360 and Kameleoon:- Identifier consistency: The
kameleoon_visitor_codestring that Salesforce exports must exactly match the visitor’s cookie string in Kameleoon. If the identifier is altered or hashed during the Salesforce import process, the sync fails. - Data freshness: The integration relies on asynchronous file drops. Changes to a user’s profile become available in Kameleoon only after the Salesforce segment refreshes, Salesforce delivers the CSV activation file, and Kameleoon ingests the resulting payload.
- Data privacy: Activate only the specific attributes required for experimentation or personalization. Avoid activating personally identifiable information (PII) when a broader categorical attribute (such as a generic
LTV_band) achieves the same targeting goal.