Baris_Can | 2024-01-10 14:33:55 UTC | #1
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 } }
- Can I follow only the selected interaction?
Thank you from now.
Jerome.Saint-Marc | 2024-01-10 15:16:15 UTC | #2
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,
system | 2024-02-10 15:16:31 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 23872