Connecting HubSpot to Salesforce
HubSpot knows which leads turned into money, weeks after the ad platforms have stopped paying attention. 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 HubSpot contact and deal 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
HubSpot to Salesforce: click IDs that survive sync and Lead conversion
The native HubSpot-Salesforce connector does not map new custom properties by default, so map each click ID field, then map it again in Salesforce Lead conversion to the Opportunity. Send closed revenue to ad platforms from one system only, normally the Salesforce Opportunity at Closed Won keyed on its ID, to avoid double-counting won deals.
HubSpot has a native Salesforce connector, and most companies running both already have it on. The question for ad measurement is narrower: does the click identifier you stored on the HubSpot contact actually reach Salesforce, and does it survive what Salesforce does to the record next. Each custom HubSpot property needs its own field mapping in the connector, and new properties are not mapped by default.
Follow one real record. The contact syncs to a Salesforce Lead with your custom click ID field filled. Sales converts the Lead into a Contact, Account and Opportunity, and that conversion has its own field mapping inside Salesforce. If nobody mapped the click ID to the Opportunity, the deal that closes carries nothing to send to an ad platform, even though both systems look correctly configured.
Then decide which system owns closed revenue. If sales works in Salesforce, the Opportunity's Closed Won stage is the conversion and HubSpot's deal is a copy, so send to ad platforms from one side only, keyed on the Opportunity ID. Running offline conversion uploads from both HubSpot and Salesforce is a common way to double-count every won deal, and sync lag between them means the two copies often disagree on close date.
HubSpot → Salesforce · what breaks
Why this join usually fails — HubSpot → Salesforce
- 01
The Lead or Contact identity never reaches HubSpot
The identifier has to be captured on the form and written to a contact property. HubSpot forms embedded in an iframe do not automatically see your page's cookies, so a hidden field has to be populated deliberately. Miss that and the contact is created clean, with nothing to join on ever again.
- 02
The deal closes long after the click
B2B sales cycles routinely run past the attribution window of every ad platform. Value uploaded on day 95 is value nobody will accept, so the timing question has to be answered before anything is built.
- 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.
HubSpot → Salesforce · the fix
What working looks like — HubSpot → Salesforce
The Lead or Contact identity on every deal
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
HubSpot → Salesforce · architecture
How HubSpot and Salesforce actually connect
- 1
HubSpot holds the truth
The deal carries the amount, the stage, the close date and the associated contact. That contact is where the original click identifier must live, because the deal is created much later by a salesperson who has no idea an ad was involved.
- 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 HubSpot contact and deal.
- 4
The event source decides reliability
Trigger when the deal reaches Closed Won and send the deal amount with the identifier stored on the associated contact. Sending on form submission instead means you optimize toward form fills, which is exactly the behavior that fills a pipeline with unqualified leads.
- 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.
HubSpot → Salesforce · normal or broken
Working vs. broken, side by side — HubSpot → Salesforce
Normal, not a fault
The Lead or Contact identity present on the deal
Sent from a HubSpot workflow or webhook on deal stage change
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
The identifier has to be captured on the form and written to a contact property. HubSpot forms embedded in an iframe do not automatically see your page's cookies, so a hidden field has to be populated deliberately. Miss that and the contact is created clean, with nothing to join on ever again.
Sent from the browser
B2B sales cycles routinely run past the attribution window of every ad platform. Value uploaded on day 95 is value nobody will accept, so the timing question has to be answered before anything is built.
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
HubSpot → Salesforce · diagnose
Diagnostic order — HubSpot → Salesforce
- 01
Count deals carrying the Lead or Contact identity
- 02
Follow one real conversion end to end
- 03
Open a Closed Won deal and follow it back to its contact
Does that contact carry the identifier property, populated? Then check the date gap between the contact's creation and the deal's close — that gap decides whether this integration is possible at all.
- 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.
HubSpot → Salesforce · prove
How it gets proven — HubSpot → Salesforce
Source of truth
HubSpot's Deals report, filtered to Closed Won for the same window, by close date.
- The Lead or Contact identity confirmed present on a live deal.
- A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
- The click-to-close time distribution measured, so you know what share of deals close inside the destination's window.
HubSpot → Salesforce · free audit
What we check in the free audit
- Count deals carrying the Lead or Contact identity
- Follow one real conversion end to end
- Open a Closed Won deal and follow it back to its contact
- Write a test value and open the record in the UI
- Read the match rate, not the success message
Checked against
HubSpot's Deals report, filtered to Closed Won for the same window, by close date.
Free30 minutesNo obligation
HubSpot → Salesforce · when not to buy
When you don't need this — HubSpot → Salesforce
- Measure identifier coverage yourself first — pull your last hundred deals and count how many carry the Lead or Contact identity.
- If your median deal closes well past the destination's upload window, the honest answer is a different measurement strategy, not this integration. We will tell you that on the call rather than sell you a build that cannot work.
- 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.
HubSpot → Salesforce · what we deliver
What gets built — HubSpot → Salesforce
Identifier capture into HubSpot
Create a custom contact property, populate a hidden form field from the persisted first-party cookie, and confirm the property lands on the contact rather than only on the form submission.
Event source: a HubSpot workflow or webhook on deal stage change
Trigger when the deal reaches Closed Won and send the deal amount with the identifier stored on the associated contact. Sending on form submission instead means you optimize toward form fills, which is exactly the behavior that fills a pipeline with unqualified leads.
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
A deal reopened or moved out of Closed Won can be retracted where the destination supports it, though most teams accept the small error here rather than wire it.
Written guarantee
95%+ tracking accuracy
Measured against HubSpot's Deals report, filtered to Closed Won for the same window, by close date.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
HubSpot → Salesforce questions, answered
Only if you map them. Add a field mapping for each custom click ID property in the connector settings, and check field-level security on the Salesforce side.
From whichever system sales closes deals in, usually Salesforce when both are used. Sending from both double-counts each won deal.
Almost always because the Lead or Contact identity never reached the HubSpot contact and deal. The identifier has to be captured on the form and written to a contact property. HubSpot forms embedded in an iframe do not automatically see your page's cookies, so a hidden field has to be populated deliberately. Miss that and the contact is created clean, with nothing to join on ever again. 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.
A HubSpot workflow or webhook on deal stage change. Trigger when the deal reaches Closed Won and send the deal amount with the identifier stored on the associated contact. Sending on form submission instead means you optimize toward form fills, which is exactly the behavior that fills a pipeline with unqualified leads.
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 HubSpot → Salesforce
- Salesforce → HubSpotConnecting Salesforce to HubSpot
- HubSpot → Marketing CloudConnecting HubSpot to Salesforce Marketing Cloud
- Stripe → HubSpotConnecting Stripe to HubSpot
Using HubSpot for bookings? How HubSpot bookings get tracked end to end
RELATED GUIDES
Where HubSpot → Salesforce fits in the rest of your tracking
- Salesforce → HubSpotConnecting Salesforce to HubSpot
- SugarCRM → SalesforceConnecting SugarCRM to Salesforce
- Capsule → SalesforceConnecting Capsule CRM to Salesforce
- Copper → SalesforceConnecting Copper to Salesforce
- HubSpot → MarketoConnecting HubSpot to Marketo
- HubSpot → 6senseConnecting HubSpot to 6sense
- Home servicesConversion tracking for home service businesses, measured in completed jobs
- Nutshell → SalesforceConnecting Nutshell to Salesforce
Free · 30 min
Get HubSpot and Salesforce joined properly
Free30 minutesNo obligation
