Writing an IVR Script
Back to Articles
API Reference IVR Telecom Call Centers Scripts Scripting

Writing an IVR Script

March 15, 2019 2 min
Aivis Olsteins

Aivis Olsteins

The obvious advantage of Interactive Voice Response (IVR) system is its flexibility. They can be adapted for specific requirement, be it a call center, auto attendant, information service or anything else. To achieve that, IVR systems use scripts - small programs which are meant to automate some task. They are attached to the phone lines of incoming calls in CTI systems, and take over control whenever call arrives.

Traditionally, when touch tone (DTMF) was the main (or wven they only) way for user to interact with the system, the general pattern of IVR script was a tree-like multilevel menu: 

{$image1}

The logic of such a script is very simple:

  1. At the start system plays welcome message along with list of choices and promts user to make a selection;
  2. User presses the key;
  3. System moves down the branch, plays next message, lists choices and promts user to make a selection;
  4. User presses the key;
  5. Repeat steps 3 to 4 until goal is achieved.

This structure is easy to understand and serves most of the simple cases. It can even have option to move back up the tree by pressing some predefined key.

However, it is difficult or close to impossible to apply it in more complex cases. One example is a shopping cart scenario where user can select from the list of items, add them to their shopping cart, and then repeat it over again for many times. Then the structure of the script looks more like this:

{$image2}

The logic of this script is:

  1. Play welcome message;
  2. Preceed into tree-like structure with series of choices, similar like in tree-only scripts;
  3. Ask if user wants to repeat;
  4. If yes, repeat steps 2-3 again;
  5. Finalize.

This script type has a property which the tree-only type does not have: loops. It has much more flexibility and only these scripts can truly be called "scripts": they actually resemble scripts of real life programming language. Really, you can write it programmatically like this:

play("welcome message");
ready_to_checkout = false;
while (ready_to_checkout == false) {
 play("select an item");
 get_item();
 play("select quantity");
 get_quantity();
 add_to_shopping_cart();
 play("ready to checkout?");
 ready_to_checkout = get_users_choice();

};

do_checkout();

The while() loop wraps most part of the script here.

In pseudo-language of IVR Builder we display loop as a wrapping block around those items included in the sequence. That shows which blocks need to be repeated:

{$image3}

 

 

Share this article

Aivis Olsteins

Aivis Olsteins

An experienced telecommunications professional with expertise in network architecture, cloud communications, and emerging technologies. Passionate about helping businesses leverage modern telecom solutions to drive growth and innovation.

Related Articles

The Commitment Economy: Why Voice AI Bookings Must Be Integrated, Not Just Conversational

The Commitment Economy: Why Voice AI Bookings Must Be Integrated, Not Just Conversational

AI can promise a booking, but what about the broken promise? Learn why systemic integration, Accuracy Rate, and System Sync define the real test of Voice AI reliability

Read Article
Beyond the Dial Tone: 3 Metrics That Define Outbound AI Success

Beyond the Dial Tone: 3 Metrics That Define Outbound AI Success

Outbound AI requires a new scorecard. Learn the 3 metrics (Connection Rate, Engagement Quality, and Conversion Impact) that measure pipeline movement, not just call volume

Read Article
The New AI Scorecard: How to Measure Campaign Effectiveness Beyond "Call Volume"

The New AI Scorecard: How to Measure Campaign Effectiveness Beyond "Call Volume"

Stop guessing with 'Call Volume'. Discover the 3-Layer Framework for measuring Voice AI success: Goal Completion Rate (GCR), Sentiment Drift, and Knowledge Retrieval. Turn phone calls into structured marketing data

Read Article
What Happens to Metrics When "Hold Time" Hits Zero?

What Happens to Metrics When "Hold Time" Hits Zero?

Does Voice AI just save money? No. Discover the "CSAT Paradox" and how zero hold time improves revenue, lead capture, and team morale simultaneously.

Read Article

SUBSCRIBE TO OUR NEWSLETTER

Stay up to date with the latest news and updates from our telecom experts