Create Conditional Prompt

Use the Create Conditional Prompt step to create a prompt based on the result of evaluating a specified Boolean expression.

Note

Optionally, you can use the Expression Language and specify a conditional prompt: <condition> ? <true prompt> : <false prompt;gt; where <condition> is a boolean expression, <true prompt> is a prompt expression to play out if the boolean expression is true, and <false prompt> is a prompt expression to play out if the boolean expression is false.

Create Conditional Prompt Customizer Window

The prompts passed are evaluated immediately as prompt objects, but they are not resolved until the time of playback. This means that if the values of any variables entered as part of the expression change between the time this prompt was created and the time the prompt is played back, then the new value of the variable is used to evaluate the conditional expression.

As an example, you can write a script that offers callers the choice between pressing digits or speaking a number. The conditional prompt provides prompts for both situations and lets the caller’s choice determine which prompt the script plays in the given case.

The following table describes the properties of the Create Conditional Prompt customizer window:

Property

Description

Condition

A Boolean variable—or a Boolean expression—indicating whether the script uses to decide which one of the two prompts to play back.

True Prompt

Variable or expression indicating the prompt to be used if the expression is True.

False Prompt

Variable or expression indicating the prompt to be used if the expression is False.

Output Prompt

Variable that stores the prompt that results from the Create Conditional Prompt step.