Link end chat function to close button

HI, we need a way to end the interaction when the client clicks the close button on the webchat.

Please help?

Clicking the end chat button or closing the browser tab/window should cause the chat to end. Are you observing different behavior?

Hi Tim

Your explanation of the functionality would be correct. We would however prefer to extend the functionality. We wrapped the chat into our frame and skinned it to match our site. (Screenshot below)

We are trying to achieve the following, for example:

  1.   We want to end the chat when we click the “x” in our frame the same way as when you use the close button in the Purecloud chat. 
    
  2.   We want to reinitiate a chat once you’ve closed the first session.
    
  3.   Notification of a reply from agent when the user has minimized the chat.
    
  4.   Etc.
    

Calling the function from outside of your chat to end the connection did not work.

We would like to know how to interact with functions of or chat or alternatively confirm should this not be possible.

Please let me know should you require any additional information.

Hi charl-pc

  1. When closing the frame the chat should end.
  2. Do you want to make a new chat? If so you just need to trigger the ININ.webchat.create call again to get that to work.
  3. That is not supported since we do not currently expose a way to tie into that.

So what it looks like is you want inside access to the enter workings of webchat to tie into events. We currently do not have that but are looking into ways to give customer more control. I do not have a timeframe at this time. In the future we are looking expose a start and end chat event that might help with some of this.

We did release the new chat events that you can subscribe to today, if you'd like to try them out. More details here: https://help.mypurecloud.com/releasenote/july-12-2017/

We have implemented the embedded chat via modal, as well, and have found that sometimes the chat doesn't end when a user closes the browser.

Also, closing the modal doesn't end the chat, and reopening the modal doesn't reconnect the chat but instead creates a new chat. Even though a new chat is created, the user isn't required to re-enter their info, name and email in this case, making it seem like it is still the original chat. This results in a frustrating user experience. Any thoughts on how to better implement the embedded widget?

If the browser is closed normally, it will send a message to end the chat before it actually closes. But depending on how the end user closed it, sending that message may not be possible. Example: power loss of PC, disconnect from wifi, browser crash, etc.

This is the current intended functionality. There are improvements being made that will allow you to reconnect to an existing chat session in the future. There is a blog post about a possible workaround: https://developer.mypurecloud.com/blog/2017/07/18/embedding-web-chat/

To clarify, we are embedding the widget in an on-page modal because there is no way to close the embedded widget itself. The only option with the embedded widget is to end the chat. Is there a close function that I have missed in the documentation?

If not, the primary problem with embedding the widget in an on-page modal, is that closing the modal does not end the chat from the agent's perspective. On the other hand, reopening the modal starts a new chat, leading to multiple open chats with the same user. If there is not a function to close the chat, is there function to end the chat?

No, there isn't a close function at this time. That is going to be added in the future, however.

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