Or you can try using real queue id's in the body template itself should work.
Original Message:
Sent: 03-13-2025 04:04
From: Matsumoto Shun
Subject: Count the number of calls waiting in multiple queues
I made some changes to the query, registered the queue IDs that exist in the organization on the input screen, and tested the results, which showed the same error as above.
{
"filter": {
"type": "and",
"clauses": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "${input.queueId1}"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "${input.queueId2}"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "${input.queueId3}"
}
]
}
],
"predicates": [
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "voice"
}
]
},
"metrics": [
"oWaiting"
]
}
I executed the same query in a different organization than the one where the error occurred this time, and the response was returned without any problems.
Best Regards,
------------------------------
Matsumoto Shun
Unknown
Original Message:
Sent: 03-12-2025 06:07
From: Samuel Jillard
Subject: Count the number of calls waiting in multiple queues
Hello Matsumoto,
I just copied your query and tested against my test org, the only change I made was to replace the queue IDs with my queues and it did indeed show the two waiting calls I had.
"results": [
{
"group": {
"queueId": "28e96a73-2776-43c1-82d2-03fd956cd652",
"mediaType": "voice"
},
"data": [
{
"metric": "oWaiting",
"stats": {
"count": 1
}
}
]
},
{
"group": {
"queueId": "01b21902-c378-45ec-8df1-aef30d6638d2",
"mediaType": "voice"
},
"data": [
{
"metric": "oWaiting",
"stats": {
"count": 1
So, other than not having valid queueIDs in your example, your query does work.
------------------------------
Sam Jillard
Online Community Manager/Moderator
Genesys - Employees
Original Message:
Sent: 03-11-2025 21:33
From: Matsumoto Shun
Subject: Count the number of calls waiting in multiple queues
Hello Everyone.
I want to count the number of waiting calls for a given multiple queue using POST /api/v2/analytics/queues/observations/query.
I have Execute Requested the following request template in API Explorer and got Response: 200.
However, when I tested the same configuration on the actual data action screen, the following error occurred
What is the cause of the failure in the Genesys Cloud data action, even though it was successfully executed in the API Explorer?
<Error Message>
Execute: The request could not be understood by the server due to malformed syntax.
REST call for action execute failed. Message: Request to backend service failed. Unable to decompose query into a set of (queueId, mediaType) pairs.", 'code': 'bad.request', 'status':400, 'messageParams':{}, 'contextId': "5b351d75-3ba2-47f2-8f83-1f7b 48651686", 'details':[], 'errors':[]} [b05cfc63-db1e-4707-9dd8-a2da7ce6a87e]
<Request Body Templete>
{
"filter": {
"type": "and",
"clauses": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "99999999-9999-9999-9999-999999999999"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "99999999-9999-9999-9999-999999999999"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "99999999-9999-9999-9999-999999999999"
}
]
}
],
"predicates": [
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "voice"
}
]
},
"metrics": [
"oWaiting"
]
}
#API/Integrations
------------------------------
Matsumoto Shun
Unknown
------------------------------