Hi Abhinesh,
As per the documentation, from my understanding the translationMap uses JSONPath to extract values from the response only, and input variables (like ${input.targetAgentId}) aren't resolved inside JSONPath conditions. That's why your filter works when hardcoded, but returns NOT_FOUND when using a variable.
For reference:
https://help.genesys.cloud/articles/response-configuration-data-actions/
One way you could try is return a broader result set, for example:
{
"translationMap": {
"participants": "$.participants[?(@.purpose == 'agent')]"
},
"translationMapDefaults": {
"participants": "[]"
},
"successTemplate": "{ \"participants\": ${participants} }"
}
Then apply the filtering:
- In Architect (using a loop + decision), or
- In a Function / backend
Alternative approach
You could also use Genesys Functions, where you pass the conversationId and targetAgentId, perform the filtering in code, and return the exact queueId. This avoids the JSONPath limitation entirely and gives you more flexibility for handling multiple segments or transfers.
Hope this helps following this post to see more replies.
------------------------------
Phaneendra
Technical Solutions Consultant
------------------------------
-------------------------------------------
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
------------------------------