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

How Voice AI Reduces Agent Burnout and Boosts Satisfaction

How Voice AI Reduces Agent Burnout and Boosts Satisfaction

Reduce Burnout with Voice AI: Offload Repetitive Calls, Real‑Time Agent Assist, 40–80% Less ACW, Calmer Escalations, Healthier Occupancy, Proactive Deflection & PCI‑Safe Flows—Happier Agents, Faster Resolutions, Better Coaching, Faster Ramp

Read Article
Seamless Voice AI Integrations: Salesforce, HubSpot, and ERP Systems

Seamless Voice AI Integrations: Salesforce, HubSpot, and ERP Systems

Seamless Voice AI Integrations with Your Stack: Salesforce & HubSpot CRM + SAP/Oracle/NetSuite/Dynamics ERP; OAuth2 & mTLS Security; Real‑Time Read/Write (Cases, Orders, Payments, Scheduling); Warm Transfers, Context; Audit Logs, SLAs, iPaaS Support

Read Article
Measuring Voice AI Success: The KPIs That Matter—CSAT, Containment, Speed, Accuracy, Reliability, and ROI

Measuring Voice AI Success: The KPIs That Matter—CSAT, Containment, Speed, Accuracy, Reliability, and ROI

Voice AI KPI Scorecard: CSAT/NPS, FCR & Containment, Time‑to‑First‑Word & p95 Latency, Intent/Slot Accuracy & ASR WER, Groundedness, Tool Success (Payments/IDV/Scheduling), Warm Xfers, Uptime/Reliability, Consent/Redact, Cost per Resolution & ROI

Read Article
Sensitive Data in Voice AI: PCI‑Safe Payments, HIPAA‑Compliant PHI, Redaction & Tokenization

Sensitive Data in Voice AI: PCI‑Safe Payments, HIPAA‑Compliant PHI, Redaction & Tokenization

Managing Sensitive Data in Voice AI: PCI‑Safe Payments (DTMF Masking, Tokenization), HIPAA‑Compliant PHI Segregation, Redaction/De‑Identification, End‑to‑End Encryption, Zero‑Trust Access, Residency/Retention, DSAR Deletion, SIEM‑Audited Trails

Read Article

SUBSCRIBE TO OUR NEWSLETTER

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