List phone call handles
curl --request GET \
--url http://localhost:8080/sla/analytics/phone/handles \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8080/sla/analytics/phone/handles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8080/sla/analytics/phone/handles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/sla/analytics/phone/handles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/sla/analytics/phone/handles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/sla/analytics/phone/handles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/sla/analytics/phone/handles")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"phone_call_id": "<string>",
"session_id": "<string>",
"user_id": 0,
"agent_name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"direction": "<string>",
"answered_at": "2023-11-07T05:31:56Z",
"left_at": "2023-11-07T05:31:56Z",
"after_call_work_ended_at": "2023-11-07T05:31:56Z",
"finished": true,
"talk_seconds": 123,
"hold_seconds": 123,
"after_call_work_seconds": 123,
"handle_seconds": 123,
"aht_target_seconds": 0,
"sla_policy_id": "<string>",
"sla_policy_name": "<string>"
}
],
"next_cursor": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}SLA Analytics
List phone call handles
List each time a human agent handled a call: answer, leave and after-call work end times, and the talk, hold and after-call work seconds with the AHT target.
GET
/
sla
/
analytics
/
phone
/
handles
List phone call handles
curl --request GET \
--url http://localhost:8080/sla/analytics/phone/handles \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8080/sla/analytics/phone/handles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8080/sla/analytics/phone/handles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/sla/analytics/phone/handles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/sla/analytics/phone/handles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/sla/analytics/phone/handles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/sla/analytics/phone/handles")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"phone_call_id": "<string>",
"session_id": "<string>",
"user_id": 0,
"agent_name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"direction": "<string>",
"answered_at": "2023-11-07T05:31:56Z",
"left_at": "2023-11-07T05:31:56Z",
"after_call_work_ended_at": "2023-11-07T05:31:56Z",
"finished": true,
"talk_seconds": 123,
"hold_seconds": 123,
"after_call_work_seconds": 123,
"handle_seconds": 123,
"aht_target_seconds": 0,
"sla_policy_id": "<string>",
"sla_policy_name": "<string>"
}
],
"next_cursor": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Returns one row per stint of an agent on a call, oldest answer first, with the same filters as Phone handle time. An agent who leaves a call and comes back to it (a conference guest invited again, a queue ringing them again) has a row for each stint; the handle time reports add those up and count the agent once for that call.
Until a row is
finished, some parts are still running:
talk_secondsisnullwhile the agent is on the call, and final once they leave.after_call_work_secondsandhandle_secondsarenulluntil the agent’s after-call work ends.hold_secondsis nevernull: it is the agent’s hold time so far.
limit (up to 500, default 100) and pass next_cursor back as cursor.Authorizations
Query Parameters
Was this page helpful?