Skip to main content

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

ParameterTypeDescription
deskIds_uuidFilter by desk IDs
integrationIds_uuidFilter by integration IDs
channels_textFilter by channels (web, facebook, viber, etc.)
startDatetimestampStart date (format: yyyy-mm-dd)
endDatetimestampEnd date (format: yyyy-mm-dd)
isTestBooleanExclude test sessions when set to false
agentIds_textFilter by specific agent IDs

Response fields

Agent identification

FieldTypeDescription
agent_iduuidUnique agent identifier
agent_nameStringAgent display name

Response time metrics

All response time values are in minutes.

FieldTypeDescription
avg_response_timeFloatAverage time to respond to messages
avg_first_response_timeFloatAverage time to send the first response
median_response_timeFloatMedian time to respond to messages
median_first_response_timeFloatMedian time to send the first response
max_response_timeFloatMaximum response time recorded
max_first_response_timeFloatMaximum first response time recorded
min_response_timeFloatMinimum response time recorded
min_first_response_timeFloatMinimum first response time recorded

Close time metrics

All close time values are in minutes.

FieldTypeDescription
avg_close_timeFloatAverage time to close conversations
median_close_timeFloatMedian time to close conversations
max_close_timeFloatMaximum close time recorded
min_close_timeFloatMinimum close time recorded

Rating metrics

FieldTypeDescription
ratingsIntTotal number of ratings received
avg_ratingFloatAverage rating score (1-5, null if no ratings)
ratings_more_than_3IntNumber of ratings greater than 3

Activity metrics

FieldTypeDescription
closed_conversationsIntNumber of conversations closed by the agent
participated_sessionsIntTotal sessions the agent participated in
repliesIntTotal number of replies sent by the agent

Common use cases

Get performance for a single desk:

{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"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
}
]
}
}