(BETA) Call Queue Realtime Metrics
Call Queue Realtime API
This API is deprecated
This API is deprecated in favor of the new Call Queue Metric API that can return both realtime metrics and historical metrics, in case a date range is submitted in the request
This API provides information about Realtime Ongoing Interactions.
The call queue realtime metrics can be obtained for a particular pbx, and can be filtered by sites and queues.
Customer Data API provides the current configuration of active pbxes, sites and queues, and most importantly, the ids of these entities, that will be used for fetching and filtering of desired realtime metrics.
You will need a working API key to begin
You can generate API credentials from How to get API Keys
The
8x8-api-key
will be theKey
generated. For Work Analytics the Secret from Admin Console is not required.
Use the following base URL during this process:
https://api.8x8.com/analytics/work
1. Authenticate to retrieve access token
You will use your API key combined with the user credentials of a user with permission and access to Work Analytics to authenticate, this user does not need to be the one who generated the API credentials
User must access Analytics at least once via browser
The users credentials will not be able to leverage the API until they have used Work Analytics via browser at least once
Parameters
Method: POST
Headers
Name | Required | Description | Example |
---|---|---|---|
8x8-apikey | ✓ | The 8x8-api key provided | test_key_kjdfidj238jf9123df221 |
Content-Type | ✓ | Set content type to form-urlencoded | application/x-www-form-urlencoded |
Body
Name | Required | Description | Example |
---|---|---|---|
username | ✓ | The 8x8 username of a user with Work Analytics access privileges | [email protected] |
password | ✓ | The 8x8 password of the user with Work Analytics access privileges | Rrnp5QBW6dTbx^TP |
Authentication Request:
curl --location --request POST 'https://api.8x8.com/analytics/work/v1/oauth/token' \
--header '8x8-apikey: {8x8-apikey input here}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username={8x8 username of user input here}' \
--data-urlencode 'password={8x8 password of user input here}'
Authentication Response:
Response
{
"access_token": "eyJhbGciOiJSUzI1NiJ9.yyyyyyy.zzzzzzzzzzz",
"token_type": "bearer",
"expires_in": 1800
}
Outputs For Next Step:
- access_token
- expires_in
The token will expire in the number of seconds specified in expires_in.
The following steps will use the access_token as a Bearer Token form of authentication. This takes the form of the
Authorization
header being set to Bearer access_token
(Space between Bearer and the access_token)
Call Queue Realtime Metrics Request
Real time metrics properties
All metrics are real time; the call related metrics are calculated based on the on-going calls. Totals and averages only include in progress transactions.
Method: GET
Headers
Name | Required | Description | Example |
---|---|---|---|
8x8-apikey | ✓ | The 8x8-api key provided | test_key_kjdfidj238jf9123df221 |
Authorization | ✓ | Pass the access_token returned from the authentication request as a Bearer token Bearer {access_token} | Bearer eyJhbGciOiJSUzI1NiJ9.yyyyyyy.zzzzzzzzzzz |
Parameters
Path /{version}/call-queues/real-time/pbxes/{pbxId}
Name | Required | Description | Example |
---|---|---|---|
version | ✓ | The current version for customer data API is 2 | v2 |
pbxId | ✓ | The pbx for which the call queue metrics are requested | smbw8a7jR2iMu7UcuRTsde |
Query
Name | Required | Description | Example |
---|---|---|---|
siteIds | ☐ | Site ids filtering. Multiple values can be passed separated by comma. If not passed, all sites data for given pbx will be returned. | vcXZjfBOT2yWxhUQHzwhqq |
queueIds | ☐ | Call Queue ids filtering. Multiple values can be passed separated by comma. If not passed, the metrics for all queues of the given pbx and optional site(s) filter will be returned | 3ptLs9gNS0i1Al2FSNblpa,DwO3s3aCRLCJOoTRQIEnsq |
metrics | ☐ | Expected metrics in response. Multiple values can be passed separated by comma. If no metrics list is specified, then all call queue realtime metrics will be returned | availableAgents,avgWaitingTime |
includeSummary | ☐ | If true, response will contain the summary(grand totals) of returned metrics. Default is true , metrics summaries are returned. | true |
sort | ☐ | Sorting strategy: by site, name or extensions, ascending(asc) or descending(desc) | name,asc |
The list of available realtime metrics for a call queue can be found below:
Real time metrics properties
The time related metrics are measured in milliseconds.
Metric | Description |
---|---|
availableAgents | Number of users assigned to the queue, logged in and in the Available status |
avgHandlingTime | Average handling time |
avgTalkingTime | Average talking time |
avgWaitingTime | Average waiting time |
eligibleAgents | The number of primary and secondary users in the statuses: Available, Busy, Away, Appear Offline |
eligibleOverflowAgents | The number of secondary users in the statuses: Available, Busy, Away, Appear Offline |
eligiblePrimaryAgents | The number of primary users in the statuses: Available, Busy, Away, Appear Offline |
enabledOverflowAgents | Number of enabled overflow agents |
enabledPrimaryAgents | Number of enabled primary agents |
handlingCalls | Handling calls |
loggedOutAndDndAgents | Number of primary and secondary users in the statuses: Offline, Logged out, Dnd |
loggedOutAndDndOverflowAgents | Number of secondary users in the statuses: Offline, Logged out, Dnd |
longestHandlingTime | Longest handling time |
longestOnHoldTime | Longest On Hold time |
longestTalkingTime | Longest talking time |
longestWaitingTime | Longest waiting time |
onHoldCalls | On Hold calls |
onHoldTime | On Hold time |
overflowAgents | Total number of secondary users assigned to the queue regardless of their available status |
overflowWrappingUpAgents | The number of secondary users in Wrap-up state |
primaryWrappingUpAgents | The number of primary users in Wrap-up state |
talkingCalls | Talking calls |
talkingTime | Talking time |
totalCalls | Total calls |
totalHandlingTime | Total handling time |
waitingCalls | Waiting calls |
waitingTime | Waiting time |
wrappingUpAgents | The number of primary and secondary users in Wrap-up state |
Try out the Call Queue Realtime Metrics Request
curl --location --request GET 'https://api.8x8.com/analytics/work/v2/call-queues/real-time/pbxes/{pbxId here}?metrics=totalHandlingTime,avgHandlingTime,avgTalkingTime,waitingTime,talkingTime,avgWaitingTime&includeSummary=true&sort=name,asc' \
--header 'Authorization: Bearer {access_token here}' \
--header '8x8-apikey: {8x8-apikey input here}'
Call Queue Realtime Metrics Response
This sample response is for getting a subset of call queue metrics (namely totalHandlingTime, avgHandlingTime, avgTalkingTime, waitingTime, talkingTime, avgWaitingTime), including metrics summary, for a particular pbx.
{
"callQueues": [
{
"name": "Alerie Hightower",
"extension": "189751",
"pbx": "coreanalyticsprod",
"site": "SanJose-Onel",
"metrics": {
"totalHandlingTime": 0,
"avgHandlingTime": 0.0,
"avgTalkingTime": 0.0,
"waitingTime": 85276,
"talkingTime": 0,
"avgWaitingTime": 28425.0
}
},
{
"name": "Narbo",
"extension": "153964",
"pbx": "coreanalyticsprod",
"site": "SanJose-Onel",
"metrics": {
"totalHandlingTime": 24069,
"avgHandlingTime": 12034.0,
"avgTalkingTime": 14069.0,
"waitingTime": 14069,
"talkingTime": 14069,
"avgWaitingTime": 14069.0
}
}
],
"metricsSummary": {
"totalHandlingTime": 24069,
"avgHandlingTime": 12034.0,
"avgTalkingTime": 14069.0,
"waitingTime": 99345,
"talkingTime": 14069,
"avgWaitingTime": 24836.0
}
}
Updated over 1 year ago