Agents performance
Overview
The agents_performance function provides comprehensive statistics for human agents. Use this endpoint to:
- Evaluate agent response times and performance metrics
- Track agent activity and conversation handling
- Monitor rating scores and customer satisfaction
Quick start
query AgentsPerformance(
$deskIds: _uuid
$integrationIds: _uuid
$channels: _text
$startDate: timestamp
$endDate: timestamp
$isTest: Boolean
$agentIds: _text
) {
rows: agents_performance(
args: {
start_time: $startDate
end_time: $endDate
desk_ids: $deskIds
integration_ids: $integrationIds
channels: $channels
is_test: $isTest
agent_ids: $agentIds
}
) {
agent_id
agent_name
avg_response_time
avg_first_response_time
median_response_time
median_first_response_time
max_response_time
max_first_response_time
min_response_time
min_first_response_time
avg_close_time
median_close_time
max_close_time
min_close_time
ratings
avg_rating
ratings_more_than_3
closed_conversations
participated_sessions
replies
}
}
Variables:
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}
Try it
Loading GraphQL Playground...
Parameters
| Parameter | Type | Description |
|---|---|---|
deskIds | _uuid | Filter by desk IDs |
integrationIds | _uuid | Filter by integration IDs |
channels | _text | Filter by channels (web, facebook, viber, etc.) |
startDate | timestamp | Start date (format: yyyy-mm-dd) |
endDate | timestamp | End date (format: yyyy-mm-dd) |
isTest | Boolean | Exclude test sessions when set to false |
agentIds | _text | Filter by specific agent IDs |
Response fields
Agent identification
| Field | Type | Description |
|---|---|---|
agent_id | uuid | Unique agent identifier |
agent_name | String | Agent display name |
Response time metrics
All response time values are in minutes.
| Field | Type | Description |
|---|---|---|
avg_response_time | Float | Average time to respond to messages |
avg_first_response_time | Float | Average time to send the first response |
median_response_time | Float | Median time to respond to messages |
median_first_response_time | Float | Median time to send the first response |
max_response_time | Float | Maximum response time recorded |
max_first_response_time | Float | Maximum first response time recorded |
min_response_time | Float | Minimum response time recorded |
min_first_response_time | Float | Minimum first response time recorded |
Close time metrics
All close time values are in minutes.
| Field | Type | Description |
|---|---|---|
avg_close_time | Float | Average time to close conversations |
median_close_time | Float | Median time to close conversations |
max_close_time | Float | Maximum close time recorded |
min_close_time | Float | Minimum close time recorded |
Rating metrics
| Field | Type | Description |
|---|---|---|
ratings | Int | Total number of ratings received |
avg_rating | Float | Average rating score (1-5, null if no ratings) |
ratings_more_than_3 | Int | Number of ratings greater than 3 |
Activity metrics
| Field | Type | Description |
|---|---|---|
closed_conversations | Int | Number of conversations closed by the agent |
participated_sessions | Int | Total sessions the agent participated in |
replies | Int | Total number of replies sent by the agent |
Common use cases
- Single desk
- Multiple desks
- Specific agents
- Specific channels
- Production only
Get performance for a single desk:
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}
Get performance across multiple desks:
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c, 51ff88a7-dfab-44e5-9303-9b2bf13f1c94}",
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}
Get performance for specific agents:
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"agentIds": "{1b28b8ba-c9de-42ac-94ad-564e0c6858c9, 1e47963e-ae46-4821-ae61-10773d1141a2}",
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}
Filter by specific channels:
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"channels": "{web, facebook, viber}",
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}
Exclude test sessions:
{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"isTest": false,
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}
Example response
{
"data": {
"rows": [
{
"agent_id": "1b28b8ba-c9de-42ac-94ad-564e0c6858c9",
"agent_name": "John Doe",
"avg_response_time": 0.4279857,
"avg_first_response_time": 0.48434165,
"median_response_time": 0.26963332,
"median_first_response_time": 0.36688334,
"max_response_time": 1.7883333,
"max_first_response_time": 1.7883333,
"min_response_time": 0.0681,
"min_first_response_time": 0.0681,
"avg_close_time": null,
"median_close_time": null,
"max_close_time": null,
"min_close_time": null,
"ratings": 4,
"avg_rating": 3.75,
"ratings_more_than_3": 3,
"closed_conversations": 0,
"participated_sessions": 18,
"replies": 36
},
{
"agent_id": "1e47963e-ae46-4821-ae61-10773d1141a2",
"agent_name": "Tim Johnson",
"avg_response_time": 4.1929,
"avg_first_response_time": 5.1929,
"median_response_time": 5.0929,
"median_first_response_time": 4.1929,
"max_response_time": 4.1929,
"max_first_response_time": 4.1929,
"min_response_time": 4.1929,
"min_first_response_time": 4.1929,
"avg_close_time": null,
"median_close_time": null,
"max_close_time": null,
"min_close_time": null,
"ratings": 100,
"avg_rating": null,
"ratings_more_than_3": 88,
"closed_conversations": 1348,
"participated_sessions": 1351,
"replies": 12519
}
]
}
}