IntegrationsCRMSalesforce Sales Cloud

Salesforce Sales Cloud

Creates Salesforce Lead records server-side through the REST API Create a Record resource, authenticated with the OAuth 2.0 client credentials flow.

Why route Salesforce Sales Cloud through Datafly Signal

  • Profiles are updated from the server, not the browser. Events reach Salesforce Sales Cloud even when a tracker blocker or a failed page unload would have dropped a client-side call, so the profile reflects what actually happened.
  • Token lifecycle is handled for you. Signal obtains and refreshes the OAuth credentials Salesforce Sales Cloud requires, so nothing expires quietly in the middle of a campaign.
  • One consent decision governs every destination. Salesforce Sales Cloud is gated by the same consent state as the rest of your stack, so a withdrawal applies everywhere at once.

Prerequisites

Create an External Client App

In Setup, create an External Client App (or Connected App) with OAuth enabled, the api scope, and Enable Client Credentials Flow ticked. Copy the consumer key and secret.

Assign a Run As user

In the app’s policies, set the Run As user: an integration user with Create permission on Lead (or the object you choose).

Note your My Domain host

Setup > My Domain shows your host, for example acme.my.salesforce.com (sandbox: acme--uat.sandbox.my.salesforce.com). The client credentials flow must request its token from this host; login.salesforce.com does not support it. Use the same host for the Instance URL.

Configuration

FieldTypeRequiredDescription
instance_urlstringYesYour Salesforce org’s My Domain host (no scheme), e.g. acme.my.salesforce.com. API calls are sent here; it is the instance_url the token response returns.
login_hoststringYesHost the OAuth token is requested from (no scheme). The client credentials flow must use your org’s My Domain host, for example acme.my.salesforce.com (sandbox: acme—uat.sandbox.my.salesforce.com); login.salesforce.com and test.salesforce.com do not support it.
client_idstringYesConsumer Key of an External Client App / Connected App enabled for the OAuth 2.0 Client Credentials flow with a Run As integration user.
client_secretsecretYesConsumer Secret of the External Client App / Connected App. Used with client_id in the client_credentials grant.
sobject_typestringYesThe Salesforce object to create, e.g. Lead or Contact. The Run As integration user must have create permission on this object. Default: Lead.

Signal Setup

  1. Navigate to Integrations in the sidebar and open the Integration Library tab.
  2. Find Salesforce Sales Cloud, click Install and fill in the fields above.
  3. Pick the preset for your vertical, then review the mappings in the blueprint editor.
curl -X POST http://localhost:8084/v1/admin/integration-catalog/salesforce_crm/install \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Salesforce Sales Cloud",
    "config": {
      "instance_url": "yourdomain.my.salesforce.com",
      "login_host": "yourdomain.my.salesforce.com",
      "client_id": "3MVG9...",
      "client_secret": "ABCD...",
      "sobject_type": "Lead"
    },
    "delivery_mode": "server_side"
  }'

API endpoint

POST https://{instance_url}/services/data/v60.0/sobjects/{sobject_type}
Token: POST https://{login_host}/services/oauth2/token (grant_type=client_credentials)

Example body:

{"Email": "jane.doe@example.com", "FirstName": "Jane", "LastName": "Doe", "Company": "Acme Ltd",
 "Phone": "+447700900123", "LeadSource": "newsletter", "Description": "Lead: demo", "HasOptedOutOfEmail": false}

The presets turn on the strict output contract: only the fields the blueprint maps are sent.

Event mapping

Lead Capture preset (lead_capture)

Default. Sign-ups, lead forms, demo requests, trial starts and contact requests create Salesforce Lead records with standard field API names and the UTM source as LeadSource; each event creates a new Lead (Salesforce duplicate rules decide what happens to repeats). Email, name and phone are sent in plain text: a Lead is a CRM record the sales team contacts, and the Salesforce API stores the values themselves. LastName and Company are required by Salesforce: events without a last name are not sent, and Company defaults to ‘Individual’ when the visitor has no company trait (change it to your org’s convention).

Signal eventSent to the vendor as
sign_upLead
generate_leadLead
demo_requestedLead
trial_startedLead
contact_requestedLead

Insurance preset (insurance)

Quote requests, quotes, completed quotes, contact requests and leads create Salesforce Lead records with the line of business, cover level and quote reference in Description. Email, name and phone are sent in plain text: a Lead is a CRM record the sales team contacts, and the Salesforce API stores the values themselves. LastName and Company are required by Salesforce: events without a last name are not sent, and Company defaults to ‘Individual’ when the visitor has no company trait (change it to your org’s convention).

Signal eventSent to the vendor as
quote_requestedLead
get_quoteLead
quote_completedLead
contact_requestedLead
generate_leadLead

Automotive preset (automotive)

Test-drive bookings, dealer enquiries, finance quotes, brochure downloads and leads create Salesforce Lead records with the vehicle, dealer and finance detail in Description. Email, name and phone are sent in plain text: a Lead is a CRM record the sales team contacts, and the Salesforce API stores the values themselves. LastName and Company are required by Salesforce: events without a last name are not sent, and Company defaults to ‘Individual’ when the visitor has no company trait (change it to your org’s convention).

Signal eventSent to the vendor as
test_drive_bookedLead
dealer_contactedLead
finance_quote_requestedLead
brochure_downloadedLead
generate_leadLead

Identity and personal data

Each event creates a new Lead from the identity traits: Email (trimmed, lowercased), FirstName, LastName, Phone (E.164), Title, Website, City, State, Country. Email, name and phone are sent in plain text: the Lead is the CRM record your sales team contacts. LastName and Company are required by Salesforce: an event without a last name is not sent, and Company defaults to Individual when the visitor has no company trait (change it to your org’s convention). HasOptedOutOfEmail is true unless marketing consent is granted.

Known limitations

  • Every event creates a new Lead; Salesforce duplicate rules decide what happens to repeats (a blocking rule returns DUPLICATES_DETECTED).

Troubleshooting

SymptomCause and fix
400 INVALID_FIELDA mapped field does not exist on the object; check the field API name.
400 REQUIRED_FIELD_MISSINGA validation rule or required custom field on Lead; map it in the blueprint.
Token request failsLogin host must be your My Domain host, and the app must have the client credentials flow enabled with a Run As user.