Legacy Dev Forum Posts

 View Only

Sign Up

Unable to close an interaction using the Web Messaging Websocket API

  • 1.  Unable to close an interaction using the Web Messaging Websocket API

    Posted 06-05-2025 18:38

    wesleyfalcao | 2024-07-15 18:04:39 UTC | #1

    I initiate a conversation into Genesys using the Web Messaging WebSocket API, and an agent picks up.

    When the end user leaves the conversation, I want to be able to close the interaction (as is possible through the Web Chat Guest Chat API).

    However, thus far I have been unsuccessful. I have tried both the End User clear conversation event (https://developer.genesys.cloud/commdigital/digital/webmessaging/websocketapi#end-user-clear-conversation-event) and the Closing all connections (https://developer.genesys.cloud/commdigital/digital/webmessaging/websocketapi#closing-all-connections) call.

    The End User clear conversation event gives me

    {"type":"response","class":"string","code":403,"body":" events are not supported","tracingId":"7505db3c-33b5-4a59-8d99-3430d94f60f8"}

    The documentation says "End user clear conversation is not enabled by default. You may enable this feature within the messenger configuration."

    And I have indeed enabled this in the messenger configuration

    and also ensured that I have deployed this version in the Messenger Deployments.

    So it's unclear to me what I am missing. I am operating under the assumption that if the clear event call works, then the interaction will get closed. If this is not true, please let me know.


    vpirat | 2024-07-16 06:18:35 UTC | #2

    Hi,

    Thanks for reaching out.

    wesleyfalcao, post:1, topic:27250
    I initiate a conversation into Genesys using the Web Messaging WebSocket API, and an agent picks up.

    How do you interact with the remote service ? Through SDK or your own build commands ? It looks like that the Clear session message you sent is missing some data, which is the reason for being rejected.

    Regards, V.P.


    wesleyfalcao | 2024-07-16 14:36:25 UTC | #3

    You are right. One of my field mappings for the websocket payload to Genesys was wrong. I was misled by the content of the error message that said "events are not supported". It should instead say something like "incorrect event format" or something like that.

    Thanks.


    system | 2024-08-15 14:37:13 UTC | #4

    This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 27250