How to Retrieve the Current Conversation Id?

Hi,

I hope I am not missing something obvious here but I could not find a way to retrieve the current conversation id using the Messenger Javascript SDK. I have listened to most of the events in MessagingService plugin but I could not find one that returns the conversation id. Can anyone advise?

Hi - internal ConverstionId is not exposed via Guest API. What is the use-case for getting ConversationId via JS SDK?

We trigger a customer satisfaction survey when a conversation is disconnected (i.e. receiving the disconnect event) and would like to map the survey result to the conversation using the conversation id so that supervisors could easily locate the conversation to check the transcript. I have thought of using the session id in localStorage for mapping but I could not seem to find this session id in the Interaction details.

Hi @CTINT_Frankie ,

please go through with this api 'GET
/api/v2/analytics/conversations/{conversationId}/details'

this API will provide the session id, below Iam attaching the response json.
image

I hope your doubt is cleared.

Regards,
Subith O U

Assuming this is 3rd party survey, you could pass a custom-defined unique "survey" ID from Messenger SDK client as Custom Attribute, which maps to Participant Data, and then use that same unique ID in your survey solution for mapping.

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