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.
- 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.