I'm using genesys webmessaging configured via admin panel, I need to check if the web socket is active or not. How can I implement this?
Hi Kaemysh,
Did you take a look at this: https://developer.genesys.cloud/commdigital/digital/webmessaging/websocketapi#check-the-health-of-a-websocket-connection
@John_Carnell , I'm not using guest API, we are using plugin and commands by loading the genesys script which we get upon messenger configuration in admin panel. For this approach how can we check if the web socket connection is active or not?
Hi Kamesyh,
Thanks for the clarification. Let me do a little more digging.
Thanks,
John
@John_Carnell sure please, this is required for us to detect the websocket disconnection.. I believe genesys does not handle the web socket disconnect from customer end and intimating it to Agent that customer closed the browser window abruptly. This leads to agents keep waiting for the message from customer. To mitigate this issue, we need a mechanism to detect if the web socket is active or not.
Hi Kamesyh,
The Genesys Messenger already included a WSS heartbeat by using the ECHO request each 30 sec without activity.
If the system detects a connection closed, the agent will have a small warning below his message to show him there is a connection issue. If the customer reconnects on the same session, this warning will disappear
I hope it's clarify
regards
Fred
@Frederic_Thomas , so basically if the customer closes the window/tab abruptly causing the websocket connection to end and during that time the agent would be seeing a warning message?
We noticed that agent would see the connection issue message only when the agent tries to send the message to customer and it fails with connection issue.
Now, this is not a right way to intimate the agent that customer has left the chat abruptly right? Genesys should detect if the websocket is disconnected or not and intimate the agent before sending any further message to customer.
However, in current plugin commands and events or is there any API we can call upon the web socket connection and inject the message to the agent stating that chat has been closed abruptly?
if the customer closes the window/tab abruptly causing the websocket connection, the agent would be seeing a warning message if he tries to send a message
WebMessaging is an async channel, message sent by the agent are not lost, if the costumer reconnects, he will receive them.
you can use "Clear Conversation" is it's allow in your configuration, but in this case the session will be ended
I just need a way to detect if web socket is closed or not, do we have any way to find it? I need it on the UI Side.
on agent side you mean ? except the warning on send message, there is no way out of the box
No from the code Point of view, do we have control to tap in to check if websocket is active or not?? perhaps creating our own heartbeat to websocket?
This command on MessengerSDK side is what you are looking for ?
Genesys("subscribe", "MessagingService.offline", function() {});
this will be published upon websocket disconnection? but when the tab is closed its already too late to intimate the agent with sendmessage command right?
you need an heat beat on agent side ?
yes yes that is correct.
OK except the error on the message, I don't have a correct answer / solution to provide
(use Typing event as heart beat ? I am not sure you will have an error TBC)
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.