Skip to contentSkip to navigationSkip to topbar
On 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

triggers page anchor

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(link takes you to an external page), choose the respective number, and set the Voice or Messaging trigger to call the respective Studio Flow.


Use the Unified Profiles Studio integration for intelligent routing

use-the-unified-profiles-studio-integration-for-intelligent-routing page anchor

You can use the Search for a Profile Studio widget for personalized pre-agent handling and routing. The Search for a Profile widget uses Unified Profiles capabilities to provide you with real-time profile data for each customer that calls or messages your business.

With the Search for a Profile widget, you can look up customer profiles in Twilio Segment by identifier attribute, such as phone number or email address. If a profile is found, the widget returns the profile SID and all the mapped traits for that profile, including custom and computed traits.

This contextual data provides a better understanding of each customer, which enables Flex to use your preferred pre-agent handling or direct the customer to the most relevant TaskRouter workflow for personalized routing.

A Unified Profiles Studio integration flow for intelligent routing.

Intelligent routing enables use cases that include:

  • Personalizing virtual agent interactions with real-time customer data for deflection or contextual handoff to an agent
  • Intelligently routing customers to the correct queue based on their preferred language
  • Personalizing self-service experiences that reduce escalations to human agents
  • Using dynamic routing and IVR menus based on computed and predictive traits
  • Using a specific profile trait for VIP customers and routing them to a VIP queue each time they call in

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

building-a-pre-agent-workflow page anchor

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:


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.

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.