This topic introduces the supported variables and functions in Dromlik Message Flow Designer. Variables and functions can be referenced in expression-supported components (such as Condition) to dynamically retrieve data and control message flow logic.
Variables
There are two types of variables in Message Flow Designer:
Session Variables — store information about the current message session. These variables are globally accessible throughout a message flow and do not depend on any specific components.
Component Variables — hold the values returned by specific components. These variables become available after the corresponding components are added to a message flow.
Session Variables
Variable
Type
Description
Example
$Session.contactNumber
String
The customer's number.
"15812340987"
$Session.channelNumber
String
The number of the message channel.
"LC00113"
$Session.contactName
String
The full name of the contact matching the customer's number.
"Leo Bell"
$Session.contactFirstName
String
The first name of the contact.
"Leo"
$Session.contactLastName
String
The last name of the contact.
"Bell"
Component Variables
Menu component
Variable
Type
Description
Example
$Menu{index}.receivedMessage
String
The message content the customer sends in response to the menu.
"1"
Wait for Reply component
Variable
Type
Description
Example
$WaitForReply{index}.receivedMessage
String
The message content the customer replies.
"Transfer to a live agent."
Get Extension Presence Status component
Variable
Type
Description
Example
$GetExtensionStatus{index}.currentProfileName
String
Name of the extension's current presence status.
"Available"
$GetExtensionStatus{index}.currentProfile
String
Name and additional information of the extension's current presence status.
"Available,work"
$GetExtensionStatus{index}.isUnavailable
Boolean
Whether the extension is unregistered.
False
Get Extension Info component
Variable
Type
Description
Example
$GetExtensionInfo{index}.number
String
Extension number.
"1001"
$GetExtensionInfo{index}.name
String
Extension name.
"Phillip Huff"
$GetExtensionInfo{index}.email
String
Extension's email address.
"phillip@sample.com"
$GetExtensionInfo{index}.mobileNumber
String
Extension's mobile number.
"15880123456"
Get Company Contact Info component
Variable
Type
Description
Example
$GetCompanyContactInfo{index}.contactName
String
Contact name.
"Leo Poll"
$GetCompanyContactInfo{index}.company
String
Company name.
"YS"
$GetCompanyContactInfo{index}.email
String
Email address.
"leo@ys.com"
$GetCompanyContactInfo{index}.phonebookList
String
The phonebook(s) the contact belongs to.
"All"
$GetCompanyContactInfo{index}.remark
String
Remark about the contact.
"remark"
$GetCompanyContactInfo{index}.business
String
Business number.
"01082345678"
$GetCompanyContactInfo{index}.mobile
String
Mobile number.
"13800001234"
$GetCompanyContactInfo{index}.home
String
Home number.
"01087654321"
Database Access component
Variable
Type
Description
Example
$DatabaseAccess{index}.queryResult
Object
The table returned by a SQL query. Use GET_TABLE_ROW_COUNT and GET_TABLE_CELL_VALUE functions to retrieve data.
"demo@yeastar.com"
$DatabaseAccess{index}.nonQueryResult
Integer
The number of rows affected by a non-query SQL statement.
99
$DatabaseAccess{index}.scalarResult
String
The single value returned by a scalar SQL query.
"10"
HTTP Request component
Variable
Type
Description
Example
$HttpRequest{index}.responseContent
String
The body content returned from the HTTP response.
{"authenticated": true}
$HttpRequest{index}.responseStatusCode
String
The HTTP status code returned from the request.
"200"
Functions
Functions are used for condition evaluation and data processing, enabling flexible control of the message flow.
Boolean functions
Function
Syntax
Description
FX_AND
FX_AND(condition1, condition2, ...)
Returns True only if all conditions are met.
FX_OR
FX_OR(condition1, condition2, ...)
Returns True if any condition is met.
FX_NOT
FX_NOT(condition)
Returns the opposite of the Boolean result.
FX_EQUAL
FX_EQUAL(value1, value2)
Returns True if two values are equal (value and type).
FX_NOT_EQUAL
FX_NOT_EQUAL(value1, value2)
Returns True if two values are not equal.
FX_CONTAINS
FX_CONTAINS(value1, value2)
Returns True if the first string contains the second string.
FX_GREATER_THAN
FX_GREATER_THAN(value1, value2)
Returns True if the first value is greater than the second.
FX_GREATER_THAN_OR_EQUAL
FX_GREATER_THAN_OR_EQUAL(value1, value2)
Returns True if the first value is greater than or equal to the second.
FX_LESS_THAN
FX_LESS_THAN(value1, value2)
Returns True if the first value is less than the second.
FX_LESS_THAN_OR_EQUAL
FX_LESS_THAN_OR_EQUAL(value1, value2)
Returns True if the first value is less than or equal to the second.
FX_TO_BOOLEAN
FX_TO_BOOLEAN(value)
Converts a value to Boolean. Returns False for "0", "False", or null.
String functions
Function
Syntax
Description
FX_CONCATENATE
FX_CONCATENATE(string1, string2, ...)
Concatenates all string parameters and returns the result.
FX_TRIM
FX_TRIM(value)
Removes leading and trailing whitespace.
FX_LEFT
FX_LEFT(text, count)
Extracts a specified number of characters from the beginning.
FX_MID
FX_MID(text, start_position, length)
Extracts a substring from a specified position with a specified length.
FX_RIGHT
FX_RIGHT(text, count)
Extracts a specified number of characters from the end.
FX_UPPER
FX_UPPER(text)
Converts all characters to uppercase.
FX_LOWER
FX_LOWER(text)
Converts all characters to lowercase.
FX_REPLACE
FX_REPLACE(text, target, replacement)
Replaces a specified substring with another substring.
FX_REPLACE_REG_EXP
FX_REPLACE_REG_EXP(text, expression, replacement)
Replaces substrings matching a regular expression pattern.
Integer and conversion functions
Function
Syntax
Description
FX_TO_INTEGER
FX_TO_INTEGER(value)
Converts a value to a 32-bit integer.
FX_TO_LONG
FX_TO_LONG(value)
Converts a value to a 64-bit integer.
FX_GET_TABLE_ROW_COUNT
FX_GET_TABLE_ROW_COUNT(table)
Returns the number of rows in a table result.
FX_GET_LIST_ITEM_COUNT
FX_GET_LIST_ITEM_COUNT(list)
Returns the number of items in a list.
FX_JSON_GET_INTEGER
FX_JSON_GET_INTEGER(JSONObject, key)
Retrieves an integer value from a JSON object by key.
Object functions
Function
Syntax
Description
FX_GET_TABLE_CELL_VALUE
FX_GET_TABLE_CELL_VALUE(table, row, column)
Retrieves the value from a table cell at the specified row and column.
FX_GET_LIST_ITEM
FX_GET_LIST_ITEM(list, index)
Retrieves the value from a list at the specified index.