These docs are for v0.0.1. Click to read the latest docs for v1.0.61.

Discussions

Ask a Question
Back to All

Chat SDK: How to shutdown chat in Avaya Workspaces after timeout

When the idle timeout has been reached, AvayaCCaaSChatSDK raises the "SHUTDOWN" event. This can be handled on the front-end, but the engagement is still active in Avaya Workspaces. How do you terminate the Avaya Workspaces chat?

The response from Avaya technical folks is: The Chat SDK doesn't close any of the ongoing chats when the Session is terminated due to inactivity as the User might be engaged on those chats through another session also (say for example customer came via web and also joins the engagement via Mobile or browser using Different device).

So I attempted to implement this.

Steps:
When SHUTDOWN event triggered, re-initialize AvayaCCaaSChatSDK
Get the engagement I want to disconnect from > AvayaCCaaSChatSDK.getEngagementById();
Call > engagement.join();
Call > engagement.disconnect();

The issue here is that the engagement is in status "TERMINATED", and will not allow me disconnect, as stated in the documentation "Engagement must be active before it can be disconnected".

After the SHUTDOWN event has been triggered, how do I reconnect to the existing engagement in order to disconnect it?