Menu

Expand
Rate this page:

Configure pre-agent workflow with Studio

Flex uses Twilio Studio to implement pre-agent workflows. Refer to the Core Concepts: Studio chapter for a general introduction.

Triggers

The Studio Flow is executed when one of the Trigger events happens. For Flex, the most relevant triggers are Incoming Message, Incoming Call and Incoming Conversation.

StudioTrigger

To configure a Phone Number to trigger your desired Studio Flow, head to Phone Numbers > Manage > Active numbers, choose the respective number, and set the Voice or Messaging trigger to call the respective Studio Flow.

Send to Flex widget

The Send to Flex widget will create a TaskRouter Task for the incoming communication, and execute a TaskRouter Workflow to route it to an agent.

For the Incoming Call trigger, Send to Flex will enqueue the Voice and the caller will hear hold music while waiting for an agent to respond.

In Flex Conversations (which requires Flex UI 2.0), a new Trigger Incoming Conversation has been added. In this case, Send to Flex will create a new Interaction using the /Interactions endpoint, which then creates a new Task for assignment to a Worker.

Optionally, you can declare Task attributes, priority, timeout, and a hold music TwiML URL. To learn more, see Send to Flex.

Building a pre-agent workflow

Use Studio Flows to build out any logic that needs to execute before a Task is created and routed to an agent. Typical use cases include IVR, chat bots, and call deflection. Some useful resources include:

Studio REST API v2

The Studio REST API v2 allows you to programmatically create, publish, and manage your Studio Flows without having to log in to the Twilio Console. Studio Flows are defined using a JSON schema to configure the widgets and the functionality. The REST API also provides methods to trigger an outbound call or message, as well as for reporting on Executions that have completed.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

        
        
        

        Thank you for your feedback!

        Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more