Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Flex Conversations


Flex Conversations requires Flex UI 2.x.x. To check which version of the Flex UI you are running, see Flex UI Versioning. If you're running 1.x.x, follow the migration guide.

Flex Conversations gives your contact center the digital channel capabilities for both customer-initiated (commonly referred to as inbound flows) and business-initiated (commonly referred to as outbound flows) interactions, and provides the orchestration layer for managing and processing those customer interactions. Since it is based on the single Twilio Conversations primitive, the developer experience is improved and the complexity of building async channel workflows is reduced. For more details on the benefits of building on Flex Conversations, see the FAQ page.

While your customers may interact with the contact center using a variety of messaging channels, your agent always responds using the standard Flex agent desktop chat interface.

Under the hood, Flex uses Twilio products to achieve this. These products include:

  • Twilio Conversations for session management and chat channels
  • Messaging service for SMS/MMS and WhatsApp channels
  • The Interactions API for managing the communication between your customer and contact center
  • Twilio Studio for developing Chatbots and routing incoming Conversations

While Conversations and Messaging Services are responsible for providing the ability to send and receive messages over different channels, the Interactions API gives you the ability to orchestrate agent routing and the ability to add and remove agents to and from a given conversation.

The Flex /Interactions API endpoint supports the following channel types:

  • SMS/MMS
  • WhatsApp
  • Chat
  • Facebook Messenger (Public Beta)
  • Google Business Messages (Public Beta)

The following sequence diagram illustrates an example of how Flex handles an inbound SMS contact:

diagram on how to handle inbound sms contact.

When you create an interaction, you specify the Twilio Conversation to bind to and the TaskRouter workspace to use for routing. You can optionally declare additional routing attributes according to your interaction type. This will result in a reservation which once accepted, will automatically add that agent to the conversation.

For more information about the Interactions API, please refer to the API documentation.


Architectural Overview

architectural-overview page anchor

Flex allows agents to work from a single interface even as customers communicate over different channels. While the user experience feels simple, people building contact centers understand the underlying complexity in creating this functionality. This page offers a high-level understanding of how Flex manages omnichannel two-way communications. With Twilio Conversations and the Interactions API, you can create inbound and outbound conversations with your customers. Your agents will have more granular control on the lifecycle of a conversation and can proactively reach out to your customers. For detailed examples and use cases, see the Interactions API documentation.

Flex Conversations requires:


Inbound flow from a messaging channel

inbound-flow-from-a-messaging-channel page anchor
high level inbound flow from a messaging channel.

The Conversations Service will create a new Conversation as per the Address configuration for your Flex phone number. In the diagram above, it was configured to invoke a Studio Flow. Once a conversation arrives at Studio, you can design your bespoke flow to handle this conversation. If you decide to send to Flex, use the Send To Flex widget. This widget will call the Interactions endpoint which in turn creates a task and route it to the agent. Learn more about how omnichannel inbound messages work.


Outbound flow on a messaging channel (immediate task creation)

outbound-flow-on-a-messaging-channel-immediate-task-creation page anchor
Outbound flow on a messaging channel (immediate task creation).

In this scenario, the agent clicks on start conversation through a Flex plugin or a third-party application. This invokes the Interactions API to create an outbound channel and add the customer to it. Once that orchestration is complete, the agent is able to send and receive messages from the customer.


Outbound flow on a messaging channel (task creation on customer response)

outbound-flow-on-a-messaging-channel-task-creation-on-customer-response page anchor
Outbound flow on a messaging channel (task creation on customer response).

This is similar to the previous outbound flow except in this case, you need tocreate the conversation first and add your scoped webhook integration to handle the reply. Once you've done that, you can send a message to the participant. When the participant replies, the scoped webhook will invoke your integration. When your integration is invoked, you can auto-reply to the customer and then forward to Flex by using the Interactions API.

Learn more about how you can send outbound messages with Flex Conversations.


Rate this page: