Original Message:
Sent: 05-06-2026 19:12
From: Elisson Fernandes
Subject: unable to pull queue id based on agent id
Hi Abhinesh,
I was able to make it work using a Function. However, the current code answers this specific question:
For this UserID, what was the first QueueID found?
Is that the goal you are trying to achieve?
Could you please share where you plan to use this Action and why you need to retrieve the queueId? That will help us better understand the scenario and validate whether this is the best approach.
------------------------------
Elisson Fernandes
Original Message:
Sent: 05-06-2026 09:19
From: Abhinesh Gupta
Subject: unable to pull queue id based on agent id
Hi,
Yes, but on retrieving the value globally could help.
More generic way to get that agent leg.
Further advise would be helpful.
------------------------------
Abhinesh Gupta
Original Message:
Sent: 05-06-2026 08:33
From: Elisson Fernandes
Subject: unable to pull queue id based on agent id
Hi,
Using the translationMap below with the userID value hardcoded, I was able to execute the Data Action successfully. However, when I replace it with the variable value, an error occurs.
{ "translationMap": { "rawQueueId": "$.participants[?(@.purpose == 'agent' && @.userId == 'e175XXXX-XXXX-XXXX-XXXX-XXXX5ed5797')].sessions[*].segments[*].queueId" }, "translationMapDefaults": { "rawQueueId": "[\"NOT_FOUND\"]" }, "successTemplate": "{\"QueueID\": ${successTemplateUtils.firstFromArray(\"${rawQueueId}\")}}"}
While researching in the community, I found this post mentioning that it is not possible to use variables in the translationMap:
https://community.genesys.com/discussion/dataaction-can-we-use-input-variable-into-translationmap-condition
I think we will need to change the way we collect this data and maybe use Functions.
I had to pause the analysis because of a few meetings, but I'll check later to see if there is another option and let you know.
------------------------------
Elisson Fernandes
Original Message:
Sent: 05-06-2026 06:22
From: Abhinesh Gupta
Subject: unable to pull queue id based on agent id
I am working on a data action to fetch the QID using the agent ID from a specific conversation leg. I am leveraging the relevant API and have updated the detection configuration. However, when I test the setup, it returns a "Not Found" error.
API: /api/v2/analytics/conversations/${input.conversationId}/details
Input to data action:
Agent ID & Conversation id
Data Action Response
{
"translationMap": {
"rawQueueId": "$.participants[?(@.purpose == 'agent' && @.userId == '${input.targetAgentId}')].sessions[*].segments[*].queueId"
},
"translationMapDefaults": {
"rawQueueId": "[]"
},
"successTemplate": "{\n \"queueId\": \"${successTemplateUtils.firstFromArray(\"${rawQueueId}\", \"NOT_FOUND\")}\"\n}"
}
Any suggestions
#API/Integrations
------------------------------
Abhinesh Gupta
------------------------------