Introduction

The CHAT role is used for conducting chat sessions with agents from external websites. In addition, the CHAT role can also be converted into a WhatsApp Connector with the provider TynTec. This allows clients to offer their customers the option to send requests through WhatsApp, instead of a Web-Based CHAT. Chat and WhatsApp Connectors can be used in parallel.

Requirements

Configuration

Creating a new Chat Connector

A new Connector can be created via the web-interface. Logged in as a Client Administrator, navigate to "Menu → Chat → Chat Connectors" and press "new". In the resulting popup, the assigned Client ID is shown, as well as the fields to provide a name and title for the Connector.

After clicking "Save", you can enter the configuration page by clicking "Edit" on the Connector.

Settings

Master Data
FieldExplanation
Client IDID of the client in which the Connector is created
NameName of the Connector
Title

Title of the Connector

WhatsApp

When inactive, the Connector is a Chat Connector

When active, the Connector functions both as a Chat and a Whatsapp Connector

Distribution
FieldExplanation
ACD GroupThe ACD-Group inside which the events are distributed

Max Chats all Agents

The maximum amount of simultaneous chat events that can be handled by the Connector amongst all agents in the configured ACD-Group 
PriorityThe priority of incoming chat events. Used primarily when more than one Connector is attached to the same ACD-Group
Maximum connect wait time (s)The amount of time that can pass before an agent must have opened the incoming chat event by pressing on the indicator. If the configured value is exceeded, the event will be redistributed to another agent 
Maximum agent answer time (s)The amount of time that can pass before the agent has sent the first reply to the customer. If the configured value is exceeded, the event will be redistributed to another agent
Maximum free agent search time (s)The maximum amount of time the system will search for an available agent. If the configured value is exceeded the event will be closed and the customer will be informed
Skill 1The first skill which can be attached to incoming events.
Minimum Skill 1The minimum value of skill 1 required by an agent to have the event distributed to him
Ignore skill 1 after timeout (s)The amount of time that will pass until skill 1 is ignored and not considered in event distribution
Skill 2The second skill which can be attached to incoming events.
Minimum Skill 2The minimum value of skill 2 required by an agent to have the event distributed to him
Ignore skill 2 after timeout (s)The amount of time that will pass until skill 2 is ignored and not considered in event distribution
Skill 3The third skill which can be attached to incoming events.
Minimum Skill 3The minimum value of skill 3 required by an agent to have the event distributed to him
Ignore skill 3 after timeout (s)The amount of time that will pass until skill 3 is ignored and not considered in event distribution
Ignore Skills after timeout (s)The amount of time that will pass until all configured skills are ignored and not considered in event distribution
Ignore skills if no agents with skills availableIf checked, skill distribution will be inactive when no agents with the required skills are available in the ACD-Group
Code
Field

Example Configuration

Configuration

{
"noAgents":"Sorry, currently there are no agents available. Please try again later.",
"noAgents#de":"Es tut uns leid, aber derzeit sind keine Agenten verfügbar. Bitte probieren Sie etwas später nochmal.",
"outOfService":"Sorry, but the service is not available at the moment.",
"outOfService#de":"Es tut uns leid, aber der Service steht derzeit nicht zu Verfügung",
"agentTyping":"Agent $agent is typing...",
"agentTyping#de":"Agent $agent schreibt ...",
"bye":"Thank you for using our service. Goodbye.",
"bye#de":"Danke, dass Sie unseren Service genutzt haben. Auf Wiedersehen.",
"byeNoAgent": "Sorry, currently there are no agents available. Please try again later.",
"byeNoAgent#de":"Es tut uns leid, aber derzeit sind keine Agenten verfügbar. Bitte probieren Sie etwas später nochmal.",
"welcomeMessage":"Welcome!",
"welcomeMessage#de":"Herzlich willkommen!.",
"editorPlaceholder":"Enter your message here.",
"editorPlaceholder#de":"Geben Sie Ihre Nachricht hier ein."
}

Explanation:
noAgentsWhen no agent is available, the configured message is sent to the customer.
outOfServiceWhen the service is not available at the moment.
agentTyping

When the agent enters a response to the customer, the customer is informed by a notification in the chat window.

In this resource the placeholder $agent can be used. It will be replaced with agent nick name and if the field is empty with UsersUID.

This message is not displayed to customers who use WhatsApp


byeWhen the chat event is closed, the configured message is sent to the customer.
byeNoAgentWhen no agent is available, the configured message is sent to the customer.
welcomeMessageAfter a customer has sent a message and opened a new event, the configured message is sent to the customer. 
editorPlaceholder

This message is displayed to the customer after the window for chat is opened at the external website. 

This message is not displayed to customers who use WhatsApp



Code


<script src='https://websiteurl.de:3003/gui//chat.js'></script>
<script type="text/javascript">
   JTEL.initChat({ 
       Hash: 'ZkGgUcDkLPEY',
       BaseWSURI: 'wss://chatserverurl.de:3003',
       BaseResourceURI: 'https://storageserverurl:3003/gui', //optional
       pdata: {name:'John Doe', email:'john.doe@example.com', sender:'John Doe', receiver:'My Chat Connector', userdata:'123456', userdata2:'userdata2', userdata3:'userdata3'},
       udata: {anyfield1:'Any Field 1', anyfield2:'Any Field 2'} });
</script>


Explanation:

To access the jtel server, the code is embedded into the external website. The code is generated with the settings from the parameters in the jtel portal, as well as the settings from the page Master Data in the chat Connector configuration.

REST
Token Post
Field

Example Configuration

Url


https://myrestservice.example.com/service/GetToken


Header


Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Body


grant_type=client_credentials&redirect_uri=https://myrestservice.example.com/service/api/v1/Customers/Contacts


Report Export Post
Field

Example Configuration

Url


https://myrestservice.example.com/service/api/v1/Customers/Contacts


Header


Cache-Control: no-cache
Content-Type: application/json
Authorization: Bearer $tokenResponse.body.JSON.access_token


Body


{"CustomerNumber":"$chatConnector.id",
"XMLCodedData":"$xmlTemplate.encoded.base64"}


Xml Template


<?xml version="1.0" encoding="utf-8"?>
<chatReport>
<Size>$report.bytes</Size>
<Content>$report.encoded.base64</Content>
</chatReport>


See also: Chat Report Export

Portal Configuration

Additional configuration in the portal is necessary, regarding the distribution of Chat and WhatsApp events

Agent Status

Agent status for chat - or an existing status - must be configured to allow a chat event to be distributed to the agent:

Max chats per agent

The maximum number of parallel chats per agent must be configured. This value is set to 0 by default for all agents. The checkmark at "Ticket via Web Interface" has to be checked.

Additional configurations for WhatsApp

Additional parameters are required for WhatsApp connectors 

Master Data
FieldExplanation
WhatsApp

When active, the Connector is changed to a WhatsApp Connector

Whatsapp ApiKeyThe TynTec API Key is entered in this field 
Whatsapp NumberThe phone number is entered in E.164 format

The additional configuration required on the server side is described here: Role CHAT