What This Integration Does
This integration connects Twilio’s messaging and voice infrastructure to Salesforce, enabling your team to send SMS messages from within Salesforce, trigger automated texts based on Salesforce workflow rules, and log every communication — sent, received, and missed — as a Salesforce activity record tied to the correct contact, lead, or opportunity.
Salesforce becomes the control centre for SMS communication. A sales rep can send a text directly from a contact record. An automated process builder flow can send an appointment reminder when an opportunity reaches a certain stage. A service agent can respond to an inbound text without leaving the Salesforce console. Every interaction is recorded as a Task or custom activity, complete with message content, timestamp, delivery status, and a link to the full conversation thread.
Twilio handles the telecommunications layer: carrier routing, number provisioning, delivery receipts, and regulatory compliance. Salesforce handles the business logic: who gets messaged, when, and why. The integration ensures both systems stay in sync, with conversation history accessible to anyone with access to the contact record.
This is not Salesforce’s native Digital Engagement add-on, which requires Service Cloud licensing and has rigid configuration options. This is a custom integration that works with any Salesforce edition and gives you full control over message routing, template management, and automation triggers.
The Workflow
Outbound messages are initiated in two ways. Manual sends happen through a custom Lightning component embedded in the contact or lead record page. The rep types a message or selects a template, and the component sends a request to the integration endpoint, which forwards the message through Twilio’s API. Automated sends are triggered by Salesforce Process Builder, Flow, or Apex triggers. When a record meets the defined criteria — a lead status change, an opportunity stage advance, a case status update — the automation calls the integration endpoint with the recipient details and message template.
The integration resolves merge fields from the Salesforce record and composes the final message. Twilio sends the message and returns delivery status updates via webhook, each written back to the Salesforce activity record.
Inbound messages arrive through Twilio webhooks. The integration matches the sender’s number against Salesforce contacts and leads — logging against the matching record if found, or creating a new lead if not. Inbound messages can also trigger automation: a reply to a payment reminder can update the opportunity, or a new text from an unknown number can create a task for the sales team.
Before and After
Before: Sales reps send texts from personal phones. The conversation is invisible to Salesforce and to everyone else on the team. When a rep leaves or a colleague takes over an account, the text message history goes with the phone, not the CRM. Automated reminders require a standalone SMS platform with its own contact list that drifts out of sync with Salesforce. Compliance teams cannot audit text communications because they are not captured anywhere centrally.
After: Every text message lives inside Salesforce. Reps send and receive SMS without leaving the platform. Automated messages fire based on the same workflow rules that govern email and task creation. The complete communication history — across email, phone, and text — is visible on the contact record. Compliance and audit requirements are met because all messaging is logged and searchable.
Who Needs This
This integration suits organisations running Salesforce as their primary CRM where text messaging is a meaningful part of the customer relationship. Common scenarios include:
- Field service businesses that need to send appointment confirmations, technician ETA updates, and completion notifications from Salesforce
- Financial services teams where timely text follow-ups on applications or document requests improve conversion rates
- Recruitment agencies that use SMS for candidate communication and need every interaction logged against the candidate record
- Any Salesforce-centric team that currently uses personal phones or a separate SMS tool and needs those conversations inside the CRM
If your compliance requirements mandate that all customer communications are centrally logged and auditable, this integration is particularly relevant.
How We Build This
We start by mapping your SMS use cases to Salesforce objects and automation. Which record types trigger messages? What templates do you need? Should inbound messages create leads, update cases, or trigger tasks? This scoping determines the data flows and the Salesforce customisation required.
The integration is built as a middleware service that connects Salesforce and Twilio via their respective APIs. On the Salesforce side, we create custom objects for conversation tracking, custom Lightning components for the send interface, and the necessary Process Builder flows or Apex triggers for automation. On the Twilio side, we configure a Messaging Service with appropriate sender numbers, opt-out handling, and carrier compliance settings.
Authentication uses Salesforce Connected App credentials and Twilio API keys with automatic token rotation. The middleware processes messages through a queue to handle volume spikes.
Testing covers manual sends, automated triggers, inbound routing, delivery failures, and opt-out compliance. We test in a Salesforce sandbox with Twilio test credentials before connecting production.
Bring SMS Into Your Salesforce Workflow
If text messages are part of how your team communicates with customers but those conversations are invisible to Salesforce, this integration closes the gap. Get in touch to discuss your Twilio and Salesforce integration.
Related pages: