Skip to main content

Agents performance (advanced)

Overview

The get_agents_performance function provides advanced human agent performance metrics with detailed response time breakdowns. Use this endpoint to:

  • Analyze detailed response time distributions
  • Track agent efficiency metrics
  • Generate comprehensive performance reports

Quick start

query GetAgentsPerformance(
$deskIds: _uuid
$brainIds: _uuid
$integrationIds: _uuid
$agentIds: _text
$startDate: timestamp
$endDate: timestamp
$isTest: Boolean
) {
rows: get_agents_performance(
args: {
desk_ids: $deskIds
brain_parent_ids: $brainIds
integration_ids: $integrationIds
agent_ids: $agentIds
start_time: $startDate
end_time: $endDate
is_test: $isTest
}
) {
agent_id
agent_name
avg_response_time
avg_first_response_time
median_response_time
median_first_response_time
max_response_time
min_response_time
avg_close_time
closed_conversations
participated_sessions
replies
}
}

Variables:

{
"deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
"startDate": "2024-01-08",
"endDate": "2024-01-17"
}

Parameters

ParameterTypeDescription
deskIds_uuidFilter by desk IDs
brainIds_uuidFilter by AI agent IDs
integrationIds_uuidFilter by integration IDs
agentIds_textFilter by human agent IDs
startDatetimestampStart date (format: yyyy-mm-dd)
endDatetimestampEnd date (format: yyyy-mm-dd)
isTestBooleanExclude test sessions

Response fields

FieldTypeDescription
agent_iduuidHuman agent identifier
agent_nameStringAgent display name
avg_response_timeFloatAverage response time (minutes)
avg_first_response_timeFloatAverage first response time
median_response_timeFloatMedian response time
median_first_response_timeFloatMedian first response time
max_response_timeFloatMaximum response time
min_response_timeFloatMinimum response time
avg_close_timeFloatAverage time to close
closed_conversationsIntConversations closed by agent
participated_sessionsIntSessions agent participated in
repliesIntTotal replies sent

Common use cases

Try it

Loading GraphQL Playground...

Get performance for all agents:

{
"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": 2.45,
"avg_first_response_time": 3.12,
"median_response_time": 1.85,
"median_first_response_time": 2.45,
"max_response_time": 15.5,
"min_response_time": 0.25,
"avg_close_time": 8.5,
"closed_conversations": 132,
"participated_sessions": 145,
"replies": 580
}
]
}
}