Templates (Viber)
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.
Fig. 1. Templates
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:
👤 ~*$(.FirstName)*$(if .LastName) $(.LastName)$(end)~
then when the Agent disconnects, the chat will display the name of the Agent who has left the chat.
1.1. Workspace member's name
Here you enter the text or template displayed for the agent's incoming chat. Anonymous name of the subscriber, for example.
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 caller 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.