US: 800.995.PLUM UK: 0845.355.3330
- What is IVR?
- IVR Products & Services
- Free Consultation
- Plum IVR Surveys
- About Us
from the Plum Voice IVR Glossary
The if conditional is one of the most basic coding functions. It is used to express branching based on specific criteria. The most common use of this would be
If-Then-Else. If the condition evaluates to true the application
then runs another set of code.
Else implies that the condition evaluated to false and runs a different set of code.
Most languages also have an elseif conditional to accommodate criteria that would have more than two branches. This would be included after the initial if condition and before the final else clause. The syntax used differs on the coding language being used. The VoiceXML syntax would be:
<if cond="number == 1"> <!-- IVR application is here if number is equal to 1 --> <elseif cond="number==2"/> <!-- IVR application is here if number is equal to 2 --> <else/> <!-- IVR application is here if number is not equal to 1 or 2 --> </if>
|© 2013 The Plum Group, Inc.|