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.) |
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 |
Functions | Description |
---|---|
Today | Current ET Date replaced at runtime with date in the format 'MM/dd/yyyy'. |
Time | Current ET Time of day replaced at runtime with time in the format 'HH:mm:ss'. |
Year | Current ET Year replaced at runtime with day. E.g 2007, 2011, etc. |
Month | Current ET Month of the Year replaced at runtime in the range of 1-12. |
Date | Current ET Day of the month replaced at runtime in the range of 1-31. |
Day | Current ET Day of the week replaced at runtime with day. E.g Sunday, Monday, etc. |
Hour | Current ET Hour of the day replaced at runtime in 24hrs format. |
Minutes | Current ET Minutes of the Hour replaced at runtime. |
Epoch Milliseconds | Current ET Epoch Time replaced at runtime with no of milliseconds from Jan 1, 1970. |
Timezone Offset Minutes | Time difference between UTC time and Current ET time, in minutes |
String functions (not separated, intentional?)
Substring | Extracts the characters from a string, beginning at a specified start position, and through the specified number of character. |
Lower Case | Converts a string to lowercase letters. |
Upper Case | Converts a string to uppercase letters. |
Absolute Value | |
Rounded Up Value | |
Rounded Down Value | |
Rounded Value | |
Random Value |
Contact Fields and Ticket Fields