Skip to content

Salesforce

Salesforce is a leading CRM platform that helps organizations streamline sales, marketing, and customer relationship management.

The CustomerLabs + Salesforce integration lets you bring in Accounts, Contacts, and Opportunities from Salesforce to build unified customer profiles and activate them across your marketing stack.

  1. Salesforce sends event-based data to CustomerLabs via record-triggered flows
  2. CustomerLabs receives and processes the data
  3. Identity resolution maps records to user and account profiles
  4. Enriched data can be synced to your ads and marketing platforms
  • Admin access to a Salesforce account
  • Admin access to an active CustomerLabs account

Step 1: Add Salesforce as a Source in CustomerLabs

Section titled “Step 1: Add Salesforce as a Source in CustomerLabs”
  1. Log in to your CustomerLabs account.

  2. Navigate to Sources from the left-hand menu and click Connect Source.

  3. Select Salesforce from the source list.

    CustomerLabs Sources page
  4. Copy the Webhook URL and App ID generated — you will need both in the following steps.

    Salesforce package installation complete

Step 2: Install the CustomerLabs Package in Salesforce

Section titled “Step 2: Install the CustomerLabs Package in Salesforce”
  1. Use the installation link provided in CustomerLabs to open the package installer.

    CustomerLabs - select Salesforce as source
  2. Log in to Salesforce as an Admin.

  3. Select Install for Admins Only and click Install.

  4. Once installation is complete, click Done.

Step 3: Configure CustomerLabs Settings in Salesforce

Section titled “Step 3: Configure CustomerLabs Settings in Salesforce”
  1. In Salesforce, click the gear icon and go to Setup.

    CustomerLabs Salesforce webhook URL and App ID
  2. In the Quick Find box, search for Custom Settings.

  3. Click CustomerLabs Settings from the list.

    CustomerLabs package installation in Salesforce
  4. Click Manage, then click Edit.

    Install for Admins Only option
  5. Paste your CustomerLabs App ID into the field.

  6. Click Save.

    Salesforce Setup - search Custom Settings

  1. In the Quick Find box, search for Remote Site Settings.

  2. Click New Remote Site.

    CustomerLabs Settings in Salesforce Custom Settings
  3. Enter the following values and click Save:

    FieldValue
    Remote Site NameCustomerLabs
    Remote Site URLhttps://hook.customerlabs.co
    ActiveEnabled
    Enter CustomerLabs App ID in Salesforce

Flows allow you to send event-based data from Salesforce to CustomerLabs automatically when records are created or updated. Create a separate flow for each object or trigger condition you want to track.


Flow 1: Send Data When a New Account Is Created

Section titled “Flow 1: Send Data When a New Account Is Created”
  1. In Salesforce Setup, search for Flows under Process Automation.

    CustomerLabs App ID saved in Salesforce
  2. Click New Flow.

  3. Select Record-Triggered Flow and click Create.

    Salesforce Remote Site Settings - New Remote Site

Set the following values and click Done:

SettingValue
ObjectAccount
TriggerA record is created
Entry ConditionsNone (or as needed)
Optimize ForActions and Related Records
Run AsynchronouslyEnabled
Remote Site Settings form filled in Salesforce
  1. Click + under Run Asynchronously.

    Remote Site Settings saved successfully
  2. Select Action.

    Salesforce Flows - New Record-Triggered Flow
  3. Set Category to Event and choose Send data to CustomerLabs as the action.

    Select Record-Triggered Flow option
  1. Enter a Label (e.g., Account Created).

    Flow trigger configuration for new account
  2. Under Set Input Values, add:

    FieldValue
    recordIdStringRecord → Account → ID
    Run Asynchronously enabled for account flow
  3. Click Done.

  1. Click Save, enter a Flow Name and Description, then click Save again.

    Add action - Send data to CustomerLabs
  2. Click Debug and configure:

    • Path: Run Asynchronously
    • Record: a sample Account
      Select Send data to CustomerLabs action
  3. Click Run.

    Configure action input values for account ID
    Action configured with recordIdString value

Click Activate to start sending new account data to CustomerLabs.

Save flow with name and description

Flow 2: Send Data When an Account Is Updated

Section titled “Flow 2: Send Data When an Account Is Updated”
  1. Go to Setup → FlowsNew Flow → Record-Triggered Flow → Create.

    Debug flow with sample account record
    Activate the new account created flow

Set the following values and click Done:

SettingValue
ObjectAccount
TriggerA record is updated
Condition RequirementOnly when a record is updated to meet the condition requirements
Optimize ForActions and Related Records
Run AsynchronouslyEnabled
Flow trigger configuration for account update
  1. Click + under Run AsynchronouslyAction.

    Entry conditions configured for account update flow
    Add and configure action for account update flow
  2. Set Category to Event and choose Send data to CustomerLabs.

    Debug account update flow with field change
  3. Enter a Label (e.g., Account Updated).

    Account update flow test run results
  4. Under Set Input Values, set recordIdString to Record → Account → ID.

    Activate the account update flow
  5. Click Done.

    Create flow for account with related objects
  1. Click Save, add a Flow Name and Description.
  2. Click Debug, select Path: Run Asynchronously and choose an Account record.
    Select Account object and created trigger
    Flow configuration for related objects
  3. Update a field (e.g., Rating → Hot) and click Run.
    Create new variable resource in Salesforce flow

Click Activate to start sending updated account data to CustomerLabs.

