(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 the Key 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

NameRequiredDescriptionExample
8x8-apikeyThe 8x8-api key providedtest_key_kjdfidj238jf9123df221
Content-TypeSet content type to form-urlencodedapplication/x-www-form-urlencoded

Body

NameRequiredDescriptionExample
usernameThe 8x8 username of a user with Work Analytics access privileges[email protected]
passwordThe 8x8 password of the user with Work Analytics access privilegesRrnp5QBW6dTbx^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

NameRequiredDescriptionExample
8x8-apikeyThe 8x8-api key providedtest_key_kjdfidj238jf9123df221
AuthorizationPass 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}

NameRequiredDescriptionExample
versionThe current version for customer data API is 2v2
pbxIdThe pbx for which the call queue metrics are requestedsmbw8a7jR2iMu7UcuRTsde

Query

NameRequiredDescriptionExample
siteIdsSite ids filtering. Multiple values can be passed separated by comma. If not passed, all sites data for given pbx will be returned.vcXZjfBOT2yWxhUQHzwhqq
queueIdsCall 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 returned3ptLs9gNS0i1Al2FSNblpa,DwO3s3aCRLCJOoTRQIEnsq
metricsExpected 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 returnedavailableAgents,avgWaitingTime
includeSummaryIf true, response will contain the summary(grand totals) of returned metrics. Default is true, metrics summaries are returned.true
sortSorting 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.

MetricDescription
availableAgentsNumber of users assigned to the queue, logged in and in the Available status
avgHandlingTimeAverage handling time
avgTalkingTimeAverage talking time
avgWaitingTimeAverage waiting time
eligibleAgentsThe number of primary and secondary users in the statuses: Available, Busy, Away, Appear Offline
eligibleOverflowAgentsThe number of secondary users in the statuses: Available, Busy, Away, Appear Offline
eligiblePrimaryAgentsThe number of primary users in the statuses: Available, Busy, Away, Appear Offline
enabledOverflowAgentsNumber of enabled overflow agents
enabledPrimaryAgentsNumber of enabled primary agents
handlingCallsHandling calls
loggedOutAndDndAgentsNumber of primary and secondary users in the statuses: Offline, Logged out, Dnd
loggedOutAndDndOverflowAgentsNumber of secondary users in the statuses: Offline, Logged out, Dnd
longestHandlingTimeLongest handling time
longestOnHoldTimeLongest On Hold time
longestTalkingTimeLongest talking time
longestWaitingTimeLongest waiting time
onHoldCallsOn Hold calls
onHoldTimeOn Hold time
overflowAgentsTotal number of secondary users assigned to the queue regardless of their available status
overflowWrappingUpAgentsThe number of secondary users in Wrap-up state
primaryWrappingUpAgentsThe number of primary users in Wrap-up state
talkingCallsTalking calls
talkingTimeTalking time
totalCallsTotal calls
totalHandlingTimeTotal handling time
waitingCallsWaiting calls
waitingTimeWaiting time
wrappingUpAgentsThe 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
    }
}