Menu

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?

Set up an IVR with Studio

Route callers to a human only when it’s completely necessary by setting up an intelligent IVR with Twilio Studio and Flex. Automated messages can address simple questions such as business hours or location, freeing up your agents to handle more specific inquiries.

Prerequisites

You’ll need a few things before you can get started:

  • A Twilio account
  • An instance of Twilio Flex

Find the Voice IVR flow

Navigate to the Studio section of the Twilio console and select the Voice IVR flow.

Studio Voice IVR Flow

Add widgets to build an IVR

You’ll notice that the canvas comes with two widgets already in place -- the Trigger widget, which kicks off our Flow when the trigger we specify is fired, and the Send to Flex widget. In this case, our trigger is going to be an Incoming Call. The Send to Flex widget should be preconfigured to route calls to your Flex instance.

Default Flex IVR Flow

In order to build our IVR, we're going to disconnect these widgets and add a few in between. These new widgets will comprise the branches of our phone menu.

Drag a Gather Input On Call widget onto the canvas and connect the Incoming Call trigger to the dot in the upper left corner of the widget. Type the message you’d like to play for your users:

(IVR) Gather widget

Thank you for calling. For our business hours, press 1. For our location, press 2. To speak with a team member, press 3.

We’re only going to accept keypress inputs in this sample, so let’s rename the widget to gather_digits. Save the widget.

Next, drag a Split Based On... widget onto the canvas and connect it to the dangling dot under “User Pressed Keys” in your Gather widget. In the widget configuration panel (on the right sidebar), select the Digits response from the Gather Input on Call widget as your variable to test.

Split Based On... digits

The next step is to configure the branches of our IVR. Tap the red New at the bottom of the Split widget to reveal the Transition On... dropdown menu. Select Condition Matches to create a new Transition.

split condition matches

In the right sidebar, find the new Transition that you just created, and select Equal To from the dropdown. We’re going to set this value to 1, to hear our office’s business hours. Save the new transition and it will appear on the widget.

Drag a Say/Play widget onto the canvas, and type in the message you’d like to play when a caller presses 1. In this case, we’re sharing our regular business hours.

business hours widget

Repeat the steps above to set another Say/Play widget to a keypress of 2, and enter the message you’d like to play. In this sample, we’re playing a message about our office’s address.

businesshoursandlocationwidget.png

Send other calls to Flex

Now, let’s handle the “speak with a team member” case. In order to enqueue a call for Flex, we’ll reconnect the Send to Flex widget that came with the flow. Connect it to the “No Condition Matches” dangling dot from the Split widget.

Your final canvas should look something like this:

IVR for Flex Voice

Publish your flow, and it will be live on your Flex phone number.

Try your IVR

Now it’s time to test it out! Dial your Twilio number, and listen for the initial menu prompt. Select the option of your choosing from the IVR, and watch along in Flex as callers who press 3 are routed to your agent!

inbound Flex call




Jennifer Aprahamian

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.