Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

How to build an IVR with Twilio Studio


Twilio Studio is a visual, drag-and-drop editor for creating applications. It works by dragging and dropping Widgets that represent parts of the Twilio API. Stitching these Widgets together creates an application - for example, your very own IVR (Interactive Voice Response) system, with no coding required.

If you've ever said or pressed "1" on your phone to connect to an agent at a call center, you've used an IVR system. An IVR is an interactive phone menu that lets callers navigate by voice or keypress to route calls to a different phone number.

In this tutorial, you'll learn how to create a basic IVR system that gathers key presses from callers and connects their calls to one of two phone numbers (Sales and Support). You will also learn how to accept and route calls based on voice input so that users can use either their voice or keypad.

(information)

Info

New to Twilio Studio? We recommend you check out our Getting Started guide for working with Twilio Studio to familiarize yourself with Studio mechanics before you dig into this tutorial.


Prerequisites

prerequisites page anchor

Before you get started, you'll need:


You'll start by creating a brand-new Studio Flow for your IVR system. All the logic and routing for your IVR will exist in this Flow.

Create a new Flow from scratch using the Twilio Console. If this is your first time working with Studio, you can see how to create a Flow here. You may wish to name this Flow something like "IVR Tutorial."


The first thing you'll need your Studio-powered application to do is gather information from your callers.

Look in the Widget Library for the Gather Input on Call Widget. Click on this Widget and drag it to your Canvas.

You'll need to connect your Trigger (Start) Widget to this Widget, so click on the red dot underneath Incoming Call and drag it to connect it to your new Widget. This will create a line between the two Widgets and tells your Studio application what to do with incoming calls.

Configure the Gather Input on Call Widget

configure-the-gather-input-on-call-widget page anchor

Click on the Widget you just added to your Canvas. Inside the Gather Input on Call Widget's configuration menu (on the right side of the Canvas), you can rename this Widget to something more meaningful, like greet_caller

Next, you can tell your program what to say to callers. Double-check that the Say or Play a Message field in the Widget configuration is set to "Say a message" - this lets you write whatever message you'd like to have read to your callers. For this tutorial, write something in the text field like "Hello, how can we direct your call? Press 1 for Sales, or say Sales. To reach Support, press 2 or say Support."

The Gather Input on Call Widget expects the user to press keys or say something after they hear this message.

Stop gathering information

stop-gathering-information page anchor

You probably don't want to make your IVR program wait after a user has given their keypress response, so scroll down in the Widget settings to the section for Stop gathering on keypress?

Make sure that "YES" is selected, and enter "1" in the field for Stop gathering after __ digits. This will tell your Studio-powered IVR to move on to the next step after our user has entered their response.

Form fields to tell your gather_input widget to stop gathering after 1 keystroke. We see the Config tab selected, 'Stop gathering after keypress' followed by a blue, toggle-able box turned to 'Yes', and Stop gathering after is set to 1.Rate this page:

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.