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

Case Study: Global Communications Company

Case Study: Global Communications Company

A leading communications company used our cloud Voice platform to send 30 million OTP calls per month to their customers, resulting in cost reduction and incrased conversion

Read Article
Bridging The Delay Gap in Conversational AI: The Backpressure Analogy

Bridging The Delay Gap in Conversational AI: The Backpressure Analogy

Conversational AI struggles with the time gap between text generation and speech synthesis. A “backpressure” mechanism, akin to network data flow control, could slow text generation to match speech synthesis speed, improving user interaction.

Read Article
How Voice AI Agents Can Automate Outbound Calls and Unlock New Opportunities for Businesses: A Deeper Dive

How Voice AI Agents Can Automate Outbound Calls and Unlock New Opportunities for Businesses: A Deeper Dive

AI voice agents transform healthcare scheduling by reducing costs, administrative tasks, and no-shows. They offer 24/7 service, multilingual support, proactive reminders, and valuable insights, improving efficiency and patient experiences.

Read Article
How to Fix Your Context: Mitigating and Avoiding Context Failures in LLMs

How to Fix Your Context: Mitigating and Avoiding Context Failures in LLMs

Larger context windows in LLMs cause poisoning, distraction, confusion, and clash. Effective context management (RAG, pruning, quarantine, summarization, tool loadouts, offloading) remains essential for high-quality outputs.

Read Article

SUBSCRIBE TO OUR NEWSLETTER

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