Switchvox - How do I set up an IVR to toggle a variable value?

How do I create an IVR Toggle?
 
An IVR toggle has multiple uses. It can easy redirect calls to alternate destinations. For example, when an all-hands meeting or an unexpected snow day occurs, simply use your telephone to manually direct calls to your answering service. An IVR toggle affords flexibility over a structured IVR.
 
The toggle IVR allows changing a global variable value, in your main IVR, to allow routing calls differently until reverted back to its original value. The following toggle example uses a variable to change call routing, based an unexpected a snow day.

In this article, we will create:

  • Sound recordings, to prompt toggling global variable and snow day notice

  • An IVR, to accept redirected calls from the main IVR

  • An IVR, to set the global variable value

  • An IVR, to call to toggle the global variable

  • An IVR extension, for the global variable toggle IVR

  • A conditional statement, in the main IVR, to act upon the global variable value

 

A. Create a sound recording, to provide prompting for the toggle.

  1. Go to Tools > Sound Manager > Create > Sound > Go.

  2. Create the recording, saying something like: "Press 1 for a normal day or press 2 for a snow day."

    • Note the folder name, where your new sound file resides.

  3. Create the recording, saying something like: "School is closed today, due to snow."

 

B. Create an IVR where calls go, on a snow day. 

  1. Go to Tools > IVR Editor > Create IVR Menu. For example, call this IVR "Snow Day".

  2. Select the "Snow Day" IVR and then add the following Actions:

    1. Wait > Wait time in seconds: 1

    2. Play Sound (For example, "School is closed today, due to snow")

    3. Hang Up

rtaImage - 2024-09-25T164209.329.png

 

C. Create an IVR, to set the global variable. 

  1. Go to Tools > IVR Editor > Create IVR Menu. For example, call this IVR "Set Day Status Variable".

  2. Select the "Set Day Status Variable" IVR and then add the following Actions:

    1. Set Variable (Set Day_Status = "1")

    2. Set Global Variable (Set Day_Mode = Day_Status)

    3. Play Sound (Thank You)

    4. Hang Up

    5. Set Variable (Set Day_Status = "2")

    6. Set Global Variable (Set Day_Mode = Day_Status)

    7. Play Sound (Thank You)

    8. Hang Up

rtaImage - 2024-09-25T164227.632.png

 

D. Create an IVR, to allow caller to modify the global variable value.

  1. Go to Tools > IVR Editor > Create IVR Menu. For example, call this IVR "Snow Day Toggle".

  2. Select the "Snow Day Toggle" IVR and then add the following Actions:

    1. Wait > Wait time in seconds: 1

    2. Play Sound (Choose the toggle sound create in step "A".)

  3. Add the following Options:

    1. Option Number "1", New IVR Menu "Set Day Status Variable", IVR Menu Entry Point "1. Set Variable (Set Day_Status = "1")"

    2. Option Number "2", New IVR Menu "Set Day Status Variable", IVR Menu Entry Point "5. Set Variable (Set Day_Status = "2")"

rtaImage - 2024-09-25T164250.624.png

E: Assign an extension number, to "Snow Day Toggle" IVR. (Call this extension to hear sound created in step "A" above. "Press 1 for a normal day or press 2 for a snow day.")

  1. Go to Setup > Manage > Create Extension > Extension Type: IVR (Interactive Voice Response) > Create Extension.

  2. Enter an Extension number, Route to IVR Menu: "Snow Day Toggle", IVR Menu Entry Point: "IVR Menu Beginning" > Save IVR Extension.

 
F. Modify the main IVR, to get the current global variable.

  1. Go to Tools > IVR Editor > select your main IVR.

  2. Add the following Actions, to the top of the IVR:

    1. Get Global Variable (Get Day_Status = Day_Mode)

    2. Conditional Clause (If Day_Status = 2, Go To IVR Menu: Snow Day, at IVR Menu Entry Point: IVR Menu Beginning)

rtaImage - 2024-09-25T164305.904.png

Toggled actions:

  • When a calls enter the main IVR and the global variable is set to 1, the call proceeds through the IVR without redirection.

  • When a calls enter the main IVR and the global variable is set to 2, the call is redirected. In the example above, the call goes to the Snow Day IVR where callers hears "School is closed today, due to snow" and then hangs up.

 

Implementation: 

  • Pressing 1 lets all calls pass normally through your main IVR.

  • Pressing 2 evokes the conditional clause, to redirect all calls out of your main IVR, to the IVR set in step "B" above.

  • Internally: Dial the extension assigned in step “E” above.

  • Externally: Assign a phone number and route, via Incoming Call rules, to extension in step “E”. Consider password protecting this extension, when accessed externally.

 

NOTE:  

  • This method is not limited to only two options/values. A variable can have up to 11 values (options 0-9 and *).

  • To forward calls to an after hours answering service, simply use the following IVR Action in step “B” above:

    • Send to External Number (91XXXXXXXXXX)

  • Consider password protecting the toggle variable IVR.

Related content