Flex allows your agents to initiate conversations with your customers via any Twilio Messaging Channel, including SMS, WhatsApp, Facebook Messenger, and LINE.
Currently, outbound messages require additional development work. This page outlines some of the work you'll need to do for the backend, but outbound messages will also require a Flex UI Plugin to expose the functionality in the Flex interface.
There are two ways to handle task creation for outbound messages: when the agent messages the customer (immediately) or when the customer responds to the outbound message (delayed).
Outbound messages require a Flex Flow
sms, whatsapp, facebook, line or custom.
First, define an outbound Flow Flow with an Integration type of
task. You only need to do this once. In this example, we add Task Attributes that will allow us to route the task to a specific agent (using the targetWorker Workflow expression.)
Now that you have a channel, you'll want to associate it with a Proxy Session. Sessions offer a useful layer of state and metadata that Flex uses to ensure that your customers' messages don't get scrambled up on their way to a messages.
Your agent can directly message into the Chat interface, and messages are routed to the customer on their Twilio Channel.
Make sure you set up an inbound message handler, and that it's configured to create a Task. This will handle the customer's response to the outbound message.
Create a channel that uses the Flex Flow for outbound messages.
You can add a Chat message to the Agent's Chat Channel to keep them informed about any automated outbound messages. Any message that is only in the chat channel will not be visible to your customer until you create an outbound request with the messaging API.
Note that the Chat Channel SID comes from the channel you created in the first step of creating an outbound message, and begins with