kobaken | 2021-08-20 05:55:19 UTC | #1
HI,
Using the WebSocket Guest API, when the agent disconnects the interaction, nothing flows to the Web socket side, so it is unknown whether the agent disconnected the interaction. As a result, I think I have to keep the sockets open, which makes it difficult to manage the sockets. Is there any good way?
chad.hansen | 2021-08-24 17:53:22 UTC | #2
Hi kobaken,
Even though the agent has disconnected, the websocket still remains active for 72 hours since the last message was transmitted. You should subscribe to the websocket close event and attempt a reconnect. If the websocket is still active, the reconnect will succeed.
Thanks, Chad
kobaken | 2021-08-25 00:10:52 UTC | #3
Hi Chad, Thank you for your response.
I know socket remains active for 72 hours, so if the customer send message within 72 hours and if socket have already disconnected, we're able to reconnect socket and send message to GenesysCloud.
But "agent" side, If the socket is disconnected during the interaction, the message will not reach the application. The point is that once the agent terminates the interaction, nothing comes to the WebSocket side, so it is difficult to determine how long the WebSocket will be retained.
Is it a good way to get the agent to press a "End button" in the script at the end of the interaction? regards,
chad.hansen | 2021-08-25 17:36:01 UTC | #4
Hi kobaken,
If the agent disconnects, the websocket should still remain connected for the customer. The customer can still reply and messages will be routed into the Genesys Cloud inbound message flow.
I hope this helps. Thanks, Chad
kobaken | 2021-08-26 00:21:06 UTC | #5
Hi Chad,
So you mean, We should keep Web Socket open for at least 72 hours per customer, right?
chad.hansen | 2021-08-26 15:32:05 UTC | #6
Hi kobaken,
The web messaging session will stay open for at least 72 hours and will close automatically once inactivity exceeds 72 hours. When this happens, you should then disconnect the websocket.
kobaken | 2021-08-27 03:49:56 UTC | #7
Hi Chad,
Sorry, I made a slight mistake in the expression. You mean, We should keep Web Socket "connected" for at least 72 hours per customer, right?
I use an application between Genesys Cloud and users, so User doesn't have a direct connection to GenesysCloud. It's hard for the application to stay connected for long time, and I wanted to disconnect and reopen it as needed. I want to disconnect the WebSocket once the agent finishes the interaction.
Thanks.
Jerome.Saint-Marc | 2021-08-30 10:53:28 UTC | #8
Hello,
As you have probably seen already, there are no propagated events/notifications when the agent connects or disconnects in the Web Messaging Guest API.
If you don't want to maintain websockets, you should maybe consider using the Open Messaging integration and API. Open Messaging does not rely on websockets. It is using outbound Webhooks - a request is made to that url whenever a message, coming from the Contact Center (bot, workflow, agent) is to be sent to the customer.
Regards,
kobaken | 2021-08-30 10:53:55 UTC | #9
Hi Jerome,
Thank you for your response! You're right. Certainly I should use the Open messaging API!
regards,
This post was migrated from the old Developer Forum.
ref: 11790