Developing an IVR can immediately be a daunting task if you have not had any experience doing so before. To simplify it, Twilio.com came up with a solution that takes the complicated choices in technology away from the project. You will immediately start to think about your call system instead of which text-to-speech solution should we go with, which software pbx technology to implement, how much will our phone costs be, can we afford it? Wait, what about multi-lingual call handling? Don’t get me wrong, I like to build systems, asterisk is quite fun to get dirty with, but you can’t do both and have immediate results.

A glimpse at a call diagram
<?xml version="1.0" encoding="UTF-8"?><Response><Say>Welcome to Hello IVR.</Say><Redirect>http://example.com/voice/hello/</Redirect></Response>- Download this code: welcome.xml
Menu’s should be simple, they should also conform to the same usage standard through every call screen.
Some common dial keys that have been recommended by others are:
- * – Repeat
- # – Go back
- 7 – Previous
- 9 – Next
- 0 – Operator
Also, when asking for user selection, keep the number of choices to 5. Have them enter 9 for more options. With menu’s always make sure to gather input at anytime to allow quick navigation for experienced phone users. Here’s an example of a call menu with TwiML.
<?xml version="1.0" encoding="UTF-8"?><Response><Gather
numDigits="1"method="GET"><Say>Sales, press 1.</Say><Say>Support, press 2.</Say><Say>Frontdesk, press 3.</Say><Say>For more options, press 9.</Say><Say>For the operator, press 0.</Say><Say>To hear the options again, please stay on the line.</Say></Gather><Pause /><Redirect>http://example.com/voice/menu/</Redirect></Response>- Download this code: menu.xml
When you want to build a search interface into your IVR, you need to make it simple, but also make sure you accept all input and handle all operations normally. People really want to press 0 when it doesn't work. Additionally, you need to keep track of the number of search failures and offer a solution. In most cases, a dial out to a human will suffice. In the case of no man power, I recommend a voicemail using TwiML's record tags. Here's an example search interface:
<?xml version="1.0" encoding="UTF-8"?><Response><Gather
method="GET"numDigits="3"finishOnKey=""timeout="5"action="http://example.com/voice/search/?failures=0"><Say>Please enter the first three letters of what you are looking for.</Say></Gather><Redirect>http://search.earth911.com/voice/what/?failures=0</Redirect></Response>- Download this code: search.xml
When you have too much data, too little structure, and need to tell the phone user a book, don't. Give them options, a details menu is a good thing. If you provide information such as phone numbers, add an option to redirect the call. If you have related information or you are nested one level deep in a list, offer the option to go directly to the next item. It's important to provide this level of navigation as it will save them time and you money on your minutes.
Voicemail systems are not complicated, but are difficult to maintain. Fortunately, for us we don't have to worry about that, we just want to send the recorded message to the right dept. Handle your voicemail successes & failures accordingly. Have the user try again if the voicemail fails and always provide a fail-safe redirect so that they can try something else if they can't leave a voicemail at that time.
<?xml version="1.0" encoding="UTF-8"?><Response><Say>Leave your name, company, and your phone number to best reach you.</Say><Say>Press the star key when finished.</Say><Record
action="http://example.com/voice/voicemail/"method="GET"maxLength="20"finishOnKey="*"/><Say>Try again. Press the star key when finished.</Say><Record
action="http://example.com/voice/voicemail/"method="GET"maxLength="20"finishOnKey="*"/><Redirect>http://example.com/voice/</Redirect></Response>- Download this code: voicemail.xml
Next up, I'll talk about Robo-Calling!
Hi Adam,
Great post, I love your clean IVR design and thought process! A couple notes and ideas that I thought I’d offer:
1. In menu.xml, you don’t need separate blocks for each option, you could just as easily use For sales, press1. For service, press 2…. Your solution works as well, so maybe it’s just personal preference :)
2. If you have multiple exit paths, and keeping track of the failure-counter in the URLs is difficult, you can keep track of failures in a cookie instead! Twilio is a well-behaved HTTP client, so you can use cookies to track data across many pages. You can even use PHP sessions, etc.
Again, great post! Keep the awesome ideas coming.
-jeff