Desk Platform API v1
Desk Platform API
Desk Platform API
Version 1

Monitoring

Copy link

Monitoring offers an at-a-glance insight into the daily flux of tickets and agent activities, facilitating the optimization of your customer service. All metrics on the page are based on data accumulated starting at 00:00 am of the date of your monitoring session. Through this API request, you can get the metrics for all agents and tickets of your Sendbird application or for a specific group of agents.

Note: The data is refreshed every minute. To get the most up-to-date figure, click the refresh button next to the time marked in the top right corner of the Monitoring page on Sendbird Dashboard.


Resource representation

Copy link

The following table shows the list of properties in a ticket resource. To learn more about how each number is calculated, refer to Desk Guide on Monitoring.

Property nameTypeDescription

group_id

string

The unique ID of the group that the metrics are related to.

cachedAt

string

The time when the metrics are last updated. They are updated every minute.

currentPendingTicketCount

int

The number of pending tickets at the cachedAt time.

currentActiveTicketCount

int

The number of active tickets at the cachedAt time.

currentOnlineAgent

int

The number of agents whose status is set to online.

currentAwayAgent

int

The number of agents whose status is set to away.

currentAverageAgentLoad

int

The average number of active tickets per online and away agent.

todayClosedTicketCount

int

The number of tickets that have been closed from 00:00 am of the current date to the cachedAt time.

todayAverageConversationTime

int

The average time of all customer-and-agent interactions. It is based on the data collected from 00:00 am of the current date to the cachedAt time.

todayAverageResponseTime

int

The average first response time per ticket. It is based on the data collected from 00:00 am of the current date to the cachedAt time.

todayAveragePendingTimeForUnassignedTickets

int

The average time taken from a customer's initial message to the assignment of their ticket. Referred as pending , this monitors tickets that were created since 00:00:00 am of the current date but their ticket remains unassigned to an agent even after the customer sent a first message.


Actions

Copy link
  • API endpoints are relative to the base URL allocated to your application. In this page, the /metrics endpoint refers to https://desk-api-{application_id}.sendbird.com/platform/v1/metrics.

Note: If you want to know your application ID, sign in to your dashboard, go to the Overview page and then check Application ID.

  • It's recommended that the parameter values in API URLs be urlencoded, such as {group_id}.

List of actions

Copy link
ActionHTTP request

Get metrics

GET /metrics
Retrieves a list of metrics related to tickets and agents of a Sendbird application.


Get metrics

Copy link

Retrieves a list of metrics related to tickets and agents of a Sendbird application. You can also specify the unique ID of a group as an optional parameter to retrieve their statistics only.

HTTP request

Copy link
GET https://desk-api-{application_id}.sendbird.com/platform/v1/metrics

Parameters

Copy link

The following table lists the parameters that this action supports.

Optional
Parameter nameTypeDescription

group_id

string

The ID of the specific group to view metrics for. If not provided, the metrics for all agents are retrieved.

Response

Copy link

If successful, this action returns a list of metrics resources in the response body.

{
    "currentPendingTicketCount": 1, 
    "currentActiveTicketCount": 1, 
    "currentOnlineAgent": 0, 
    "currentAwayAgent": 1, 
    "currentAverageAgentLoad": 0.0, 
    "todayAverageConversationTime": 25.0, 
    "todayAverageResponseTime": 10.0, 
    "todayClosedTicketCount": 1, 
    "todayAveragePendingTimeForUnassignedTickets": 1,
    "cachedAt": "2023-09-06T07:57:25.282610Z"
}

In the case of an error, an error object like below is returned. See the error code table for more details.

{
    "code": "deskp400201",
    "detail": "Group does not exist"
}
Error codeError messageDescription

deskp400201

Group does not exist

The group with the specified group_id doesn't exist