Hmm, were you testing this Data Action by using conversation ID where you had participant "agent"? If so, there is probably an issue with the Data Action contract.
Original Message:
Sent: 10-31-2024 11:21
From: Scott Stewart
Subject: Adding Agent/User ID to Participant Data
Thanks @Vaun McCarthy and @Tatjana Knezevic for your feedback and suggestions. I was able to finally get the userId added to the participant data using a Workflow in Architect and the Trigger referenced in my original post. I tried adding it through the page load in the script but that caused the data to be entered in a separate section of the interaction details.
I also tried adding $.participants[?(@.purpose == 'agent')].userId to the translationMap in the Data Action but continued to receive additional JSON errors when testing the data action due to the way the data was organized in the API response and the Output contract.
Thanks again for responding to my original request.
------------------------------
Scott Stewart
Business Analyst
Original Message:
Sent: 10-25-2024 16:50
From: Scott Stewart
Subject: Adding Agent/User ID to Participant Data
Hi All,
I am looking for the simplest way to add the Agent ID/User ID to the participant data of an interaction. I have tried using scripts, workflows, and data actions but have not had any luck so far. With workflows I am able to initiate the workflow using a trigger and using the Set Conversation Data the User ID attribute is added to the participant data but it is blank.. When I debug the flow with the IsNotSetorEmpty logic, it reports that the variable is not empty. The trigger I am using is
v2.detail.events.conversation.{id}.user.start
and I have set the trigger to only launch if both a conversationId and userId exist.
With the data action I am using the /api/v2/analytics/conversations/details API but I can't figure out how configure the translation map for the response despite following the examples in Response configuration for data actions - Genesys Cloud Resource Center
With the script, the only way I can see to export the agent info is with the use of a button which I am trying to avoid.
Appreciate any suggestions.
#Reporting/Analytics
------------------------------
Scott Stewart
Business Analyst
------------------------------