RjElanga | 2023-01-09 08:04:38 UTC | #1
Hi,
I have a use case where I look for the TOTAL of Onqueue agents with Skills Required.
The DEPRECATED /api/v2/routing/queues/{queueId}/users returns total and it totally fit my requirement
URL Request:
/api/v2/routing/queues/${input.QUEUE_ID}/users?joined=true&skills=${input.Skill1}&skills=${input.Skill2}&presence=On%20Queue
Looks for OnQueue agents with the 2 Skills required and returns a TOTAL
However the new API
/api/v2/routing/queues/${input.QUEUE_ID}/members?joined=true&skills=${input.Skill1}&skills=${input.Skill2}&presence=On%20Queue
Does not Return any TOTAL value. I can't find a way to meet this requirement. Can you please provide any tips or workaround since the developers have removed the TOTAL value from the return.
I tried retrieving the array thru this jsonpath, Then creating a count in architect however translation map default kicks in , expected output should be the array.
Translation Map as $.entities.[user[name]] However Translation Map Default
"translationMapDefaults": { "total": "\"\""
RjElanga | 2023-01-09 08:33:19 UTC | #2
Found a way where I map an array then count the array inside the architect. However I am worried about the load or delays in architect if there are more than 1 pages returned.
Will there be a significant delay or not?
Jerome.Saint-Marc | 2023-01-09 08:59:06 UTC | #3
Hello,
You can count the number of entities in your Data Action as well. In your translationMap, something like:
"total": "$.entities.size()"
(I think $.entities.length() also works).
Regards,
RjElanga | 2023-01-09 11:55:46 UTC | #4
Thank you. updating to $.entities.size(
system | 2023-02-09 11:56:26 UTC | #5
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: 17887