Aysali logo

Message authoring

Merge fields are placeholders replaced with live values when a message is sent. Use them in automated messages, agent templates, chatbot prompts, and some email/notification templates.

Syntax: \{field_name\} — curly braces, lowercase, underscores.

Combine with text formatting for styled, personalized messages.


Core fields

Available in most message and automated-message contexts:

FieldReplaced with
\{user_name\}Full name of the active user (visitor/customer)
\{user_email\}Email of the active user
\{agent_name\}Full name of the active agent (when an agent sends or the field is evaluated in agent context)
\{agent_email\}Email of the active agent

Example

Hello \{user_name\}! An agent (\{agent_name\}) will reply to \{user_email\} shortly.

Visitor context fields

Populated from the user’s session / profile when available:

FieldReplaced with
\{current_url\}Page URL when the user opened chat
\{utm_source\}UTM source query parameter
\{utm_medium\}UTM medium
\{utm_campaign\}UTM campaign
\{utm_id\}UTM id
\{utm_term\}UTM term
\{utm_content\}UTM content

Requires the visitor to have loaded the widget from a URL that includes UTM parameters (stored in user extra data).


Context-specific fields

Some settings document additional merge fields in their own help text. Common examples:

Setting / featureExtra fields (examples)
Follow-up message email\{user_name\}, \{user_email\}
Telegram notifications\{message\}, \{sender_name\}, \{sender_email\}, \{conversation_link\}, \{attachments\}
Tickets new-conversation email\{conversation_url_parameter\}, \{user_name\}, \{message\}, \{attachments\}, \{conversation_id\}
Chat header title\{user_name\} — Settings → Chat → Header name

Always check the content description on the specific setting for the exact list allowed there.


Chatbot and flows

In Q&A answers and Flows, merge fields such as \{language\} can be set via Tools calling or Set data blocks. See OpenAI & AI — Q&A and Flows.


Tips

  • If \{user_name\} is empty, the visitor may be anonymous — provide fallback text in your message.
  • \{agent_name\} is empty when no agent is active in context (e.g. some automated sends).
  • Merge fields are case-sensitive — use exact names from the tables above.
  • Email-only templates may also support HTML where noted in the setting description.