Are you experiencing issues with sending or receiving Conversation messages in Twilio Flex? Your first step should be to check our FAQ with Flex Conversations, Flex Conversations Best Practice, and Flex Conversations Known Issues guides. If those guides did not help, please try the following general troubleshooting steps below.
- Twilio Console
- Phone Number Configuration
- Conversation Service Configuration
- Studio Flow Trigger
- TaskRouter Reservations
- Still Having Trouble?
When a conversation is received/sent do you receive an error in the Twilio Console? Start with the specific error and review Twilio's error and warning code dictionary for recommended solutions.
While Flex Conversations is Conversations, part of it still uses Programmable Messaging before it passes your message to Conversations. You can view Flex Conversations logs in part of the Messaging Console Logs page. After going through the messaging logs your conversation proceeds on to the Conversation Console Logs page.
Phone Number Configuration
- Look at the configured number in the Phone Numbers Active Numbers Page.
- Follow the Flex Conversation SMS guide and verify your number matches our recommended guidance.
We have now verified the number is configured correctly but not showing up in conversations? Let us make sure you deleted the Flex Flow Address and created a Flex Interaction Address in the Flex Console -> Manage -> Messaging page. Follow the steps to migrate from Flex Legacy Messaging to Flex Conversations can be found here.
Conversation Service Configuration
- Look at the configured defaults in the Conversation -> Manage -> Defaults page.
- Look at the configured service in the Conversation -> Manage -> Services Page.
- By default Flex names your conversation service "Flex Conversation Service" but you may have renamed it something different. Please select it to follow along on the next steps.
- Under Conversation -> Manage -> Service Configuration compare the Flex Conversation Roles guide to your configuration. Does everything match for defaults? What about under Conversation -> Manage -> Service Configuration -> Roles and Permission service page?
- Do you make use of Pre-Action Webhooks? Make sure your webook responds to twilio with a 200 http status code otherwise the conversation orchestration will stop awaiting a 200 from your webook.
Now that the configuration for Conversation looks good. Let us inspect if any conversation is created from inbound messages by going in your Twilio console to Conversations -> Manage -> Service Configuration -> Conversations. Do you see any conversations listed on that page?
Any message to a Conversations address that is outside of a conversation should cause the auto-create functionality to create a new conversation, add the sender as a participant, and append the message to the newly-created conversation. To find if the sender has an active conversation, use theConversation Participant resource to find the active conversation. If there is no active conversation for this participant.
Studio Flow Trigger
All Studio interactions are captured in a Flow’s Execution Logs. Find “Messaging Flow” (the default flow created for Flex, or the Chat Flow if you're debugging a web chat interaction) and navigate to Studio logs to see the execution associated with the failed message.
You can inspect error messages in each step of the Studio flow. HTTP Requests and Function Widgets frequently return error codes that can terminate the entire execution.
If you find the conversation session is coming in through the "Incoming Message" studio trigger instead of "Incoming Conversation" look to make sure you don't have an old Flex Flow configured for the number by querying for a list of your Flex Flows. If you have a list of Flex Flows compare the "contact_Identity" with your Flex Conversation number. If they match that means that number is on the legacy Flex Flow and should be removed and added as a Flex Interaction Address in the Flex Console -> Manage -> Messaging page.
Was studio able to successfully execute the SendToFlex widget? If you see a failedToEnqueue error message in your studio flow, check your Taskrouter Workflow and make sure your TaskRouter Expression allows a task to be created. Some expressions when returning false with no alternative queues will fail to create a task. To test this you can create a task from the API with the same attributes as your Conversation Studio Flow.
Is the task being created but not getting assigned to a worker? Check your TaskRouter expressions to verify a conversation task gets assigned to the right task queue and that the worker is configured to handle the task channel capacity.
After reviewing TaskRouter expressions let's verify that The worker is able to accept the conversation. When an Agent accepts the Reservation related to a Task, the agent user will be added as a Participant to the conversation. The role linked with that Agent user is “agent”.
Please do not modify the standard permissions of this role (sendMessage,sendMediaMessage,leaveConversation,editConversationAttributes,editOwnMessage,editOwnMessageAttributes,deleteOwnMessage).
Any Messages sent by the Agent should be visible under the Phone Number / Messaging Logs. Optionally, you can filter messages by Outgoing Messages to more easily find the agent’s message.
Still Having Trouble?
If you can rule out all the above issues, Twilio's Support team can help investigate what went wrong with delivering your message. Please open a support request with the following 3 or more Conversation SIDs (CHxxxx) from SMS logs that occurred with the last 24 hours and that show these same issues.