Close the webpage when Chat session is completed

Hi,

We have to requirement to close the webpage where the chat widget is plugged in. Once the chat is completed/Ended by the customer, the webpage should close automatically.

Is there a event/notification sent by the widget which can be captured when the chat session is completed/ended by the customer?

Regards,
Mahesh

Hello,

Are you referring to Genesys Widgets v2.0?

If you are using Genesys Widget v2.0, then, there are several events that you could indeed leverage.

If you want to trigger your code when the customer closes the chat window (i.e. ends the interaction and then close the chat window showing the messages/transcript), you can use WebChat.closed event.

If you want to trigger your code as soon as the chat session is ended, you can use (WebChat.completed and WebChat.cancelled) or WebChatService.ended.

See here for WebChat API events and here for WebChatService API events.
You can also check that other post answer to see how to subscribe to such events in your client-side code - in the example code with window._genesys.widgets.onReady.

Regards,

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