Olá @Orestis Dimitropoulos, tudo bem?
Você está no caminho certo ao analisar Trunks Metrics e Flow Activity, mas realmente nenhum desses endpoints retorna, por si só, quantas chamadas estão neste momento dentro de IVR (sem estar em fila ou com agente).
Para obter exatamente esse número, a abordagem mais consistente é utilizar o Analytics Conversation Detail com filtro por segmento.
Solução Recomendada
Use o endpoint:
E filtre conversas em andamento (inProgress) onde o segmentType = ivr.
Exemplo de Query:
O que isso retorna?
A lista de conversações que neste momento têm pelo menos um segmento ativo dentro de IVR.
Daí, basta contar os resultados.
Caso você precise usar isso em Roteamento/Architect
Você pode encapsular essa consulta em uma Data Action (com o Analytics API) e chamar dentro do fluxo.
Então no Architect você pode:
-
Chamar a Data Action
-
Retornar count
-
Fazer routing baseado nesse valor
→ Ex: Se IVR congestionado, desviar para outro fluxo, outra URA, outra fila etc.
Por que essa abordagem é melhor?
| Método |
Limitação |
| Trunk Metrics |
Conta chamadas em qualquer estado (fila/agente/URA) |
| Flow Activity |
Exige identificar todos os fluxos individualmente |
| Analytics Segment Filter (recomendado) |
Filtra exatamente chamadas em IVR, independente do fluxo |
------------------------------
Fernando Sotto dos Santos
Consultor Grupo Casas Bahia
------------------------------
Original Message:
Sent: 11-07-2025 07:43
From: Orestis Dimitropoulos
Subject: Number of active calls in IVR
Hello,
For every inbound call, I want to retrieve the number of concurrent (in-progress) voice calls that are currently in IVR. There is not a single IVR flow. Several IVR flows exists and added day to day. Based on the returned number, a routing decision will be made. I am wandering if Genesys Cloud offers an API to retrieve the aforementioned count or is there any native way to retrieve that?
After thorough investigation and research i have come up with several ideas but none is proved suitable:
a. GET /api/v2/telephony/providers/edges/trunks/metrics
I could use this API to get the number of active calls for all available trunks.
Issue: The above returns all active calls no matter if these are still in IVR or in queue or talking with an agent. I need to get the number of active calls within IVR only.
b. POST /api/v2/analytics/flows/activity/query
I could use this API to get to oFlow metric.
Issue: There are a lot of inbound flows to consider. In the future, there may be more added. So i cannot really use it.
Any thoughts or ideas?
Best Regards,
Orestis.
#PlatformAPI
------------------------------
Orestis Dimitropoulos
------------------------------