Hello.
We are planning to provide service statistics and real-time data as a separate solution.
The items we would like to provide are as follows:
Incoming calls / Response calls / Abandoned calls
We implemented the following, referencing the documentation.
Statistics - Inbound Calls = service_performance.num_calls_received
Statistics - Response Calls = service_performance.num_calls_answered
Statistics - Abandoned Calls = service_performance.num_calls_received - service_performance.num_calls_answered
Real-Time Inbound Calls = StatisticsAPI.Service.in_calls_received_per_day
Real-Time Response Calls = StatisticsAPI.Service.in_calls_handled_per_day
Real-Time Abandoned Calls = StatisticsAPI.Service.in_calls_received_per_day - StatisticsAPI.Service.in_calls_handled_per_day
[1] I would like to know the abandoned call formula to match the
Inbound Calls = Response Calls + Abandoned Calls.
Using the Abandoned Calls provided by Bright Pattern, the Inbound Calls = Response Calls + Abandoned Calls formula does not work, so I implemented the Abandoned Calls formula as shown above.
[2] I would like to match the statistics and real-time data. Here’s a case I tested:
2.1-. Service A receives a call
2.2. Agent 1 responds
2.3. Agent 1 transfers a call to Agent 2
2.4. Agent 2 responds
If I do the above,
the statistics count two incoming calls,
and the real-time count is one.
So, if I add in_transfers_received_per_day to the real-time incoming calls,
it’s somewhat accurate, but it’s still not perfect.
[3] I want to align Report and CallDetail.
Can I match the numbers for Query 1 and Query 2?
Query 1
select
service_name,
sum(num_calls_received) as num_calls_received,
from sp_example_com_reporting.service_performance
where start_time >= date_sub(‘2025-10-21 00:00:00’, interval 9 hour)
and start_time <= date_sub(‘2025-10-21 23:59:59’, interval 9 hour)
group by service_name
order by start_time, service_name
Query 2
select
service_name,
count(*)
from sp_example_com_reporting.call_detail
where start_time >= date_sub(‘2025-10-02 00:00:00’, interval 9 hour)
and start_time <= date_sub(‘2025-10-02 23:59:59’, interval 9 hours)
group by service_name
order by start_time