Reception statistics

Required product: Switch Premium

Get call statistics for a given period. You can provide answer targets, and the server will calculate how many calls is within the given targets.

Parameters

Name Description Example
answer_target Seconds you want your calls to be answered within. 20
from_time Start of time interval as a ISO8601 timestamp 2014-11-03T00:00:00+01:00
to_time End of time interval as a ISO8601 timestamp 2014-11-03T08:14:04+01:00
phase A comma separated list of phases to include in statistics. Valid options: open, closed, backup.
open
Calls placed within opening hours.
backup
Calls that go to ‘no answer’ part of configuration.
closed
Calls that are placed outside opening hours.
open open,backup

Properties

Name Description
total
{"total":120}
Total number of calls in given phases in given time interval
answered
{"answered":100}
Answered calls in given phases, withing time interval
missed
{"missed":20}
Number of missed calls in given phase, within time interval
average_answer_time
{"average_answer_time":23}
Average answer time of answered call. In seconds
average_duration
{"average_duration":210}
Average duration in seconds of all answered calls
within_target
{"within_target":{"missed":1,"answered":73}}
Number of missed and anwered calls that are within the target specified by URL paramter `answer_target`.

Request

/api/v2/receptions/:id/statistics?answer_target=:answer_target&from_time=:from_time&phase=:phase&to_time=:to_time

Response

Status: 200 OK
{
  "statistics": {
    "total": 0,
    "answered": 0,
    "missed": 0,
    "average_answer_time": 0,
    "average_duration": 0,
    "within_target": {
      "missed": 0,
      "answered": 0
    }
  }
}