SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Fixing Inbound SMS Mismatched Conversation Threading in Twilio

Issue

When managing multiple phone numbers under a single Twilio account, inbound SMS replies from a customer may be routed into the wrong active conversation thread rather than the thread where the most recent outbound message was sent.

For instance, this can occur if an application sends an outbound SMS to a user from Phone Number A (Conversation 1) and later sends another outbound SMS to the same user from Phone Number B (Conversation 2). When the user replies, the inbound message may be routed back to Conversation 1 instead of Conversation 2.

 

Product

Twilio Conversations Classic

 

Resolution

Twilio Conversations maps inbound SMS messages to conversation threads based on unique participant bindings and active conversation states. If an account manages multiple business units or workflows using separate phone numbers, improper participant lifecycle management can cause replies to cross over:

  1. Understand Inbound Routing and Participant Bindings:
    • Twilio Conversations maps an inbound SMS using the participant pairing of the sender's phone number (Address) and the Twilio phone number (ProxyAddress).
    • If a non-chat participant (SMS participant) exists in an active conversation, any incoming message from that customer to that proxy address will route to that active conversation thread.
    • If participant configurations or conversation state transitions are not isolated, subsequent interactions can bind to pre-existing, open conversations.
  2. Close or Archive Inactive Conversations:
    • A single SMS participant should not remain bound to multiple open, simultaneous conversations if deterministic routing is required.
    • Update the status of completed conversations to closed or remove the SMS participant when a conversation session ends. Once a conversation is closed, incoming messages can trigger auto-creation rules or be mapped to new active threads according to your routing logic.
  3. Isolate Workflows with Scoped Services or Subaccounts:
    • Twilio Conversations Services: By default, all conversations belong to the default service. Create distinct Conversations Services (ISxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) to logically isolate different organizations or brands. Conversations and participants within one Service cannot interact or cross over with another.
    • Subaccounts: If different organizations must maintain completely independent configurations, numbers, webhooks, and routing rules, separate them across distinct Twilio Subaccounts under the primary parent account.
  4. Verify Messaging Service & Webhook Configurations:
    • Ensure that phone numbers assigned to separate workflows are not grouped into the same Messaging Service pool or bound to shared Conversations webhooks that process inbound messages identically.

 

Additional Information

Have more questions? Submit a request
Powered by Zendesk