ivr IVR Studio User Guide Table of Content << Previous  >> Next

IVR Call Flow Diagram - Variable

A variable is a symbolic representation used to denote a quantity or expression. The quantity of a variable is usually called the value of a variable. The value normally changes during the execution of an IVR application. In IVR Studio, a variable is presented as ${name}. Later sections cover more details of variables.

For example, in the voicemail to email sample, variable ${email_address} is used to hold the email address of the selected voicemail box owner. Based on the caller select, it can be assigned to different mailbox owner's email address.

ivr voicemail to email

Create a Variable

To create a new variable, right click on the top element, select the variable tab, and then click the New button.

ivr set variable

Enter the variable name email_address and set the initial value to the empty string ''.

Set Variable Value

In the sample shown above, if a caller selects John's voicemail box by entering 101, the variable ${email_address} is set to John's email address; if a caller selects Mary's voicemail box, the variable is set to Mary's email address. To set a variable value, right click on the element, choose the Action tab, then click the New button. From the Choose Action Type window, choose Set Variable option. From the Action: Set Variable Value window (similar to the window above), choose email_address, then enter the selected email address. For example, enter 'john_email@yourcompany.com' for John. Please note that you must include the single quote around a literal string that is not a variable.

Use Variable Value

Variables can be used in other actions or prompts. For example, the action defined for element labeled Voicemail to Email uses the email address defined in variable ${email_address}. Depending on the caller selection of voicemail box, the value of this variable can be John's email address or Mary's email address. The advantage of using variable is clear here. With the ${email_address} variable, we have to define separate element/action to send emails - one action to send email to John, and the other to send email to Mary.

 

ivr IVR Studio Table of Content << Previous >> Next