Writing an IVR Script
Interactive Voice Systems are driven by scripts - a set of instructions which determine its behaviour.
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:
- At the start system plays welcome message along with list of choices and promts user to make a selection;
- User presses the key;
- System moves down the branch, plays next message, lists choices and promts user to make a selection;
- User presses the key;
- 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:
- Play welcome message;
- Preceed into tree-like structure with series of choices, similar like in tree-only scripts;
- Ask if user wants to repeat;
- If yes, repeat steps 2-3 again;
- 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}