lcreely | 2023-05-04 16:15:36 UTC | #1
I'm trying to set up an action that gets the number of calls waiting in a queue. I'm struggling to understand the following error: "Failed while processing the translation map. Could not resolve value for the key: 'stats_count' and no default value was configured. Additional details: Expected to find an object with property ['data'] in path $['results'] but found 'java.util.ArrayList'. This is not a json object according to the JsonProvider: 'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'."
URL Template: /api/v2/analytics/queues/observations/query
Request Body Template:
{
"filter": {
"type": "and",
"clauses": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "6d4d1261-d51c-46de-a486-9f93f11065b9"
}
]
}
],
"predicates": [
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "voice"
}
]
},
"metrics": [
"oWaiting"
]
}
Raw Output:
{
"results.group.mediaType": [
"voice"
],
"results.data.metric": [
[
"oWaiting"
]
],
"results.data.stats.count": [
[
0
]
],
"results.group.queueId": [
"6d4d1261-d51c-46de-a486-9f93f11065b9"
]
}
Any help would be very much appreciated
Jerome.Saint-Marc | 2023-05-04 17:48:13 UTC | #2
Hello,
You can have a look at this post - it is also about a Data Action on /api/v2/analytics/queues/observations/query. Contract and configuration is described there.
Regards,
Jason_Mathison | 2023-05-04 19:31:02 UTC | #3
If you are not able to get this figured out with the link that Jerome posted, please include the output from the "Execute" step of test mode and your translation map configuration.
--Jason
system | 2023-06-04 19:31:51 UTC | #4
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: 19745