Connecting SendGrid to Salesforce
SendGrid carries both transactional and marketing mail through one account, which is convenient operationally and the source of the measurement problem: only one of those two streams has anything to do with acquisition. 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 SendGrid send 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
SendGrid to Salesforce: email engagement on Leads and Contacts
Pass the Salesforce Lead or Contact ID as a SendGrid custom argument so Event Webhook events write back to the right record. Write marketing clicks, unsubscribes and bounces, not every delivery or open; unsubscribes and hard bounces should update opt-out and validity fields. Map SendGrid categories to Campaigns for marketing only, so transactional sends never create Campaign Members.
For B2B senders, Salesforce is where email engagement actually gets used: a rep wants to know that a lead clicked the pricing link in yesterday's campaign. SendGrid's Event Webhook carries the recipient address and any custom arguments attached at send time. Pass the Salesforce Lead or Contact ID as a custom argument, so the webhook writes back to the right record instead of matching on email and guessing between duplicates.
Write selectively. Logging every delivered and open event as a Task fills activity timelines and consumes API calls and storage, and opens are inflated by mail privacy features and scanners anyway. Clicks on marketing links, unsubscribes and bounces are the useful writes. Unsubscribes and hard bounces should update the record's email opt-out and validity fields, or sales keeps emailing people who left.
Campaign attribution in Salesforce depends on Campaign Members, and transactional sends must never create them. If a password reset or invoice email adds people to a marketing Campaign, influence reports credit email for deals it didn't touch. Map SendGrid categories to Campaigns explicitly, marketing only. Check whether a connector already exists in your org before building one, and confirm field-level security lets the integration user write those fields.
SendGrid → Salesforce · what breaks
Why this join usually fails — SendGrid → Salesforce
- 01
The Lead or Contact identity never reaches SendGrid
Marketing clicks land with tracking parameters; transactional clicks generally do not, and both arrive on the same domain.
- 02
Receipt clicks credited to email marketing
A customer clicking through their own order confirmation to check delivery is not an email marketing conversion. Untagged transactional traffic pooled with marketing makes the channel look far better than it is.
- 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.
SendGrid → Salesforce · the fix
What working looks like — SendGrid → Salesforce
The Lead or Contact identity on every message
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
SendGrid → Salesforce · architecture
How SendGrid and Salesforce actually connect
- 1
SendGrid holds the truth
A receipt and a promotional campaign are both an email in the same account. Only the campaign can plausibly have caused a purchase, and only if the purchase carries the campaign's identifier.
- 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 SendGrid send.
- 4
The event source decides reliability
Send orders with the marketing campaign attributed where a tagged click preceded them.
- 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.
SendGrid → Salesforce · normal or broken
Working vs. broken, side by side — SendGrid → Salesforce
Normal, not a fault
The Lead or Contact identity present on the message
Sent from your order system
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
Marketing clicks land with tracking parameters; transactional clicks generally do not, and both arrive on the same domain.
Sent from the browser
A customer clicking through their own order confirmation to check delivery is not an email marketing conversion. Untagged transactional traffic pooled with marketing makes the channel look far better than it is.
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
SendGrid → Salesforce · diagnose
Diagnostic order — SendGrid → Salesforce
- 01
Count messages carrying the Lead or Contact identity
- 02
Follow one real conversion end to end
- 03
Check whether transactional links carry campaign parameters
If they do, every receipt click is being credited to email and the channel's reported performance is inflated.
- 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.
SendGrid → Salesforce · prove
How it gets proven — SendGrid → Salesforce
Source of truth
Your order system, with marketing sends distinguished from transactional ones.
- The Lead or Contact identity confirmed present on a live message.
- A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
- Orders from tagged marketing clicks reconciled against imported conversions, with transactional traffic excluded.
SendGrid → Salesforce · free audit
What we check in the free audit
- Count messages carrying the Lead or Contact identity
- Follow one real conversion end to end
- Check whether transactional links carry campaign parameters
- Write a test value and open the record in the UI
- Read the match rate, not the success message
Checked against
Your order system, with marketing sends distinguished from transactional ones.
Free30 minutesNo obligation
SendGrid → Salesforce · when not to buy
When you don't need this — SendGrid → Salesforce
- Measure identifier coverage yourself first — pull your last hundred messages and count how many carry the Lead or Contact identity.
- If you send only transactional mail, there is no marketing channel here to measure.
- 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.
SendGrid → Salesforce · what we deliver
What gets built — SendGrid → Salesforce
Identifier capture into SendGrid
Tag marketing links explicitly and attribute purchases from those; treat transactional traffic as returning customers, not as a channel.
Event source: your order system
Send orders with the marketing campaign attributed where a tagged click preceded them.
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
Refunds reverse.
Written guarantee
95%+ tracking accuracy
Measured against Your order system, with marketing sends distinguished from transactional ones.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
SendGrid → Salesforce questions, answered
Pass the Lead or Contact ID as a SendGrid custom argument, receive click events from the Event Webhook, and write them to that record or as Campaign Member status updates.
Not as a sales signal. Privacy features and scanners trigger automatic opens; clicks are far more reliable.
Almost always because the Lead or Contact identity never reached the SendGrid send. Marketing clicks land with tracking parameters; transactional clicks generally do not, and both arrive on the same domain. 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 order system. Send orders with the marketing campaign attributed where a tagged click preceded them.
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 SendGrid → Salesforce
- SendGrid → Marketing CloudConnecting SendGrid to Salesforce Marketing Cloud
- Salesforce → Google AdsConnecting Salesforce to Google Ads
- Salesforce → MetaConnecting Salesforce to Meta Conversions API
RELATED GUIDES
Where SendGrid → Salesforce fits in the rest of your tracking
- Resend → SalesforceConnecting Resend to Salesforce
- Postmark → SalesforceConnecting Postmark to Salesforce
- Mailgun → SalesforceConnecting Mailgun to Salesforce
- SendGrid → MarketoConnecting SendGrid to Marketo
- SendGrid → 6senseConnecting SendGrid to 6sense
- SaaSConversion tracking for SaaS, from signup through to the payment that matters
Free · 30 min
Get SendGrid and Salesforce joined properly
Free30 minutesNo obligation
