Looking at the most detailed info I have found for Genesys chat (it seems valid for Genesys premise and Genesys Cloud platforms, and in my case I'm interested in Genesys Cloud:
If you want to get access to the Conversation ID corresponding to the chat session, you can subscribe to the WebChatService.started event.
The event contains a conversationId attribute (e.data.data.conversationId).
You can also retrieve the conversationId using a WebChatService command while the chat is still active.
CXBus.command('WebChatService.getSessionData')
Superb Jerome, really helpful! The other problem we have is that utilization for chat is set to 3 for all the agents, and when an agent got 3 simultaneous chat (only in that case, very weird, doesn't happen for 1 or 2 simultaneous chats) and the end customer ends the sessionm, the remote site sends a "WebChat.endChat" command but on agent side the chat is not ended. No matter which one of the three sessions tries to finalize, the 3 remain active on agent side (Genesys Cloud UI). Any ideas or possible workaround? Thanks in advance
I would suggest opening a ticket with Genesys Care (as we can't investigate customer data/env on this forum).
This is not a normal behavior.
I just tried it on my sandbox (connecting 3 chats to the same agent - utilisation set to 3) and didn't have this problem. I could end the 3 chats sessions on customer side, and all of them changed to chat ended/disconnected on agent side. My agent just had to select the WrapUp code for these ended chat conversations.