Five9 LabA student's open lab: learning and sharing, free for everyone.

IVR

If/Else is two ways. Case is more

The module vocabulary, branches, Skill Transfer, queries, and visual framing.

Learn it in 5 minutes

IVR scripts ยท practice ยท 12 min full read

If/Else has two branches. The modules chapter includes both If/Else and Case. When you need three or more outcomes, Case is the block that exists for that. Nesting If/Else until the drawing looks like a hedge is how scripts become unreviewable.

The condition is your expression: open hours, a variable, a lookup result. The module does not know your business. It evaluates what you typed.

Open or closedValueA variable says whetheryou are open.ClockTrueThe open path plays.If/ElseFalseThe closed path plays.If/ElseThirdA holiday path does notfit in two branches.ScriptCaseCase carries the thirdpath.ScriptReviewSomeone else can readit.Script

Pick the module that matches the count.

Worked example

Convert a nest

Replace three nested If/Else blocks with one Case in the builder.

  1. Add Case
  2. Name three labels
  3. Delete the nest

One block, three labels.

Two branches means
A holiday, plus open, plus closed, means
The module invents your hours. True or false?
Menu is still right when
Deeply nested If/Else is

Sources and go deeper

Ecosystem

Glossary. Domain: The VCC tenant. Skills, users, lists, and campaigns stay inside it. Planning your implementation

Sister technologies. ServiceNow Plus adapter. Service Operations and Configurable workspaces. Release names in the PDF this lab read: Australia, Zurich, Yokohama. ServiceNow Plus adapter

Config. Replace three nested If/Else blocks with one Case in the builder.

Troubleshooting. Open and closed are an If/Else. Holiday was drawn as a comment. Put holiday on a real branch.

Cross-platform bridge. A mapping to another PBX or contact center is a teaching bridge. It is not an import button.

Future hook. The guide's cloud endpoint stays unset. Confirm before relying on a dated catalog or a case-study number.

Back to IVR scripts