t-iizuka | 2020-10-13 08:55:25 UTC | #1
Hello everyone,
I'd like to get total waiting number the multiple queues in the one request. I expected to get total waiting number in all queues,however the data action only returned first values. Could you tell me where incorrect syntax ?
Regards, Taku IIZUKAGet-Num-of-Call-Waiting-in-Queue-20201013101655.custom.json|attachment (1.9 KB)
Jerome.Saint-Marc | 2020-10-13 11:14:05 UTC | #2
Hello,
The request you are using in your Genesys Cloud Data Action - POST /api/v2/analytics/queues/observations/query - returns a JSON object, with a "results" array attribute.
The "results" array contains one element for each queue and mediatype combination (queueId1 && mediaType chat, queueId1 && mediatType email, ..., queueId2 && mediaType chat, queueId2 && mediatType email, ...).
If you are trying to make the sum of OWaiting counts for all queues & all mediaTypes, I think that you just need to make a small change in your Configuration Response. In your translationMap, change "WaitingCountarraynum": "\$.results[0].data[0].stats.count" to "WaitingCountarraynum": "\$.results[*].data[0].stats.count" This new JSONPath expression ("WaitingCountarraynum": "\$.results[*].data[0].stats.count") will create an array of stat count values - that you are then using in the math macro.
You could also modify your Contract Output, defining "WaitingCount" as "integer". But this is probably not mandatory.
Regards,
t-iizuka | 2020-10-14 01:04:25 UTC | #3
It couldn’t have gone better! Thank you for your quickly response.
this issue resloved.
Best Regards, Taku Iizuka
system | 2020-11-13 01:04:26 UTC | #4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 9041