Hi Sandor,
From my understanding, yes, you can make a routing decision based on a queue's Estimated Wait Time (EWT) before transferring the call.
One option is to use the built-in Architect GetQueueEstimatedWaitTime() function. For example:
State.EWT = GetQueueEstimatedWaitTime(FindQueue("Queue Name"), "call")
You can then use a Decision action such as:
If(IsSet(State.EWT), State.EWT > MakeDuration(0, 0, 5, 0), true)
Alternatively, if you already use Data Actions, you can call the Estimated Wait Time API:
GET /api/v2/routing/queues/{queueId}/mediatypes/{mediaType}/estimatedwaittime
This can also be useful if you need to retrieve the EWT for specific labels within a queue.
For PIQ (People in Queue), I don't believe there is an equivalent native function available in an Inbound Call Flow. If approximating the number of waiting interactions meets your requirement, you could explore using the Analytics API via a Data Action:
POST /api/v2/analytics/conversations/activity/query
You can retrieve the oWaiting metric for the target queue and use that value in your routing logic. While this isn't the same as the caller's actual position in queue, it may be sufficient depending on your use case.
Hope this helps.
------------------------------
Phaneendra
Technical Solutions Consultant
------------------------------