We are using Web Messenger and we want to get the conversationId when a chat session is established (Messenger starts) so that this conversationId can be passed to backend system for some custom reporting requirements. To achieve this tried to subscribe to events like "MessagingService.messagesReceived". But all these events doesn't have the conversationId in the attributes passed in these event. Instead it has only the messageId which I need to pass as an input to "/api/v2/conversations/messages/{messageId}/details" and get the conversationId from this API. By using this approach I am able to get the conversationId but eventually, it is increasing the number of API calls. So just wanted to check if there is a way to get the conversationId directly from cookie or subscribing to events when session is created and get the ID as an attribute in the payload?
You could listen to the customer start event, and filter the interactions by messaging media type. Once you receive this event, you could execute an API call into your system within a Genesys Cloud Workflow. I think that would give you what you need.
I have checked the Process automation and Notification topics, but in order to subscribe to the customer end
topic (v2.detail.events.conversation.{id}.customer.start) I need to have the conversationId in the UI.
I am not sure what is the best way to get the conversationId in the UI so that I can subscribe to the customer start/end topic
For notifications, you need the actual guid of the conversation Id.
For EventBridge and Process Automation.. You do not need to specify the conversation ID. You receive all events for the conversations that match the filters within your trigger. That is why Genesys recommends these integration types - you get the events for the things that you care about. You don't need to do the leg work to process the events; Genesys does that.