In just a few minutes, you can set up basic skills-based conversation routing to multiple queues in your Twilio Flex contact center.
This quickstart takes you through adding an administrator to your contact 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:
- Add a second administrative user to your Flex Instance
- Assign skills to both users
- Create two queues in TaskRouter corresponding to the skills
- 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 administrators using the Console, they will get full access to your Flex instance and billing preferences. Be cautious with who you add as an administrator.
Prefer other types of content? See our collection of Flex video tutorials and demos.
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 Administrator. 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 manage your user identities through an SSO integration.
- Navigate to the Users section in the Twilio Console.
- Add a new user by clicking the red plus ('+') button. Grant only the Administrator role:
Note: For some mail providers, you can add a '+' in an email address to create a virtual address, as we've demonstrated in this example. You can also complete this quickstart with a teammate.
- Click on the invite email link to verify the new user
- 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
- 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!
Skills are very similar to tags or labels 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 your contact center might have hundreds of different skill types.
Let's create two skills and assign them to our users:
- Navigate to the Flex Admin pane from your original administrator's Flex Instance window
- Under the Assignment heading, select the Skills button:
- Using the entry on the left hand side labeled 'Add New Skill', add a
salesskill and a
- On the Teams page (https://flex.twilio.com/teams), change the pulldown menu to 'All Agents'
- Click either agent and select
salesfrom the dropdown list. Hit the blue plus ('+') to add it to the user, then click Save
- Click the other agent agent and select
supportfrom the dropdown list. Hit the blue plus ('+') button then click 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.
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 to handle two types of calls based on the skills we've previously created and assigned to our agents: sales and support.
- Navigate back to the Flex Admin pane from your original user's Flex Instance window
- Under the Assignment heading, select the Routing button:
- In the TaskRouter console, click the 'Flex Task Assignment' workspace, then click 'View all TaskQueues'
- Create a new Queue
- Enter the taskqueue name
salesand the queue expression
(routing.skills HAS 'sales')then click 'Save':
- Create a second TaskQueue named
supportwith the queue expression
(routing.skills HAS 'support')and click 'Save'
(Leave the 'Everyone' queue alone - that's our catch-all queue)
- On the left panel, click on 'Workflows'. Click the red plus ('+') to create a new Workflow
- Name this workflow
Assign to Sales. Scroll down and click the red 'Add a Filter' button
- Under the Matching Workers heading, click to edit the Queue field. Set it to 'sales' and hit the checkbox to save it:
- Click the red 'Create' button
- 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.
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 regarding 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.
- Navigate to the Studio console and click the
- Drag a new Enqueue Call widget to the canvas
- Set the Name to
SalesCall, set Task Router Workspace to
Flex Task Assignment, and set Task Router Workflow to
Assign to Sales:
- Create a second Enqueue Call widget for support. Set the above to
Task Router Workspace, and
Assign to Support, respectively
- Click the Split Widget you designed which previously matched with 1, 2, and everything
- Add new transitions for
Equal to 3and
Equal to 4. Transition to your
- 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."
- 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.
You've come a long way with the basic quickstart and this follow-up advanced quickstart. You built 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 modifying Flex behavior using React.
Thanks for following along in this quickstart, we can't wait to see where you go with Flex!
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。