How to find the conversationId of the Selected Interaction in Genesys Cloud?

Hello everyone,

I developed a client application in Genesys PureCloud. I want to perform the following tasks in this web application using purecloud-platform-client-v2.min.js.

  1. I want to find the ID of the clicked interaction and the ID of the previously clicked interaction. I subscribe to the Notifications API with "v2.users.${userId}.conversations". I have three interactions, but my if block is entered twice at a time and out of order. Therefore I cannot find the IDs of clicked and previously clicked conversations. When examining the data of two conversations, there is no feature to indicate which one was selected. Is there a method in JavaScript to achieve this?

function onSocketMessage(event) {
let data = event.data;
let parsedData = JSON.parse(data);
if (parsedData.eventBody.message == "WebSocket Heartbeat") return;
let topic = parsedData.topicName;
if (topic === v2.users.${userParameters.Id}.conversations) {
//twice
}
}
2) Can I follow only the selected interaction?

Thank you from now.

Hello,

There is no event generated when a user select an interaction in the UI (I mean no events related to UI actions: click, ...).
What you have noticed via "v2.users.${id}.conversations" is held/retrieved conversation events that happn for some media types (switching between 2 voice conversations will put one on hold and retrieve second one).
But I think this is not something you can rely on (some media types don't have held/retrieved concept, there could be some scenario where no held event will be generated if the conversation is already on hold, ...).

Regards,

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