How to detect (in JS) when a chat window is open on a page using JS library

Hi,

We are trying to add chat functionality to our customer's website using Web Chat sample code.

Currently, events that trigger a chat initialization would simply duplicate the chat panel every time those events are triggered.

Can we detect (in JS) when a chat window is open on a page using the PureCloud JS library itself?

Also, Is there any documentation available for PureCloud JS library used in WebChat sample code?

Thanks.

Also, Is there any documentation available for PureCloud JS library used in WebChat sample code?

All of the available API documentation for the web chat API can be found here: https://developer.mypurecloud.com/api/webchat/

Currently, events that trigger a chat initialization would simply duplicate the chat panel every time those events are triggered.

I think the Chat Reconnects section of the docs might help you here. If you set the chat api to reconnect and then try to create a new chat, it will reconnect to the existing chat, if there is one.

Thanks for the clarification Tim!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.