Using TaskRouter with Twilio Flex

January 04, 2019
Written by

Using TaskRouter with Twilio Flex
  • Workflows are meant to be simple and human readable.
  • Task queues should represent a natural segmentation amongst agents.
  • New TaskRouter features offer freedom of choice and scalability.
  • TaskRouter will continue to scale alongside you as your Flex deployment grows.

Imagine this, if you will. Your internet connection has mysteriously stopped working at home. You’re joining an important work meeting by video in 30 minutes, and none of the usual fixes are working. Your last resort is to call your provider for help. But instead of being connected to technical support, you get the sales department.

As you frustratingly try to explain that you’ve already purchased the company’s internet package, it’s just not working so well right now, the minutes until your big meeting are ticking by.

Perhaps you’ve experienced a scenario like this in real life, and you don’t want to put your customers through it when they reach your contact center. If so, this session from SIGNAL is for you.

In this session, TaskRouter Software Engineer Wanjun Li talks about how to use TaskRouter with Twilio Flex.

Beyond Routing

As the name suggests, TaskRouter is all about routing. But that’s not all TaskRouter does. There are two other components in TaskRouter that you may not know about. The first is the orchestration layer. When you’re receiving a phone call or text message to your Twilio number, TaskRouter takes care of that integration for you by entering the data into a voice stack or messaging stack. TaskRouter is aware of everything that’s happening in your contact center at all times.

You may also not know about the TaskRouter events and statistics API available through Twilio’s postflight service. With Twilio’s recent addition to the family, Ytica, you can now use Flex WFO to get insight into how your contact center is performing.

At its core, TaskRouter is a skills-based routing engine. A task describes an item of work, which can be a phone call, text message, CRM lead, or whatever you want it to be. That task is customizable through a JSON property with a set attributes such as skills required, skill level required, and priority. Tasks can come in on any channel—voice call, SMS, support ticket, CRM lead, machine data, and more. Everything can be queued, routed, and assigned through the same unified business logic.

TaskRouter Workflows

TaskRouter may be the beating heart of a contact center but the Workflow is the brain. The Workflow inspects the task to understand how to route it, based on task attributes assigned at creation. Sales tasks go to the sales department, support tasks go to support, and so on.

While TaskRouter is at the center of Twilio Flex, the Workflow is the brain.

Workflow objects don’t just route and forget, but monitor tasks as they’re in the queue. If a task exceeds a defined timeout period without being handled, the Workflow can define how to escalate the task.

Workers are dynamically matched to queues based on the skills they have and the skills each queue needs to handle those task types. Once a worker is available, the highest priority, longest waiting task will be assigned to the worker. Allocation can be done over websocket or webhook.

How to Not Mess Up Task Routing as You Scale

Workflows can get pretty complex! It’s important to get these right as your organization scales. We chose TaskRouter as the routing engine for Twilio Flex, which can handle thousands of agents in one instance, because of its powerful ability to dynamically filter workers, optimize and prioritize tasks, and strategize for workers taking tasks on multiple channels concurrently.

Follow these two guiding principles as your organization scales:

  • Task queues should represent a natural segmentation amongst agents.
  • Workflows are meant to be simple and human readable.

If you’re building something that you don’t even understand, you’ll most likely be debugging it down the road.

See how this works live at minute 14:25 in the video.

New TaskRouter Features

After the demo, Li unveiled some exciting new TaskRouter features for Flex:

Customizable Task Channels

Create your own task channels, differentiating however makes sense for your contact center and allowing for multitasking at its finest.

New and Improved Activity Names

In a multitask world, it doesn’t make sense for your agent to change activity names when they are actually still handling more tasks. Now there are more naming options.

Call Monitoring

Supervise calls without letting your worker know you’re there or whisper to them without disturbing the customers experience.

Better Task Transfers

Now TaskRouter supports all the needed scenarios:

  • Cold transfer to a Worker
  • Cold transfer to a TaskQueue
  • Warm transfer to a Worker
  • Warm transfer to a TaskQueue

See a demo of this new task transfer process and call monitoring live at 23:50.

Wondering how they built it? Out of the box, Flex provides you with tons of APIs that are ready to use. Autopilot detects intent of the trigger and then creates a task in TaskRouter with a widget. From there, the task is routed into the TaskRouter engine and routed to a worker.

Curious to know what else you can create with Flex? Start prototyping now for free, or watch a demo to learn how to get started with Flex in minutes.    


Learn more:

twilio.com/taskrouter

Read the docs