Variable configured with collection enabled

Section titled “Flow 3: Send Data When an Account Is Created with Related Objects”

This flow sends Account data together with related object data (e.g., Opportunities) to CustomerLabs in a single event.

  1. Go to Setup → FlowsNew Flow → Record-Triggered Flow → Create.

    Assignment action with AccountId and Opportunities
    Assignment logic configured for related objects
  2. Set Object to Account and Trigger to A record is created.

    Action configured with Include Related Objects enabled

Set the following and click Done:

SettingValue
Entry ConditionsOptional
Optimize ForActions and Related Records
Run AsynchronouslyEnabled
  1. In the left panel, click New Resource.

    Flow configuration for related objects
  2. Configure the variable:

    FieldValue
    Resource TypeVariable
    Data TypeText
    Allow Multiple Values (Collection)Enabled
    Available for InputEnabled
    Flow configuration for related objects
    Flow configuration for related objects
    Flow configuration for related objects
  3. Click Done to save the variable.

    Flow configuration for related objects
  1. Click + under Run AsynchronouslyAssignment.
    Flow configuration for related objects
    Flow configuration for related objects
    Flow configuration for related objects
  2. Set the variable created above and assign the following values:
    • AccountId
    • Opportunities (the child relationship name)

These represent the parent-child relationships to include.

  1. Click + after the Assignment → Action.
    Flow configuration for related objects
    Flow configuration for related objects
  2. Set Category to Event and choose Send data to CustomerLabs.
    Flow configuration for related objects
  3. Enter a Label.
    Flow configuration for related objects
  4. Under Set Input Values, set recordIdString to Record → Account → ID.
    Flow configuration for related objects
  5. Enable Include Related Objects and select the variable created earlier.
    Flow configuration for related objects
    Flow configuration for related objects
  6. Click Done.
  1. Click Save, add a Flow Name and Description.
    Flow configuration for related objects
  2. Click Debug, select Path: Run Asynchronously and choose a sample Account.
    Flow configuration for related objects
  3. Click Run.
    Flow configuration for related objects

Click Activate to start sending Account data along with related objects.

Flow configuration for related objects
CustomerLabs workflow - name your workflow

A Workflow in CustomerLabs transforms raw event data received from Salesforce into structured profiles. Set up one workflow per flow type — for new accounts, updates, and related objects.

With workflows you can:

  • Capture events like Account, Contact, or Opportunity creation and updates
  • Filter relevant data before processing
  • Map incoming fields to structured user and account profiles

This workflow captures newly created Account data from Salesforce.

Assign a descriptive name (for internal reference only), for example: salesforce_account_created.

CustomerLabs workflow - choose sample data
  1. Create a test Account in Salesforce to trigger the flow.
  2. Click Choose Sample Data, then click Fetch New Data.
CustomerLabs workflow - fetch new data
  1. Click View Details to inspect the incoming JSON structure.
View raw JSON data from Salesforce
  1. Click Select this sample to proceed.
Select sample data for workflow

Filter incoming data to process only the events you need.

Example condition: Object Type = Account

Filter condition - Object Type equals Account
Filter applied to workflow
  1. Choose Create or Update Group as the event type, or define a custom event name.
  2. Optionally use Dynamic Event Name to name events based on incoming data.
Event configuration - Create or Update Group

Map identifiers to unify account data across sources. For example:

  • Account ID
  • Website

Map incoming Salesforce fields to Account Traits or Event Properties in CustomerLabs.

Attribute mapping for new account workflow

This workflow captures updates made to existing accounts in Salesforce.

Assign a name (e.g., salesforce_account_updated) and set a Workflow Delay if you have multiple workflows on the same source.

Dynamic event name configuration
  1. Update an Account field in Salesforce (e.g., change Rating to Hot) to trigger the flow.

  2. Click Choose Sample Data, then Fetch New Data.

    Account identity mapping for new account workflow
  3. Click View Details to inspect the incoming data, then click Select this sample.

    CustomerLabs workflow - name account updated workflow
Choose sample data for account update workflow

Example condition: Object Type = Account

Use Create or Update Group or define a custom event name.

Fetch new data - account update event

Map Account ID and Website as identifiers.

Event configuration for account update workflow

Map updated fields to Account Traits. For example, map Rating to an account trait.


Section titled “Workflow 3: Account with Related Objects (Account + Opportunity)”

This workflow captures Account data along with related Opportunity data sent from Flow 3.

Assign a name (e.g., salesforce_account_with_opportunities) and set a Workflow Delay if needed.

Event type set for account update
  1. Create a test Account with an associated Opportunity in Salesforce to trigger Flow 3.

  2. Click Choose Sample Data, then Fetch New Data.

    Event type set for account update
  3. Click View Details to inspect the nested JSON structure (Account + Opportunities).

    Fetch new data - account with opportunities event
  4. Click Select this sample to proceed.

    View nested JSON with Account and Opportunity data

Example conditions:

  • Object Type = Account

  • Opportunities data exists in the payload

    Select sample for related objects workflow
    Event type set for account update

Use Create or Update Group or define a custom event name.

Event type set for account update

Map Account ID and Website as identifiers.

Event type set for account update

Map Salesforce fields to Account Traits or Event Properties. For example, map Opportunity Stage to an account trait.

Event type set for account update

Once your Salesforce data flows into CustomerLabs, you can send it to third-party apps and marketing platforms. Learn more about the supported destination integrations.