Connecting Twilio to Salesforce
Twilio is infrastructure rather than a product, so what it can tell you depends entirely on what your own application logged alongside the message or call. 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 Twilio message or call record 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
Twilio calls and texts in Salesforce: matching numbers to Leads
Log each Twilio call or message in Salesforce as a Task with the CallSid or MessageSid in a custom field, matching records on a separate E.164-normalized phone field to avoid duplicate Leads. Check Twilio Flex's Salesforce integration first, and write any stored ad click ID to a Lead field mapped to the Opportunity.
Salesforce is a natural home for Twilio interactions, because sales already works from the Lead and Contact records the calls and texts relate to. The standard approach is logging each call or message as an activity, a Task with the CallSid or MessageSid in a custom field, on the matching record. If you run Twilio Flex, check its Salesforce integration before building your own, since it may already handle the call logging.
The failure particular to this pair is phone matching. Twilio delivers numbers in E.164, such as +15125550123, while Salesforce stores whatever the rep or the web form typed, like (512) 555-0123. A lookup on the raw string finds nothing, your integration creates a new Lead, and the org now has a duplicate holding half the history. Normalize numbers to E.164 in a separate field on Lead and Contact, match on that, and check it against your org's duplicate rules before switching on Lead creation.
Marketing context rides on the same record. When the call or text started from an ad, your application should have stored the click ID against the session or tracking number; write it to a custom field on the Lead when the interaction is logged, and confirm the mapping carries it to the Opportunity at conversion. Open a test record in the UI rather than trusting the API response.
Twilio → Salesforce · what breaks
Why this join usually fails — Twilio → Salesforce
- 01
The Lead or Contact identity never reaches Twilio
Twilio has no concept of marketing at all. Any identifier has to be attached by your own code at the point the interaction is created, and if it was not, the record cannot be recovered afterwards.
- 02
Transport confused with meaning
A delivered SMS is not a conversion. Twilio reports delivery, and reading that as a business outcome is the standard mistake when teams wire the console directly.
- 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.
Twilio → Salesforce · the fix
What working looks like — Twilio → Salesforce
The Lead or Contact identity on every interaction
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
Twilio → Salesforce · architecture
How Twilio and Salesforce actually connect
- 1
Twilio holds the truth
Twilio knows a message was sent or a call connected. Whether that represented a lead, a booking or a delivery notification is something only your application knows, which makes your own logging the source of truth rather than Twilio's console.
- 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 Twilio message or call record.
- 4
The event source decides reliability
Send from your application when the interaction represents something commercially meaningful, not from Twilio's status callbacks, which report transport rather than outcome.
- 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.
Twilio → Salesforce · normal or broken
Working vs. broken, side by side — Twilio → Salesforce
Normal, not a fault
The Lead or Contact identity present on the interaction
Sent from your application's own event, keyed to the Twilio SID
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
Twilio has no concept of marketing at all. Any identifier has to be attached by your own code at the point the interaction is created, and if it was not, the record cannot be recovered afterwards.
Sent from the browser
A delivered SMS is not a conversion. Twilio reports delivery, and reading that as a business outcome is the standard mistake when teams wire the console directly.
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
Twilio → Salesforce · diagnose
Diagnostic order — Twilio → Salesforce
- 01
Count interactions carrying the Lead or Contact identity
- 02
Follow one real conversion end to end
- 03
Check whether your application logs the business meaning of each interaction
If it only stores Twilio SIDs and statuses, there is nothing to build a conversion on.
- 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.
Twilio → Salesforce · prove
How it gets proven — Twilio → Salesforce
Source of truth
Your own application's records of Twilio interactions, since Twilio itself stores the transport and not the business meaning.
- The Lead or Contact identity confirmed present on a live interaction.
- A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
- Conversions confirmed to come from your application's business events rather than Twilio's delivery callbacks.
Twilio → Salesforce · free audit
What we check in the free audit
- Count interactions carrying the Lead or Contact identity
- Follow one real conversion end to end
- Check whether your application logs the business meaning of each interaction
- Write a test value and open the record in the UI
- Read the match rate, not the success message
Checked against
Your own application's records of Twilio interactions, since Twilio itself stores the transport and not the business meaning.
Free30 minutesNo obligation
Twilio → Salesforce · when not to buy
When you don't need this — Twilio → Salesforce
- Measure identifier coverage yourself first — pull your last hundred interactions and count how many carry the Lead or Contact identity.
- If Twilio is purely notification infrastructure in your stack, it is not a conversion source and should not be treated as one.
- 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.
Twilio → Salesforce · what we deliver
What gets built — Twilio → Salesforce
Identifier capture into Twilio
Attach the click identifier in your own application's record when creating the Twilio interaction, and store it alongside the Twilio SID so the two can be joined.
Event source: your application's own event, keyed to the Twilio SID
Send from your application when the interaction represents something commercially meaningful, not from Twilio's status callbacks, which report transport rather than outcome.
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
Nothing inherent; whatever your application defines as a reversal applies.
Written guarantee
95%+ tracking accuracy
Measured against Your own application's records of Twilio interactions, since Twilio itself stores the transport and not the business meaning.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Twilio → Salesforce questions, answered
Twilio sends numbers in E.164 format while Salesforce stores them as typed. Normalize numbers into a separate E.164 field and match on that.
Store the click ID against the session or tracking number in your application, then write it to a custom field on the Lead when the call is logged.
Almost always because the Lead or Contact identity never reached the Twilio message or call record. Twilio has no concept of marketing at all. Any identifier has to be attached by your own code at the point the interaction is created, and if it was not, the record cannot be recovered afterwards. 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 application's own event, keyed to the Twilio SID. Send from your application when the interaction represents something commercially meaningful, not from Twilio's status callbacks, which report transport rather than outcome.
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 Twilio → Salesforce
- Twilio → Marketing CloudConnecting Twilio to Salesforce Marketing Cloud
- Salesforce → Google AdsConnecting Salesforce to Google Ads
- Salesforce → MetaConnecting Salesforce to Meta Conversions API
RELATED GUIDES
Where Twilio → Salesforce fits in the rest of your tracking
- CallRail → SalesforceConnecting CallRail to Salesforce
- Invoca → SalesforceConnecting Invoca to Salesforce
- Aircall → SalesforceConnecting Aircall to Salesforce
- Twilio → HubSpotConnecting Twilio to HubSpot
- Twilio → 6senseConnecting Twilio to 6sense
- HVACConversion tracking for HVAC, with service calls and installs counted separately
- CallTrackingMetrics → SalesforceConnecting CallTrackingMetrics to Salesforce
- RingCentral → SalesforceConnecting RingCentral to Salesforce
Free · 30 min
Get Twilio and Salesforce joined properly
Free30 minutesNo obligation
