Generally I use /api/v2/analytics/conversations/aggregates/query to query a queue's metrics,
Then in my DataAction in the success template use a JSON path to specify which metric I am after, and then use First From Array to convert the result from an array to a string, since I know there will only be one value.
Almost any Genesys queue or conversation API is going to be in the format of Object, array of objects, array of values
And you can absolutely still use DataActions in Genesys Architect to grab those values.
Check out this discussion to get yourself started on using the first from array velocity macro
https://developer.genesys.cloud/forum/t/how-should-i-structure-the-first-from-array-response-here/8683
Or as Breno mentioned you could use it as a JSON object, but that can be more fiddly and very little error detection / handling in place for that.
------------------------------
Anton Vroon
------------------------------
Original Message:
Sent: 02-19-2024 15:01
From: Rizwan Khan
Subject: Get the count of total in-queue call for all voice queues in architect flow.
Hello There,
We have a requirement to send the caller to a different flow or disconnect if the total calls in all voice queues is greater than 10 (we have multiple voice queues). I tried to use "/api/v2/analytics/flows/observations/query" in architect as data action. But unable to use it as architect does not allow the use of nested arrays. Let me know if there are other ways to achieve it.
Regards,
Rizwan
#ArchitectureandDesign
#Implementation
#PlatformAdministration
#SystemAdministration
------------------------------
Rizwan Khan
Tata Consultancy Services Ltd
------------------------------