Connecting Sitecore to Salesforce
Sitecore is enterprise digital experience software with its own personalisation and analytics stack, which frequently competes with rather than complements the measurement you are trying to build. Sending conversions into Salesforce rather than out of it is how marketing data reaches the place sales actually works. The join between them succeeds or fails on one thing: whether the Lead or Contact identity reaches the Sitecore contact and order before the conversion happens, because Salesforce can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Sitecore forms to Salesforce: click IDs on the Lead, not in xDB
Add hidden gclid, fbclid, li_fat_id and UTM fields to Sitecore Forms, populated from a first-party cookie, and map them server-side in the submit action to custom Lead fields. Match on email before creating Leads. Export qualified or closed-won Opportunities with stored gclid to Google Ads and hashed email to Meta. Personalization data is context, not attribution.
This is the most common Sitecore pair in B2B: Sitecore Forms or a custom form handler creates a Salesforce Lead. Sitecore has shipped Salesforce CRM connectors for some versions; check what your version and license include and what the connector maps, because those connectors were built to sync contacts for personalization, not to carry ad click identifiers.
Add hidden fields for gclid, fbclid, li_fat_id and UTM values to the form, populated from a first-party cookie set on landing, and map them to custom Lead fields in the form's submit action. Do the mapping server-side in the submit pipeline rather than trusting a script on a cached page. Match on email before creating a Lead so a returning prospect updates the existing record instead of becoming a second one.
Opportunity stages then become the conversion. When an Opportunity reaches a qualified stage or closed-won, export it with the stored gclid as an offline conversion to Google Ads and with hashed email to Meta. Sitecore's personalization data (pattern cards, engagement value) can go to Salesforce if sales finds it useful, but it is context, not attribution, and should never decide which campaign gets credit for a deal.
Sitecore → Salesforce · what breaks
Why this join usually fails — Sitecore → Salesforce
- 01
The Lead or Contact identity never reaches Sitecore
Sitecore's personalisation can vary page output per visitor, its analytics identity model is separate from any ad platform's, and enterprise deployments sit behind multiple caching and CDN layers.
- 02
Two analytics systems answering different questions
Sitecore's experience analytics and your ad platform reporting will never agree because they measure different things. Trying to reconcile them wastes weeks.
- 03
Writes that succeed and change nothing
Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.
- 04
Nothing reconciles afterwards
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
Sitecore → Salesforce · the fix
What working looks like — Sitecore → Salesforce
The Lead or Contact identity on every order
Conversions arriving in Salesforce
The marketing context appears on the record and flows into the opportunity, where sales and reporting can both use it.
Reconciled against the source
Sitecore → Salesforce · architecture
How Sitecore and Salesforce actually connect
- 1
Sitecore holds the truth
Sitecore's experience database tracks contacts and interactions for personalisation. It is not a conversion source for ad platforms and its numbers will not match theirs, by design.
- 2
Salesforce needs a click to match
Salesforce needs a resolvable record and a custom field to write to. Field-level security and validation rules can silently reject writes, which is a Salesforce-specific failure that returns success at the API level and changes nothing.
- 3
The identifier is the bridge
The Lead or Contact identity, captured at the visit and carried into the Sitecore contact and order.
- 4
The event source decides reliability
Send from the commerce layer. Sitecore's own goal and event tracking serves personalisation and should not be wired to ad platforms.
- 5
Deduplication at the destination
Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.
Sitecore → Salesforce · normal or broken
Working vs. broken, side by side — Sitecore → Salesforce
Normal, not a fault
The Lead or Contact identity present on the order
Sent from your commerce system's order event
Deduplicated correctly
Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.
Reconciles with the source
Actually broken
The Lead or Contact identity missing on most records
Sitecore's personalisation can vary page output per visitor, its analytics identity model is separate from any ad platform's, and enterprise deployments sit behind multiple caching and CDN layers.
Sent from the browser
Sitecore's experience analytics and your ad platform reporting will never agree because they measure different things. Trying to reconcile them wastes weeks.
Counted twice, or not at all
Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.
Nobody has reconciled it
Sitecore → Salesforce · diagnose
Diagnostic order — Sitecore → Salesforce
- 01
Count orders carrying the Lead or Contact identity
- 02
Follow one real conversion end to end
- 03
Separate Sitecore's personalisation analytics from conversion measurement
They are different systems for different purposes. Conflating them is the standard mistake in this stack.
- 04
Write a test value and open the record in the UI
The API saying it worked and the field actually holding the value are different things in Salesforce more than anywhere else.
- 05
Read the match rate, not the success message
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
Sitecore → Salesforce · prove
How it gets proven — Sitecore → Salesforce
Source of truth
Your commerce or CRM system — Sitecore's own analytics database answers a different question.
- The Lead or Contact identity confirmed present on a live order.
- A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
- Conversions confirmed sourced from the commerce system rather than from Sitecore's experience database.
Sitecore → Salesforce · free audit
What we check in the free audit
- Count orders carrying the Lead or Contact identity
- Follow one real conversion end to end
- Separate Sitecore's personalisation analytics from conversion measurement
- Write a test value and open the record in the UI
- Read the match rate, not the success message
Checked against
Your commerce or CRM system — Sitecore's own analytics database answers a different question.
Free30 minutesNo obligation
Sitecore → Salesforce · when not to buy
When you don't need this — Sitecore → Salesforce
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the Lead or Contact identity.
- If your Sitecore implementation is content-only with commerce elsewhere, work at the commerce layer entirely.
- If your Salesforce org is administered by a team you cannot get time with, scope their availability before starting — this build is usually blocked on admin access rather than on the work.
Sitecore → Salesforce · what we deliver
What gets built — Sitecore → Salesforce
Identifier capture into Sitecore
Capture the identifier server-side in the application and persist it to the commerce order, keeping it separate from Sitecore's own contact identity model.
Event source: your commerce system's order event
Send from the commerce layer. Sitecore's own goal and event tracking serves personalisation and should not be wired to ad platforms.
Dispatch to Salesforce
API writes to the Lead or Contact record, or a platform event, carrying the marketing context as custom field values.
Reversals where they exist
Handled at the commerce layer.
Written guarantee
95%+ tracking accuracy
Measured against Your commerce or CRM system — Sitecore's own analytics database answers a different question.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Sitecore → Salesforce questions, answered
Add a hidden field populated from a first-party cookie set on landing, and map it to a custom Lead field in the form's server-side submit action.
Don't assume it does. Check what your connector maps; most were built for contact sync, so click IDs usually need custom fields and mapping.
Almost always because the Lead or Contact identity never reached the Sitecore contact and order. Sitecore's personalisation can vary page output per visitor, its analytics identity model is separate from any ad platform's, and enterprise deployments sit behind multiple caching and CDN layers. Measure coverage before debugging the dispatch.
Salesforce resolves on its own record identity — a Lead, a Contact, or an Account — rather than on a click identifier. What you are doing here is attaching marketing context to a record so the pipeline carries it, which means the click identifier arrives as a custom field value rather than as a matching key. The hazard is duplicates: two Leads for one person means two records with half the history each.
Your commerce system's order event. Send from the commerce layer. Sitecore's own goal and event tracking serves personalisation and should not be wired to ad platforms.
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
More on Sitecore → Salesforce
- Sitecore → Marketing CloudConnecting Sitecore to Salesforce Marketing Cloud
- Salesforce → Google AdsConnecting Salesforce to Google Ads
- Salesforce → MetaConnecting Salesforce to Meta Conversions API
RELATED GUIDES
Where Sitecore → Salesforce fits in the rest of your tracking
- Duda → SalesforceConnecting Duda to Salesforce
- Sanity → SalesforceConnecting Sanity to Salesforce
- Craft → SalesforceConnecting Craft CMS to Salesforce
- Sitecore → HubSpotConnecting Sitecore to HubSpot
- Sitecore → MarketoConnecting Sitecore to Marketo
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Webflow → SalesforceConnecting Webflow to Salesforce
- Concrete CMS → SalesforceConnecting Concrete CMS to Salesforce
Free · 30 min
Get Sitecore and Salesforce joined properly
Free30 minutesNo obligation
