matt22 | 2019-11-08 14:52:14 UTC | #1
Hi everyone.
With the futur changes on api/v2/routing/queues/{queueId}/users I'm trying to create a new Action to get OnQueue Agent and NotResponding .
But i've got a problem on first one. 1- I need to use an input data on the Response filter and i dont know how. 2- I have to use a qualifier ID, but how can i do it properly ... does the Qualifier never change of Id ?
Here the Request
{ "requestUrlTemplate": "/api/v2/analytics/queues/observations/query", "requestType": "POST", "headers": { "UserAgent": "PureCloudIntegrations/1.0" }, "requestTemplate": "{ \"filter\": { \"type\": \"and\", \"predicates\": [ { \"type\": \"dimension\", \"dimension\": \"queueId\", \"operator\": \"matches\", \"value\": \"${input.QUEUE_ID}\" }, { \"type\": \"dimension\", \"dimension\": \"mediaType\", \"operator\": \"matches\", \"value\": \"voice\" } ] }}" }
and the Response
{ "translationMap": { "AgentsOnQueue": "$.results[?(@.group.queueId==\"532cd7ce-9208-4078-b012-a28b399273c6\")].data[?(@.qualifier==\"e08eaf1b-ee47-4fa9-a231-1200e284798f\")].stats.count" }, "translationMapDefaults": {}, "successTemplate": "{\"ONQUEUEAGENTS\" : ${successTemplateUtils.firstFromArray(\"${AgentsOnQueue}\")}}" }
I need to use ${input.QUEUE_ID} in place of the QueueId.
Thank you for your help.
Jason_Mathison | 2019-11-08 20:01:01 UTC | #2
Since you are matching a single queue ID on the request, you shouldn't have to worry about searching the response for it in your translation map.
As for question #2, please take a look at the following post and see if it can help you solve your question: https://developer.mypurecloud.com/forum/t/not-able-to-find-proper-response-data-action-config/6412/5
If not, please post a response you got from the endpoint, exactly what part of the response you want to pull out, and what you are trying that isn't working.
--Jason
system | 2019-12-09 20:12:27 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: 6444