External Chat Session From Gateway
External chat sessions can be created to chat to a Xelion line from an external participant. Normally the session is created by the external user. For example from an external website. The session is created through a Xelion gateway, which can be created by a Xelion Administrator. In this gateway the chatted Xelion line is confifugred along with a unique identification and access token.
The API calls for external sessions have a different endpoint "https://<HOSTNAME>/portal/chat/<TENANT>/".
The <TENANT> is the name of the tenant, in case of the MT master tenant or a ST server, the tenant "master" is given.
Every call needs a Authorization header with the Xelion access token as value.
All the API calls for external chat sessions start with this endpoint.
Save the gateway id and Xelion access token in a save place, the end user should not be aware of these values.
The first step is to create a external chat session. Information about the chatter/client needs to be specified here.
After the session is generated a message can be send to this session.
To send a chat the API call send external chat needs to be sended. After this API call the external chat is delivered to the internal Xelion line
and the Xelion user(s) get a new chat notification.
To get the messages that are currently send in this chat session, use the get messages call.
It is not recommended to poll the messages every couple of seconds. Websocket should be used to get notifications of new chat messages.
The websocket connection URL can be obtained by the API call get chat websocket.
The "newExternalChatEvent" can be used to receive new chat events of an external chatsession. The websockets can also be used to checkout if
the session has been activated ("chatHasBeenActivatedEvent"),
the active xelion is changed ("chatActiveUserHasBeenChangedEvent"),
there are no agents available ("chatNoAgentsAvailableEvent"),
the internal Xelion user is typing a new message ("chatTypingEvent"),
if the messages are read ("chatHasBeenReadEvent"),
if the chat session is idle ("chatIsIdleEvent)",
if a heartbeat message is send ("chatHeartbeatEvent")
or if the chat session is ended ("chatHasBeenEndedEvent").
When a new session is started, an agent is searched. When no agents are available at the moment a "chatNoAgentsAvailableEvent" is sended. After an agent has opened the chat session the "chatHasBeenActivatedEvent" is sended out including the active agent name. The active agent can change during a chat session, if this happens a "chatActiveUserHasBeenChangedEvent" is sended out with the new agent name.
When a session is ended, feedback can be given. Send a rating and feedback contents with the send feedback call.
It is also possible to request a transcript after the session has ended. The customer needs to give up the email address to receive the transcript by mail.
The send transcript call is made for requesting a transcript.
To check if transcript is enabled on the gateway, the is transcript enabled call can be sended.
External chat resources
Validate the chat gateway |
Validate the chat gateway. |
Status of the chat gateway |
Status of the chat gateway. |
Create External Chat Session |
Create an external chat session. |
Get External Chat Session |
Get an external chat session. |
Send External Chat Message |
Send message to an external chat session. |
Get Chat Session’s Messages |
Get all the current messages of the chat session. |
External chat message delivered |
Set the chat session as delivered for the external user. |
External participant is typing |
Tell server that the external user is typing a new message. |
End External Chat Session |
End the external chat session. |
Send External Chat Feedback |
Send feedback of the chat session. |
Is External Chat Gateway Transcript Enabled |
Is external chat gateway transcript enabled. |
Send External Chat Transcript |
Send external chat transcript. |
Chat Has Been Activated Event |
Object sended when new "chatHasBeenActivatedEvent" is received through websockets. |
New Chat Event |
Object sended when new "newExternalChatEvent" is received through websockets. |
Chat Read Event |
Object sended when new "chatHasBeenReadEvent" is received through websockets. |
Chat Typing Event |
Object sended when new "chatTypingEvent" is received through websockets. |
Chat Active User Is Changed Event |
Object sended when new "chatActiveUserHasBeenChangedEvent" is received through websockets. |
Chat No Agents Available Event |
Object sended when new "chatNoAgentsAvailableEvent" is received through websockets. |
Chat Idle Event |
Object sended when new "chatIdleEvent" is received through websockets. |
Chat Heartbeat Event |
Object sended when new "chatHeartbeatEvent" is received through websockets. |
Chat Has Been Ended Event |
Object sended when new "chatHasBeenEndedEvent" is received through websockets. |