Statistics

The Statistics API allows you to get aggregated stats about calls and chats. The data is updated every 1-2 hours, not in real-time like the other APIs.

Parameters

Name Description Example
endpoint_type The type of data to return (see below).
Reception
Main number statistics.
ChatReception
Chat reception statistics.
Employee
Employee statistics
start Start of interval as an ISO 8601 date. 2018-10-01
end End of interval as an ISO 8601 date. 2018-10-31
endpoint A comma-separated string of endpoints to filter by. Endpoints of different types cannot be mixed. Reception#101 ChatReception#201 Employee#1001,Employee#1002
group_by Aggregation key.
employee_id
Employee.
reception_id
Main number (not available when endpoint_type is ChatReception).
chat_reception_id
Chat reception (not available when endpoint_type is Reception).
ivr_key
The selected menu item in a phone menu (only available when endpoint_type is Reception).
period_month
Calendar month.
period_week
Week (first day of week is Monday).
period_day
Day.
period_hour
Hour.

Properties

The parameters present in the result depends on endpoint_type and group_by used in the request.

When endpoint_type is Employee or group_by is employee_id, the numbers are focused on the individual employee. This means that the numbers include main number calls and chats answered by the employee, as well as both incoming and outgoing mobile calls. Missed calls and chats are, however, not included.

When endpoint_type is Reception or ChatReception, or when group_by is not emplooyee_id, only incoming main number calls and chats are considered. In this case, both answered and missed calls/chats are included in the totals.

Name Description
key
{"key":"2018-10-01T00:00:00"}
{"key":"Employee#1001"}
The value of the aggregation key. The value is determined by group_by used in the request.
period_month
{"period_month":"2018-10-01T00:00:00"}
When aggregating by month, this is the date of the first day of the month.
period_week
{"period_week":"2018-10-01T00:00:00"}
When aggregating by week, this is the date of the first day of the week (Monday).
period_hour
{"period_hour":"2018-10-01T00:00:00"}
When aggregating by hour, this is the date and hour. The minute and second parts are always zero.
ivr_key
{"ivr_key":"1"}
{"ivr_key":"1-5"}
When aggregating by IVR key, this is the key(s) pressed in the phone menu. A maximum of 2 keys are returned, separated by a hyphen.
endpoint
{"endpoint":"Employee#1001"}
When aggregating by employee, reception or chat reception, this is the endpoint string.
call_count Total number of calls.
call_answered_count Number of calls that were answered.
call_missed_count Number of calls inside opening hours that were missed.
call_closed_count Number of calls received outside opening hours.
call_incoming_count Number of incoming calls.
call_outgoing_count Number of outgoing calls.
call_answer_time_average Average number of seconds calls were ringing before being answered.
call_duration_average Average call duration in seconds.
call_duration_total Total call duration in seconds.
call_sla Percentage (0-100) of calls answered within the SLA time specified for the main number.
chat_count Total number of chats.
chat_answered_count Number of chats that were answered.
chat_missed_count Number of chats that were missed.
chat_answer_time_average Average number of seconds chats were ringing before being answered.
chat_duration_average Average chat duration in seconds.
chat_duration_total Total chat duration in seconds.
chat_sla Percentage (0-100) of chats answered within 20 seconds.
smiley_count Total number of smileys received.
rating_average The percentage (0-100) of received smileys that were positive.

Request

/api/v2/statistics?endpoint_type=:endpoint_type&group_by=:group_by&start=:start&end=:end

Response

Status: 200 OK
{
  "rows": [
    {
      "period": "2018-10-01T00:00:00",
      "call_count": 252,
      "call_answered_count": 219,
      "call_missed_count": 4,
      "call_closed_count": 22,
      "call_answer_time_average": 16,
      "call_duration_average": 180,
      "call_duration_total": 45361,
      "call_sla": 91,
      "smiley_count": 16,
      "rating_average": 94,
      "key": "2018-10-01T00:00:00"
    },
    {
      "period": "2018-10-08T00:00:00",
      "call_count": 182,
      "call_answered_count": 146,
      "call_missed_count": 4,
      "call_closed_count": 29,
      "call_answer_time_average": 9,
      "call_duration_average": 247,
      "call_duration_total": 36178,
      "call_sla": 74,
      "smiley_count": 37,
      "rating_average": 94,
      "key": "2018-10-08T00:00:00"
    }
  ]
}