Two-way SMS

Two-way SMS between Salesforce and your Twilio account.

Customers reply to the business number that texted them, and the reply lands in Salesforce in the same conversation. Delivery updates and opt-outs come back the same way.

  • No credit card required
  • Listed on Salesforce AgentExchange
  • Then $120 per user per year
  • Runs on your own Twilio account

How does two-way SMS work in Salesforce? With ConnectSMS, outbound texts go from Salesforce straight to Twilio's API. Replies and delivery updates come back from Twilio to a webhook on a public Salesforce Site. ConnectSMS checks Twilio's signature, adds the reply to the conversation for that business number and customer, and updates each message's status.

Animation: a user writes "Hi Sarah, your appointment is confirmed for tomorrow at 10:30 AM." in the ConnectSMS Text Messages component on a Salesforce Contact record. ConnectSMS sends it through the company's own Twilio account to the customer's phone, the status changes to Delivered, and the customer's reply "Perfect, thank you." appears on the same record.

The round trip

Three kinds of traffic, one connection.

Salesforce talks to Twilio directly, with no ConnectSMS servers in between. Outbound texts are API calls from Salesforce; replies and delivery updates are webhook calls from Twilio.

Outbound text

  1. Written on a record, in the inbox, or sent by Flow
  2. Recorded in Salesforce
  3. Access, opt-outs and policies checked
  4. Salesforce calls Twilio's API
  5. Carrier delivers to the phone

Customer reply

  1. Customer replies to your number
  2. Twilio posts to your Salesforce Site
  3. Signature and account checked
  4. Threaded, linked, opt-outs applied
  5. On the record and in the inbox

Delivery update

  1. Carrier reports to Twilio
  2. Twilio posts a status callback
  3. Signature and account checked
  4. Status moves forward on the message

Outbound

Recorded first, then sent

Every message is saved in Salesforce before ConnectSMS calls Twilio. Background jobs hand queued and scheduled messages to Twilio and check access, opt-outs and policies again at that moment.

Inbound

Replies through your Salesforce Site

Your Twilio Messaging Services send incoming messages to a webhook address on a public Salesforce Site. The site's guest user can reach that webhook and nothing else.

Delivery updates

Statuses from the carrier

Twilio reports what the carrier says through the same webhook. Updates only move a message forward, so a late report never turns Delivered back into Sent.

Inbound

What happens when a customer texts back.

Each incoming message goes through the same steps, whether it's a reply to a reminder or a first text from someone new.

  • The request is checked

    ConnectSMS verifies Twilio's signature on the request and refuses calls made for a different Twilio account.

  • Stored once

    Each message is processed once by its Twilio message ID, so a webhook Twilio retries doesn't create a duplicate.

  • Threaded by business number

    The message joins the conversation for the number that received it and the customer's phone, and is never merged with another number's thread.

  • Linked to the record

    A new conversation links itself when exactly one Contact, or failing that exactly one open Lead, has the number. It never guesses between several.

  • Opt-outs applied

    A reply that is just STOP, START or another standard keyword updates the customer's opt-out status straight away.

  • The team sees it

    A closed conversation reopens, the record and inbox update automatically, and the assignee or last sender gets a Salesforce notification.

Replies

Replies always come from the number the customer knows.

A conversation belongs to one business number and one customer phone. Every reply in it uses that business number, whoever or whatever sends it.

  • The same customer texting two of your numbers has two separate conversations
  • People reply from the conversation's number; there's no way to switch it on a reply
  • Replies from Flow, Apex and REST keep the number too, through Reply to Text Conversation
  • Someone without Send access to that number can read the conversation but can't reply

Working replies as a team in the shared inbox

Sarah Chen · +1 (212) 555-0147
  • Conversation on Support line · +1 (415) 555-0199Replies from Support line
  • Conversation on Sales line · +1 (415) 555-0142Replies from Sales line
To Sarah Chen · +1 (212) 555-0147 From Support line • +1 (415) 555-0199

Replies come from the number this conversation uses, so the customer sees the same number.

Recreated from the ConnectSMS interface with sample data.

Delivery status

Every status, in plain language.

Each message on the record and in the inbox shows where it is. When a message fails, ConnectSMS explains why and shows the Twilio error code.

StatusWhat it means
Scheduled Waiting for its scheduled time. Permissions and consent are checked again before sending.
Queued Saved in Salesforce and waiting to be handed to Twilio.
Sending Twilio accepted it and is sending it to the carrier.
Sent Handed to the carrier. Delivery isn't confirmed yet.
Delivered The carrier confirmed delivery. This doesn't mean it was read.
Read Reported read by the recipient's app.
Undelivered The carrier couldn't deliver it.
Failed It couldn't be sent.
Blocked A ConnectSMS rule blocked it, for example because the person opted out.
Canceled Canceled before it was sent.
Unknown ConnectSMS couldn't confirm whether Twilio accepted it. It's being checked and won't be resent automatically.
Received A message the customer sent to your business number.

