From my understanding, closing a custom widget (or WebSocket) doesn't terminate the conversation, as web messaging is designed to be persistent.
When the user clicks your "End Chat" button, you'd need to trigger a clear/disconnect action behind the scenes to properly end the conversation.
These don't cover custom widget implementation directly, but they do explain the behaviour you'll need to replicate.
Hope someone from community has done this or might have a different approach to this.
Original Message:
Sent: 04-29-2026 07:30
From: Orestis Dimitropoulos
Subject: Web Messaging Guest API - End-user Disconnect
Hello Phaneendra,
Thank you for the prompt response.
That can be a problem. Ideally, we would like to do that without using the Platform API. We were hoping that Web Message Guest API offers such a capability. Reviewing the relevant documentation and considering your update as well, it seems that this is not something we can accomplish.
------------------------------
Orestis Dimitropoulos
Original Message:
Sent: 04-29-2026 06:59
From: Phaneendra Avatapalli
Subject: Web Messaging Guest API - End-user Disconnect
Hi Orestis,
From my understanding, closing a custom widget (or WebSocket) doesn't terminate the conversation, as web messaging is designed to be persistent.
When the user clicks your "End Chat" button, you'd need to trigger a clear/disconnect action behind the scenes to properly end the conversation.
If needed, this could also be handled via the Platform API (e.g., PATCH /api/v2/conversations/messages/{conversationId} to set the state to disconnected), but typically this logic should sit behind that button in your custom widget.
Hope this helps and someone might add more to this.
------------------------------
Phaneendra
Technical Solutions Consultant
Original Message:
Sent: 04-29-2026 05:43
From: Orestis Dimitropoulos
Subject: Web Messaging Guest API - End-user Disconnect
Hello,
We are using Web Messaging channel. A widget has been developed using the Web Messaging Guest API. We are not using the out of the box Genesys widget for Web Messaging.
The problem is that when end-user closes the custom developed chat widget (there are buttons within the widget that he/she can select), conversation is not terminated and remains active. As a result, it is finally routed to an agent, agent sends messages that are delivered.
The same issue is not observed when using the out of the box widget, as if the end-user selects to end the conversation (by choosing the garbage icon in the upper side of the widget window), this actually terminates the conversation immediately.
Is there a way to modify the custom developed widget in order to terminate the conversation properly?
Thank you,
Orestis.
#PlatformAPI
#PlatformSDK
#WebMessaging
------------------------------
Orestis Dimitropoulos
------------------------------