Get - Get agents' aggregated status metrics (by day)

 

Purpose

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

 

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/calendarSummary

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.

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/api/metrics/statusaudit/calendarSummary?fromEpoch=1764547200000&toEpoch=1764633600&agentIds=600000000039003&tz=GMT" \
-X GET \
-H "Authorization:Zoho-oauthtoken *****"

Sample Response - Success

Copied{
    "calendarSummary": {
        "histogramAggregation": [
            {
                "totalRow": {
                    "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": {..},
                    "Offline": {..},
                    "Available": {..},
                    "On Call": {..}
                },
                "intervalsData": {
                    "2024-10-18": {
                        "interval": "2024-10-18",
                        "previous_status": {
                            "Working Time": {
                                "avg": 5866688,
                                "max": 2.606828E+7,
                                "sum": 2.933344E+7,
                                "previous_status": "Working Time"
                            },
                            "On Break": {
                                "avg": 0,
                                "max": 0,
                                "sum": 0,
                                "previous_status": "On Break"
                            },
                            "Busy": {
                                "avg": 0,
                                "max": 0,
                                "sum": 0,
                                "previous_status": "Busy"
                            },
                            "Offline": {
                                "avg": 0,
                                "max": 0,
                                "sum": 0,
                                "previous_status": "Offline"
                            },
                            "Available": {
                                "avg": 5732255,
                                "max": 2.606828E+7,
                                "sum": 28661275,
                                "previous_status": "Available"
                            },
                            "On Call": {
                                "avg": 134433,
                                "max": 311311,
                                "sum": 672165,
                                "previous_status": "On Call"
                            }
                        }
                    },
                    "2024-10-16": {..},
                    "2024-10-17": {..},
                    "2024-10-21": {..},
                    "2024-10-22": {..}
                },
                "intervalsList": [
                    "2024-10-16",
                    "2024-10-17",
                    "2024-10-18",
                    "2024-10-21",
                    "2024-10-22"
                ]
            }
        ],
        "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": {..},
                "Offline": {..},
                "Available": {..},
                "On Call": {..}
            }
        ]
    },
    "code": "200",
    "status": "SUCCESS"
}

Sample Response - Error

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