If

This help page is for CXone Studio. This information is also available for Desktop Studio.

Evaluates an expression and takes a branch depending on the outcome of the evaluation (true or false). You can also use create an IF statement in a Snippet action in your script.

 

Supported Script Types

A square with a line branching from it that goes to three other squares.

Generic

Email Chat Phone Voicemail Work Item SMS

Input Properties

These properties define data that the action uses when executing.

Property

Description

Add Caption

Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon.

Expression An evaluation of a value to determine if the expression is TRUE or FALSE. For example, TOTAL=>0 (Total equal to or greater than 0).

Result Branch Conditions

Result branch conditions allow you to create branches in your script to handle different outcomes when an action executes.

Condition

Description

True

Path taken if the expression is true.

False

Path taken if the expression is false.

Script Example

This is an example to show how this action can be used in scripts. It is not intended to be a complete script. Additional scripting may be required.

When this script is triggered, the number of available agents are counted. The If action uses the expression TOTAL>0 to determine which branch to take. If the total number of available agents is greater than 0, a menu will provide options to the caller. If the total number of agents is not greater than 0, then a message will play and the script will hang up the call.

Would you like to download this script?