Message Variables
Use placeholders in message templates and operator messages.
Message variables are placeholders used in templates, broadcasts, manual messages, and automated messages.
They are replaced with real client, chat, operator, or custom field data when the message is sent.
Example template:
Hello {client.name}, your chat ID is {chat.id}.Example result:
Hello John, your chat ID is 1024.Available Variables
| Variable | Description |
|---|---|
{client.name} | Inserts the client name. |
{client.id} | Inserts the client identifier. First uses external_id; if empty, uses the client phone number. |
{chat.id} | Inserts the internal chat ID. |
{operator.id} | Inserts the staff_profile_id of the operator sending the message. |
{client.customfield.<key>} | Inserts a client custom field value by key. |
Client Name
Use:
{client.name}Example:
Hello {client.name}, how can I help you today?Client ID
Use:
{client.id}GChat uses this value in order:
external_id- client phone number, if
external_idis empty
Example:
Your client ID is {client.id}.Chat ID
Use:
{chat.id}Example:
Your request has been received. Chat ID: {chat.id}.Use it for support cases, tracking, escalation, or debugging.
Operator ID
Use:
{operator.id}Example:
This chat is handled by operator ID {operator.id}.Use it for internal tracking, reporting, automation, or debugging.
Custom Fields
Use:
{client.customfield.<key>}Replace <key> with the custom field key from Settings -> Custom Fields.
Examples:
{client.customfield.city}
{client.customfield.birthday}
{client.customfield.language}Example:
Hello {client.name}, we see that your city is {client.customfield.city}.Custom Field Examples
| Variable | Inserts |
|---|---|
{client.customfield.city} | Client city |
{client.customfield.birthday} | Client birthday |
{client.customfield.deposit_amount} | Deposit amount |
{client.customfield.language} | Client language |
{client.customfield.source} | Client source |
The key must match the custom field key exactly.
Correct Syntax
Correct:
{client.name}Incorrect:
{client Name}
(client.name)
{clientname}Variables must use curly braces and exact names.
Empty Custom Field
If a custom field value is empty, check:
- The custom field exists in Settings -> Custom Fields.
- The custom field key is correct.
- The client has a saved value for this field.
- The variable uses the correct syntax.
Correct:
{client.customfield.city}Incorrect:
{client.customField.city}
{client.customfield.City}
{customfield.city}