Templates (Custom Chat Gateway)
1. Description
The page for setting the display of messages from the system.
Consists of fields (Fig.1):
Workspace member's name;
Agent joining message;
Chat complete message;
Agent disconnection message.
The ability to describe specific update templates for a particular message gateway has been provided:
Update | Usage | Field | Sender | Recipient |
---|---|---|---|---|
title | Header format of new, incoming chat | Workspace member's name | Member | User/Agent |
close | Static message of chat ending | Chat complete message | – | Member |
join | Participant connection message format | Agent joining message | User/Agent | Member |
left | Participant disconnection message format | Agent disconnection message | User/Agent | Member |
The template syntax for the text/template package can be found here.
Actions - evaluations of data or control structures - are separated by $( and ) .
For example, the corresponding templates might look like this:
Update | Message template |
---|---|
close |
|
join |
|
left |
|
If in the Agent disconnection message field, enter:
👤 ~*$(md2 .FirstName)$(if .LastName) $(md2 .LastName)$(end)*~
then when the Agent disconnects, the chat will display the name of the Agent who has left the chat.
This example uses MarkdownV2 text formatting for some messages.
Included md2 template function - to escape value encoding control characters.
1.1. Workspace member's name
Here, you enter the text or template displayed for the agent's incoming chat. For example, the anonymous name of the subscriber.
1.2. Agent joining message
Here, you enter the text or template displayed to the subscriber when the Agent connects to the chat.
1.3. Chat complete message
Here, you enter the text or template displayed to the subscriber when the chat is closed.
1.4. Agent disconnection message
Here, you enter the text or template displayed to the subscriber when the Agent has left the chat.
To anonymize incoming chats, enter the text, for example:
Anonymous
In this case, templates, as such, are not used at all. The constant is described here.
All incoming chats from the gateway for which such a template is described will be displayed as Anonymous.