Normal path

  1. Queued
  2. Sending
  3. Sent
  4. Delivered

If Twilio's answer is lost

  1. Timeout or server error
  2. Unknown
  3. ConnectSMS checks with Twilio
  4. Matching status, or Failed if Twilio never got it

Sending means Twilio accepted the message. Sent means Twilio handed it to the carrier. Delivered means the carrier confirmed it reached the phone. Carriers decide what they report, so some messages stay at Sent.

If Twilio's answer is lost, the message is marked Unknown and ConnectSMS checks with Twilio rather than sending it twice. A failed or undelivered message can be retried as a new message linked to the first.

How reliability works

Opt-out keywords

STOP and START work the moment they arrive.

ConnectSMS recognizes Twilio's standard opt-out and opt-in keywords when a customer replies with just the keyword, ignoring upper and lower case.

  • An opt-out stops texts from all your business numbers by default, or only the number that received it if your admin chooses
  • START, YES or UNSTOP lifts the opt-out for the number that received it
  • Opt-outs that Twilio reports are recorded too
  • HELP and INFO are left to Twilio, which sends the response
  • Opt-outs are always enforced and checked again when a scheduled message is sent

Consent and opt-outs

Opt out

  • STOP
  • STOPALL
  • UNSUBSCRIBE
  • CANCEL
  • END
  • QUIT
  • REVOKE
  • OPTOUT

Opt back in

  • START
  • YES
  • UNSTOP

The whole reply must be the keyword, so a message like "please stop texting me" isn't treated as an opt-out. Once someone opts out, the composer and inbox show it and sending to them is blocked.

What you need

Turning on replies takes three steps.

The Inbound webhook page in ConnectSMS Setup guides an admin through them and shows the last incoming message and delivery update it received.

Step 1

Choose the Salesforce Site

Pick a public Salesforce Site or Experience Cloud site. Its guest user gets the ConnectSMS Webhook Guest permission set, which only allows the webhook.

Step 2

Point your Messaging Services

Select your Twilio Messaging Services and configure the webhook, so incoming messages and delivery updates for their numbers reach ConnectSMS.

Step 3

Keep the signature check on

The check is set to Enforce by default. Monitor is only for troubleshooting, and Off is for development orgs only.

FAQ

Two-way SMS: common questions

Can Salesforce receive text messages?

Yes. Twilio passes incoming texts to a webhook on a public Salesforce Site, and ConnectSMS shows them in the conversation on the record and in the shared inbox. When exactly one Contact, or failing that one open Lead, has the sender's number, the conversation is linked to that record automatically.

Do I need a public Salesforce Site to receive texts?

Yes. Twilio delivers incoming messages and delivery updates to a webhook address on a public Salesforce Site or Experience Cloud site. The site's guest user gets only the ConnectSMS Webhook Guest permission set, and the Inbound webhook page in ConnectSMS Setup walks you through choosing the site and pointing your Messaging Services at it.

How does ConnectSMS know a webhook call really came from Twilio?

It checks Twilio's signature on every call against the configured webhook address, and refuses calls made for a different Twilio account. The signature check is set to Enforce by default, and it must be set to Enforce before sending can be turned on.

What does the Unknown status mean?

It means ConnectSMS couldn't confirm whether Twilio accepted the message, for example because the connection timed out. ConnectSMS checks with Twilio automatically: if Twilio has the message, it gets the matching status; if Twilio never received it, it becomes Failed. An Unknown message is never resent automatically, so the customer doesn't get it twice.

Does ConnectSMS answer HELP messages?

No. ConnectSMS recognizes HELP and INFO but takes no action on them; Twilio sends the HELP response. Only whole-message opt-out and opt-in keywords such as STOP and START change a customer's opt-out status in ConnectSMS.

Which number do replies come from?

Always the business number the customer texted. ConnectSMS never switches numbers on a reply, so the customer keeps seeing the same number, and people without Send access to that number can read the conversation but not reply.

Keep exploring

Try it now: every feature, free for 14 days

Put every customer text where your team already works.

Install ConnectSMS from AgentExchange, connect your Twilio account and give your team the numbers they should text from.

  • No credit card required
  • Listed on Salesforce AgentExchange
  • Then $120 per user per year
  • Runs on your own Twilio account

ConnectSMS is published by WorkBridge Solutions. Twilio bills your Twilio account directly for messaging, including during the trial.