We are using Web Messaging now, and I am trying to assosiate External Contact with the interaction.
I followed the solution here.
I am attaching my JSON output from analytic query (/api/v2/analytics/conversations/{conversationId}/details) and the conversation query (api/v2/conversations/{conversationId}).
Please guide me in understanding which sessionId (analytics query) or id (conversation query) should I use to associate the current interaction with an External Contact and why. I can see two objects in "purpose: customer" but not sure which to look for.
Regards
Maloy Karmakar
conversation_query.json (24.7 KB)
analytics_query.json (19.3 KB)
From the article you linked above:
THIS IS THE MOST IMPORTANT SECTION
At this point I call " ObtenerChatCommunicationId " : Which uses /api/v2/conversations/chats/${input.ConversationID} (Using the available variable Chat.ConversationId ) with this output
This means that for web messaging, you need to leverage the corresponding messaging API rather than the analytics and conversation APIs you linked. So, rather than using /chats/ api as the example you linked did, you need to use one for messages - /api/v2/conversations/messages/{conversationId}.
Thanx @anon39326996 for your update.
I tried used messaging API now in which I can find id in participants Array (where purpose: customer).
So, does that means, it will be my communicationID for this web messaging interaction?
Uploading the output of /api/v2/conversations/messages/{conversationId}
messaging_query.json (13.2 KB)
Hello,
The communicationId value to be used in the PUT /api/v2/externalcontacts/conversations/{conversationId} request to associate an external contact with a conversation corresponds to:
- any of the "sessionId" attributes (in the sessions array) of a customer's participant (purpose = customer)
i.e. in the result of an analytics query (/api/v2/analytics/conversations/{conversationId}/details)
- any of the "id" attributes (in the messages array - the messages array which is at the participant structure/object level) of a customer's participant (purpose = customer)
i.e. in the result of a conversation query (api/v2/conversations/{conversationId})
As you can notice, the "sessionId"s from the Analytics query (customer's participant - sessions array) correspond to the "id"s from the Conversation query (customer's participant - messages array). Same values.
In your case, you have 2 entries for the customer's participant as I assume your guest/customer started the web messaging conversation and sent a first set of message ->1st session.
This conversation was distributed to a Contact Center agent (who replied back and ended the conversation in the Genesys Desktop).
Then the guest/customer reopened the conversation sending a new set of messages -> 2nd session.
The conversation was again distributed to a Contact Center agent (who replied back and ended the conversation in the Genesys Desktop).
I have just done a test in my Genesys Cloud environment, and apparently you can use any of the customer's participant "sessionId"s (analytics query - sessions array) and therefore any of the the customer's participant "id"s (conversation query - messages array at the participant object/structure level).
I mean you can use first sessionId or the second one - it will work in both case.
Regards,