The Contact Flow Engine allows you to build expressions (conditions) using the available functions, system and custom variables, logical operators, and other primitives using the Expression Builder. You can use these expressions in modules (like the condition or variable_assignment modules) that require you to compare user inputs with specific conditions and create decision points in your contact flow, 

Here are a few sample expressions that the Expression Builder enables:

Expression

Description

getDay()='Saturday'|getDay()='Sunday'

Checks to see whether today is a weekend (either a Saturday or Sunday).

custom_counter<=3

Checks to see whether the current value of a custom counter (maintained in a contact flow variable called custom_counter here) is less than or equal to 3.

This could be used to loop through some part of the contact flow no more than 3 times.

PHONE DIALED.substr(0,3)='415'

Checks whether the area code of the system variable PHONE DIALED is 415.

.10*TOTAL AMOUNT<=500&cc_type='visa'

Checks whether the client's minimum payment amount (10% of the total amount owed by the consumer, which is maintained in the system variable TOTAL AMOUNT) is less than or equal to 500 dollars, AND the credit card being used by the client is a VISA.

(Here, cc_type is a contact flow variable.)

Tips to add an Expression

Components of the Expression Builder

Boolean Operators
Equals
Not Equals
Less Than
Greater Than
Less Than or Equals
Greater Than or Equals
Conditional Operator


Logical Operators
and
or
not


Arithmetic Operators
Plus
Minus
Multiply
Divide
Increment
Decrement
Modulus


FunctionsDescription
TodayCurrent ET Date replaced at runtime with date in the format 'MM/dd/yyyy'.
TimeCurrent ET Time of day replaced at runtime with time in the format 'HH:mm:ss'.
YearCurrent ET Year replaced at runtime with day. E.g 2007, 2011, etc.
MonthCurrent ET Month of the Year replaced at runtime in the range of 1-12.
DateCurrent ET Day of the month replaced at runtime in the range of 1-31.
DayCurrent ET Day of the week replaced at runtime with day. E.g Sunday, Monday, etc.
HourCurrent ET Hour of the day replaced at runtime in 24hrs format.
MinutesCurrent ET Minutes of the Hour replaced at runtime.
Epoch MillisecondsCurrent ET Epoch Time replaced at runtime with no of milliseconds from Jan 1, 1970.
Timezone Offset MinutesTime difference between UTC time and Current ET time, in minutes


String functions (not separated, intentional?)

SubstringExtracts the characters from a string, beginning at a specified start position, and through the specified number of character.
Lower CaseConverts a string to lowercase letters.
Upper CaseConverts a string to uppercase letters.
Absolute Value
Rounded Up Value
Rounded Down Value
Rounded Value
Random Value

Contact Fields and Ticket Fields