Hello,
The POST endpoint api/v2/analytics/queues/observations/query allows you to query real-time queue observation metrics in Genesys Cloud.
This is particularly useful for retrieving live data, such as the current number of interactions waiting in a queue.
Example Request Body
JSON
{
"metrics": [
"oWaiting"
],
"filter": {
"type": "and",
"clauses": [
{
"type": "or",
"predicates": [
{
"dimension": "queueId",
"value": "{queueID}"
}
]
}
]
}
}
You can make it more precise by also filtering on media type:
JSON
{
"results": [
{
"group": {
"queueId": "{queueId}",
"mediaType": "voice"
},
"data": [
{
"metric": "oWaiting",
"stats": {
"count": 1
}
}
]
}
]
}
Key Response Details
The relevant data is typically found in this path:
$.results[?(@.group.mediaType=='voice')].data[?(@.metric=='oWaiting')].stats.count
- Metric: "oWaiting"
- Common mediaType: "voice" (for phone calls; can also be "chat", "email", "callback", etc.)
- Meaning of the value: The count represents the current number of interactions (e.g., calls) in the waiting state in the specified queue at the exact moment of the query.
This value matches exactly what you see in the Genesys Cloud interface under:
- Queues Activity dashboard → Waiting column
- Performance Views → real-time queue statistics
In other words, it shows how many people/calls are currently queued and waiting for an agent - before your own new interaction enters the queue.
------------------------------
Alesson Santos
Mid-Level Developer
------------------------------
Original Message:
Sent: 03-13-2026 10:09
From: Mariusz Ziemiecki
Subject: In Queue Position before call enter the queue
Hi
I have a question regrading Position In Queue for inbound voice interaction.
Business team would like to present PIQ message just before the call will be transferred to ACD Queue. The root cause is to inform the caller about a possible huge number of calls already waiting in a queue before queuing the call. In that scenario there is a chance the caller will disconnect and contact later by Chat/Email before the call enter the queue (for e.g. during message the call will be recorded). Abandon shouldn't be counted, as it happens currently quite often if the caller hears there is more than for e.g. 10 other calls after the call hits the queue.
So, standard Call.PositionInQueue expression is available only from In-Queue flow - It's not possible to use it under Inbound Call Flow
Public API offers /api/v2/routing/queues/{queueId}/estimatedwaittime to use with DataAction from Inbound Call Flow but it returns EWT - not possible to get PIQ
Any idea how to get PIQ from Inbound Call Flow?
Regards
#API/Integrations
#Routing(ACD/IVR)
------------------------------
Mariusz Ziemiecki
------------------------------