GET - Get agents' aggregated status metrics (over the complete period)

 

Purpose

Use this API to fetch the aggregated status data for a given set of agents or queues.

 

Authorization

HeaderKeyDescription
Authorization*Zoho-oauthtoken<space><ACCESS_TOKEN>
Accept*Set to application/json.

Request URL

Method: GET

https://voice.zoho.com/rest/json/zv/metrics/statusaudit/overview

Scope: ZohoVoice.agents.READ

Parameters:

Param Name

Data Type

Description

from

Number

Represents the starting index for retrieving records.

size

Number

Represents the number of records to be returned.

fromEpoch*

Long

Represents the start timestamp in epoch milliseconds.

toEpoch*

Long

Represents the end timestamp in epoch milliseconds.

agentIds*

String

Represents single or multiple agent IDs separated by commas.

queueIds*

String

Represents single or multiple queue IDs separated by commas.

 

When both agentIds and queueIds are provided, only queueIds are used to filter the results.

sortField

String

Represents the status by which the results are sorted.

 

Possible values:

  • On Call

  • Offline

  • On Break

  • Available

  • Busy

  • Working Time

sortMetric

String

Represents the metric by which the results are sorted.

 

Possible values:

  • avg

  • sum

  • min

  • max

sortOrder

String

Represents the sort order.

 

Possible values:

  • asc

  • desc

tz*

String

Represents the timezone used to display the results.

excludeDays

String

Represents the list of weekdays to exclude, where 1 denotes Monday and 7 denotes Sunday, without any separator.

 

Example: To exclude weekends, use 67

excludeStatus

String

Represents the list of statuses to exclude, separated by commas.

 

Example: To exclude Offline and On Break, use On Break,Offline

Sample Request

Copiedcurl "https://voice.zoho.com/rest/json/zv/metrics/statusaudit/overview?fromEpoch=1764547200000&toEpoch=1764633600&agentIds=600000000039003&tz=GMT" \
-X GET \
-H "Authorization:Zoho-oauthtoken *****"

Sample Response - Success

Copied{
   "overview": {
       "agentmetrics": {
           "overallAggregation": {
               "Working Time": {
                   "avg": 140780500.4,
                   "max": 162421466,
                   "onlineStatus": "Working Time",
                   "sum": 703902502,
                   "daily_peragent_avg": 35195125.1
               },
               "Offline": {..},
               "Available": {..},
               "On Call": {..},
               "agentCount": 4,
               "daysCount": 5
           },
           "maxTimeAgents": {
               "On Break": {
                   "duration": "--",
                   "agentName": "--",
                   "previous_status": "On Break"
               },
               "Busy": {
                   "duration": "--",
                   "agentName": "--",
                   "previous_status": "Busy"
               }
           },
           "individualAggregation": [
               {
                   "agent_id": "600000000039003",
                   "agentEmail": "jacques@zylker.com",
                   "agentName": "Jack",
                   "Working Time": {
                       "avg": 40426688,
                       "max": 161471551,
                       "onlineStatus": "Working Time",
                       "sum": 2.0213344E+8
                   },
                   "On Break": {
                       "avg": "--",
                       "peragent_avg": "--",
                       "max": "--",
                       "onlineStatus": "On Break",
                       "sum": "0",
                       "daily_peragent_avg": "--"
                   },
                   "Busy": {
                       "avg": "--",
                       "peragent_avg": "--",
                       "max": "--",
                       "onlineStatus": "Busy",
                       "sum": "0",
                       "daily_peragent_avg": "--"
                   },
                   "Offline": {
                       "avg": "--",
                       "peragent_avg": "--",
                       "max": "--",
                       "onlineStatus": "Offline",
                       "sum": "0",
                       "daily_peragent_avg": "--"
                   },
                   "Available": {
                       "avg": 40265253.8,
                       "max": 161471551,
                       "onlineStatus": "Available",
                       "sum": 201326269
                   },
                   "On Call": {
                       "avg": 161434.2,
                       "max": 311311,
                       "onlineStatus": "On Call",
                       "sum": 807171
                   }
               },
               {..},
               {..},
               {..}
           ]
       }
   },
   "code": "200",
   "status": "SUCCESS"
}

Sample Response - Error

Copied{
 "status": "ERROR",
 "code":"ZVTSA005",
 "response":{
     "errorCode": "ZVTSA003",
     "errorMessage": "Agent Status Tracking can be viewed for only 21 days at a time."
  }
}