Integrations

Connect Salesforce

Connect your Salesforce organization with one authorization, no API keys to copy. Map Salesforce record events like new leads, new opportunities and stage changes onto your conversions, and push LeadJourney data back into Salesforce as records.

Connecting Salesforce turns record events (new leads, new opportunities, stage changes and more) into LeadJourney conversions, automatically attributed to the campaign, ad set and ad that earned them. You authorize Salesforce once (no keys to copy), then map each Salesforce event onto one of your conversion types. Mapped events flow through the same postback pipeline as your offline conversions, so they automatically pick up every ad postback you've already configured. The same screen also lets you send LeadJourney clicks, leads and conversions back into Salesforce as Leads, Contacts, Opportunities or Accounts.

Before you start

Have these ready so the connection works end to end:

  • An active LeadJourney workspace and a Salesforce organization you can sign in to.
  • Tracking is live, because clicks have to be recorded first so records can be matched back to a campaign. See Install the tracking script.
  • A way to carry the click ID onto your Salesforce records, typically a custom field on the Lead (see the callout below).
  • At least one conversion type to map onto (e.g. WonClient). Set these up first in the Events Manager.

Where to find it

Open Settings → Apps, or go to app.leadjourney.io/settings?slug=apps. Click the Salesforce card to open the integration (you can also jump straight to it with ?slug=apps&app=salesforce). While you're not connected you'll see a “Connect your Salesforce account” card; once connected, the same screen shows your organization, your triggers and the Send to Salesforce panel.

Step by step

Authorize LeadJourney from Salesforce

On the Connect your Salesforce account card, click Connect with Salesforce. You'll be redirected to Salesforce to sign in and approve LeadJourney's access. There are no API keys to copy.

As the card explains, LeadJourney requests read access (contacts, opportunities) so it can read records and receive webhook events to pick up changes in real time. After you approve, Salesforce sends you back and you'll see a “Salesforce connected” confirmation.

Syncing starts when you connect

LeadJourney tracks new Salesforce events from the moment you connect. Records and changes from before the connection are not imported.

Check the connection details

Once connected, the header shows a Live pill (or Needs reconnect if something breaks), plus Re-authorize and Disconnect buttons. Below it you'll see the Connection status, your Organization name and ID, Active triggers (active out of total) and the Connected since date.

Add a trigger

In the Triggers panel (“Each trigger maps a Salesforce record event to one of your conversions.”) click Add trigger. In the New Salesforce trigger dialog:

  1. App: Salesforce (already selected).
  2. LeadJourney Event: pick the conversion type this Salesforce event should record, e.g. WonClient. (No options? Create one under Settings → Events first.)
  3. Trigger: choose the Salesforce event from the card grid. Each card shows the event and a short description, and Search triggers… narrows a long list.

Click Continue.

Receive data and confirm the mapping

The dialog opens a three-tab flow:

  • Receive Data: click Find latest data to load the 3 most recent records for the event you picked. If no data appears, create a matching record in Salesforce and check again. Select the record you want to map against (expand it to see the raw payload), then click Continue with selected record.
  • Configure Mapping: map the record onto LeadJourney columns. New triggers start with Email, Name, Phone, click_id, Revenue and Currency, pre-filled where LeadJourney finds a likely match (Salesforce fields sit under record., e.g. record.Email or record.Amount). You can pick several paths for one column (they are joined with a space) or type static:value for a fixed value. Use Add custom field to add First name, Last name or one of your workspace's custom fields, or Create new field (type Text, Number or Currency). Mapping click_id is recommended but optional.
  • Filtering (optional): click Add filter and set a Path, an Operator (equals, not equals, contains, greater than, less than, exists and more) and a Value. The trigger only fires when every filter matches, e.g. record.StageName equals Closed Won.

Click Save & Continue to finish, or Save and continue later to keep your progress.

How Salesforce records link to the right campaign

Salesforce doesn't capture LeadJourney's click ID on its own, so you store it on the record and map it here. The usual setup is a custom text field on the Lead that holds the visitor's click ID, filled by the form that creates the lead. On the Configure Mapping tab, point click_id at that field and every record arrives already tied to the click, and therefore the campaign, ad set and ad that earned it. No click ID? LeadJourney falls back to matching on email or phone.

Managing your triggers

Each trigger appears as a row (Salesforce event → conversion type) with an Active / Paused pill and a summary of how many fields and filters it uses.

  • Pause / Resume: use the toggle to stop a trigger temporarily without deleting it.
  • Edit: change the event, mapping, filters or target conversion. The URL gets a trigger_id parameter, so you can share a link that opens that trigger directly.
  • Delete: type delete to confirm. The mapping and filters can't be recovered; other triggers keep running.
  • Add another: use Add trigger again to map more Salesforce events onto different conversions.

Send data back to Salesforce

The Send to Salesforce panel pushes LeadJourney clicks, conversions and leads into Salesforce as records, no Zapier needed. Click + Add destination, then:

  1. Write this Salesforce object: choose Lead, Contact, Opportunity or Account.
  2. When this happens: pick the LeadJourney event. For a conversion event you can narrow it with Conversion type, or leave it on Any conversion type.
  3. Write mode: Create always creates a new record, Update only updates an existing match and skips if none is found, Upsert updates the match on an External ID field, otherwise creates.
  4. Matching field (Update and Upsert): the field that identifies an existing record. For Opportunities and Accounts in Update mode you can also pick Contact email or Contact phone to find the record via its linked contact. For Upsert it must be a Salesforce External ID field.
  5. Map fields: pick a Salesforce field from the list (or type a field API name like My_Field__c and click Set), then the LeadJourney value to write into it. Select several values to join them with a space, or type a fixed value. Find latest data shows real example values; + Add field adds another row.

Click Create destination. Each destination row has Pause / Resume, Edit and Delete (deleting stops new records; existing Salesforce records are not affected). The Sync history table lists every delivery with its Status (Success, Failed or Skipped), event, object, mode and detail, and a Retry button for failed or skipped ones.

Reconnecting

If Salesforce revokes the app, the webhook subscription goes missing, or Salesforce is unreachable, the header flips to Needs reconnect and a banner explains why (e.g. “Salesforce disconnected your app” or “Webhook subscription is gone”). Click Reconnect to re-run the authorization. To refresh granted permissions while everything still works, use Re-authorize in the header. In both cases your triggers and settings are kept.

Disconnecting

To remove Salesforce, click Disconnect in the header, type disconnect and confirm with Disconnect Salesforce. This is deliberate because it's destructive:

Disconnect deletes your triggers

Disconnecting permanently disconnects your Salesforce organization from the workspace and deletes every trigger. Salesforce events stop flowing into your conversions immediately. You can reconnect later, but your trigger configuration won't be restored, so you'll set it up again.

Troubleshooting

No records when you click “Find latest data”?

Nothing recent exists in Salesforce for that event yet. Create or update a matching record, then click Find latest data again. Only events from after you connected are available.

Records come in but aren't attributed to a campaign?

LeadJourney needs to know which click the record belongs to. Check that (1) the tracking script is installed and recording clicks, (2) your records carry the click ID in a custom field and the trigger maps click_id to it, and (3) the trigger is Active. As a fallback, email or phone can be used to match.

A destination shows Failed or Skipped deliveries?

Open Sync history and read the Detail column. Update skips when no match is found, and Upsert needs a real External ID field as its matching field. Fix the destination, then click Retry.

Common questions