Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Twilio Flex Quickstart (Advanced): Multiple Users and Skill-based Routing

In just a few minutes, you can set up basic skill-based conversation routing to multiple queues in your Twilio Flex based Call Center.

This Quickstart takes you through adding an additional agent to your call center, and then assigning different skills to the two agents. We'll modify an IVR designed in Twilio Studio to pass conversations into two queues defined by Twilio TaskRouter.

At the end of this guide, you'll have a contact center with an IVR that can answer common user questions, pass callers into a "support" queue, pass callers into a "sales" queue, and maintain an "everyone" queue. The two specialized queues will only target an agent with the appropriate sales or support skill.

This Quickstart builds upon the IVR from the Flex Basics Quickstart. You should complete that Quickstart first.

In this Quickstart, we will:

  1. Add a second administrative user to your Flex Instance
  2. Assign skills to both users
  3. Create two queues in TaskRouter corresponding to the skills
  4. Modify an IVR to pass callers into the two queues.

In production, you should use SSO User Signin to manage Flex agents. If you add additional administrative users, they will have full access to instance and billing settings – be cautious with who you add as an administrator.

Prefer other types of content? See our collection of Flex video tutorials and demos.

Let's talk about skills.

Again, this Quickstart builds upon the IVR from the Flex Basics Quickstart. Please finish it first if you haven't yet, then return here.

In this Quickstart we'll add a new Administrative user. Note that while you can do this on a production instance, this user will have access to all instance settings, customizations, and billing preferences. However, this is the quickest way to add a second user for testing purposes (or to add legitimate administrators).

In production, you should do your user management through an SSO integration.

  1. Navigate to the Console Users section in the console
  2. Add a new user by click the red plus ('+') button. Grant only the Administrator role:
    Add an Administrator

    Note: for some mail providers, you can add a '+' in an email address to create a virtual address, as we've demonstrated above. You can also complete this Quickstart with a teammate.
  3. Verify the new user in the email received
  4. In a private window, incognito window, or second browser, log into Twilio with the second user. Or, if you're completing this with a teammate, have them log into the instance
  5. Launch your Flex Instance with the second user

At this point, you should have two users logged into your hosted Flex Instance - the original user and the new administrator. If you've come this far, congrats – it's time to tag our "agents" with skills!

Let's hand out some credentials.

Assign skills to your Flex Agents

Skills are very smiliar to tags on a piece of content or email - in Flex, they allow you to quickly sort your users. For this Quickstart, we're going to specify sales and support skills but for your contact center you might have hundreds of different skill types - as many as you need.

Let's create two skills and assign them to our users.

  1. Navigate to the Flex Admin pane from your original administrator's Flex Instance window
  2. Under the Assignment heading, select the Skills button:
    Assign Flex skills
  3. Using the entry on the left hand side labeled 'Add New Skill', add a sales skill and a support skill:
    Flex skill type definition
  4. On the teams screen, change the pulldown menu to 'All Agents'
  5. Click either agent and in the dialog click the sales skill. Hit the blue plus ('+') to add it to the user, then 'Save'
    user_skills_flex.png
  6. Click the other agent agent and in the dialog click the support skill. Hit the blue plus ('+') button then 'Save'

Nice – you now have skills assigned to both your agents.

Next up, we need to create two queues, one for each skill. Depending on caller intent, we're going to place calls into either a sales queue or a support queue. We'll also maintain a catch all "Everyone" queue.

Hurry up and queue!

Create call queues in Twilio Flex using TaskRouter

TaskRouter is a very powerful tool for routing conversations in a call center. We're barely going to scratch the surface with this Quickstart - we'll create two new call queues, with only agents tagged with one tag allowed in either: sales and support.

  1. Navigate back to the Flex Admin pane from your original user's Flex Instance window
  2. Under the Assignment heading, select the Routing button:
    assignment_routing.png
  3. In the TaskRouter console, click the 'Flex Task Assignment' workspace, then click 'View all TaskQueues'
  4. Create a new Queue
  5. Enter the taskqueue name sales and the queue expression (routing.skills HAS 'sales') then click 'Save':
    Sales TaskQueue
  6. Create a second taskqueue named support with the queue expression (routing.skills HAS 'support') and click 'Save'
    (Leave the 'Everyone' queue alone - that's our catch-all queue)
  7. On the left panel, click on 'Workflows'. Click the red plus ('+') to create a new Workflow
  8. Name this workflow Assign to Sales. Scroll down and click the red 'Add a Filter' button
  9. Under the Matching Workers heading, click to edit the Queue field. Set it to 'sales' and hit the checkbox to save it:
    worker_match_routing.png
  10. Click the red 'Create' button
  11. Add another Workflow named Assign to Support. Edit the Queue under Matching Workers to go to 'support' then 'Create'

These were some pretty basic steps, but as you can see from this exploration TaskRouter is a very powerful task management routing system. In your production contact center, you can set up very intricate workflows using a combination of Skills, Workflows, and TaskQueues.

For now, this will suffice. Let's modify the IVR from the Basic Quickstart to route calls to either sales or support.

Let's modify our IVR

Modify an IVR to route calls based on agent skills

Once again, this IVR modification comes on top of the IVR built in the Basic Quickstart. If you recall, that IVR can automatically field questions about your business location and hours. Other messages drop into the main agent queue.

We're going to modify it so a caller is prompted to choose between sales and support. When they choose, they'll be routed to a queue where only agents with that skill tag are able to respond. They can also choose the 'general' queue, which we have set to everyone.

  1. Navigate to the Studio console and click the Voice IVR
  2. Drag a new Enqueue Call widget to the canvas
  3. Set the Name to SalesCall, set Task Router Workspace to Flex Task Assignment, and set Task Router Workflow to Assign to Sales:
    enqueue_call_widget.png
  4. Create a second Enqueue Call widget for support. Set the above to SupportCall, Task Router Workspace, and Assign to Support, respectively
  5. Click the Split Widget you designed which previously matched with 1, 2, and everything
  6. Add new transitions for Equal to 3 and Equal to 4. Transition to your SalesCall and SupportCall widgets, respectively
  7. Modify your Gather Input on Call widget. You can keep options 1 and 2 as is, but change the end to something approximating "To talk to sales, press 3. To talk to support, press 4. For all other questions, press 5."
  8. 'Publish' the flow

Ready for the payoff? With both Flex Instances open, dial into your contact center. You'll find that you now have new options; you can choose to talk to sales or talk to support. If you choose one of those, you'll only be routed to the agent tagged with the respective skill! You also have a catch-all option in '5' where you are dropped into the general queue.

Pretty cool! Your contact center is starting to come together.

Amazing, this is an excellent contact center! What's next?

Agent skills, conversation routing, and separate queues in Twilio Flex

You've come a long way with the basic Quickstart and this follow-on advanced Quickstart. You built up an IVR which reduces agent burden with automated responses to common questions. You created three call queues, one catch-all queue, plus specialized queues for sales and support.

And this is just the beginning - armed with these skills, you'll be able to customize your contact center to your heart's content, before having to modify behavior using React.

Thanks for following along in this Quickstart, we can't wait to see where you go with Flex!

Where to next?

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 browsing the Twilio tag on Stack Overflow.