LWSChad | 2022-04-22 10:32:34 UTC | #1
Hello, I am working through a web messaging application and I am unable to determine when an agent has closed the interaction. I would like to be able to notify and eventually close the messaging session for the chatter.
I've tried checking the WebSocket status (or ready state) ` socket.readyState` and performing a WebSocket health check ` { "action": "echo", "message": { "type": "Text", "text": "ping" } }`
As far as I can tell, both the readyState and health check ping response are the same before and after an agent closes the session or interaction.
Am I missing something? Any suggestions?
Thank you CHAD
Angelo_Cicchitto | 2022-04-22 13:31:05 UTC | #2
Hi Chad, For now the internal "conversation" state is not exposed to the end-user client, you wouldn't be able to determine whether Agent has disconnected. I know some businesses may want to prevent end-users from replying to agent, as messages like "thank you" would resume the conversation and routed to agent again. If that's the case, you could add logic to your Inbound Message flow to detect that it's an existing conversation, and have triage Bot to announce something like "Welcome back, your conversation was resolved: do you want to resume it?" This would filter out all the "thank you" messages. We do have an upcoming feature to align the End-user's Guest session with the Agent's session, which would make it easier to address this: https://genesyscloud.ideas.aha.io/ideas/DXWMM-I-7
LWSChad | 2022-04-22 13:23:36 UTC | #3
Hello again, Use case is to close the chat session / frame for anonymity again. If the chatter leaves, we don't want someone else coming to their phone or computer and seeing the conversation.
I'll add some client logic to either time out or listen for a canned response from the agent indicating the session will be closed and follow the progress of this upcoming feature.
Thanks again!
Angelo_Cicchitto | 2022-04-22 13:24:52 UTC | #4
Thanks for raising, these are good use-cases to think about.
David_Hawken | 2022-04-25 12:47:13 UTC | #5
Hi Angelo, we used that same logic in our message flow to check if it is a new session. However, a lot of the time we find the customer types thank you and closes the session, not responding to the bot question. This causes the conversation to error for 72 hours before being presented again. It's a real issue that when a customer doesn't answer a bot, we can't configure anything. It just errors by default and the 72 hours, I'm told, isn't something a customer has control of either.
Angelo_Cicchitto | 2022-04-26 08:39:33 UTC | #6
Agree David, here's the corresponding Idea to enable a no-input timeout logic for Digital Bots: https://genesyscloud.ideas.aha.io/ideas/AI-I-90
system | 2022-05-27 08:40:30 UTC | #7
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 14419