If, Elseif, and Else Elements
Use
The if element specifies conditional statements that allow choosing different options based on, for example, variable values.
The else and elseif elements can be nested only in if elements, and they have no child elements.
If
The if element can be nested in the following parent elements: error, timeout, block, filled, if, noinput, nomatch. The if element can have the following child elements: assign, audio, callout, clear, customstate, else, elseif, exit, goto, if, log, prompt, setlanguage, setprioroty, setskills, soap, var.
There must be at least one child element in the if element that defines what happens if the condition evaluates to true.
* = Specific to Sinch Contact Pro
Attributes for if Element |
Description |
---|---|
Condition |
Define the condition with a Python statement using one of the following options:
|
Description* |
Enter a description of your element; what is it planned for, its requirements and limitations. |
Elseif
The elseif element is used to specify additional conditional statements when proceeding conditional statements in an array evaluate to false. The application will execute the first conditional statement that evaluates to true.
Attributes for elseif Element |
Description |
---|---|
Condition |
Define the condition with a Python statement using one of the following options:
|
Description* |
Enter a description of your element; what is it planned for, its requirements and limitations. |
Else
The else element is used as the final logic constructor in an array of conditional statements, such as if and elseif elements, and its content is executed when all earlier conditional statements evaluate to false.
Attributes for else Element |
Description |
---|---|
Description* |
Enter a description of your element; what is it planned for, its requirements and limitations. |
Example
Form the array of conditional statements in the following way:
-
Add the block element
-
Add the if element
-
Add the elseif elements for additional alternative conditions.
-
Add the else element for situations when none of the proceeding conditions is not true.
-
-