I am trying to develop a use case with the webchat widget: I tried to configure it in order to finish a the current webchat session and reload the submit form again to start a new webchat conversation again without reload the whole page. But it failed.
I investigated in the Google Chrome developer tools that the webchat widget - version 1 with cobrowse - creates an iframe inside the chat-container html tag once we create one, but when we start again a new conversation a new iframe stacks under the lastone.
In addition, we got the following error when we start the new session:
"Firefox cannot establish a connection to the server at wss: //realtime.mypurecloud.com/realtime/socket.io-1.x/? RealtimeSessionId = xxxxxxxxxxxxxxxxxx; EIO = 3 & transport = websocket & sid = xxxxxxxxxxxxxxxxxxxxxxxxx."
We have just done it during the last 5 days and we had not only have to do that strategy but also we had to clean the ININ.webchat variable once the chat ends and verify with a flag if the webchat was loaded once a new webchat starts, or once the customer reloads the webpage, or once the customer redirects to another page and still being in the chat conversation.
By only emptying the content from the container the purecloud webchat puts another html tag in which maintains a webchat storage for the sessions you have stablished and, consequently, the next interaction will be stacked in the webchats sessions stack that it maintains in that storage and it will display them in that container. So we have to make the ININ.webchat nullable. This was our experience.