Overview
Get the distribution of open conversations across your team members, including how many conversations each agent has and their average waiting time. This provides a snapshot of current workload distribution and helps identify bottlenecks. Perfect for real-time monitoring of team workload and ensuring balanced distribution of conversations.Use Cases
- Workload Dashboard: Monitor current workload across team
- Load Balancing: Identify agents with too many/few conversations
- Assignment Decisions: Determine which agent to assign new conversations to
- Performance Monitoring: Track average waiting time per agent
- Team Management: See whoβs handling conversations and how quickly
- Capacity Planning: Understand team capacity and bottlenecks
Authentication
This endpoint requires authentication using an API key. Include your API key in the request header:Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
agentIds | string[] | No | Filter by specific team member IDs |
pipelineId | string | No | Filter by specific pipeline |
stageIds | string[] | No | Filter by specific stages |
hideArchived | boolean | No | Hide archived conversations (default: true) |
hideUnassigned | boolean | No | Hide unassigned conversations (default: true) |
Response Structure
Field | Type | Description |
---|---|---|
agentDistribution | array | Array of agent distribution objects |
Team Member Distribution Object
Field | Type | Description |
---|---|---|
agent_id | string (UUID) | Team memberβs unique identifier |
agent_name | string | Team memberβs full name |
count | number | Number of open conversations assigned to this team member |
averageWaitingTime | number | Average waiting time in milliseconds |
Example Request
With Filters
Example Response
Common Use Cases
1. Find Team Member with Least Workload
2. Display Workload Dashboard
3. Balance Workload Alert
4. Filter by Pipeline
Average Waiting Time
TheaverageWaitingTime
field is in milliseconds. To convert:
Filters Explanation
agentIds
: Comma-separated list to filter specific team memberspipelineId
: Show only conversations in a specific pipelinestageIds
: Show only conversations in specific stageshideArchived
: Exclude archived conversations (default: true)hideUnassigned
: Exclude unassigned conversations (default: true)
Error Responses
Status Code | Description |
---|---|
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
500 | Internal Server Error - Something went wrong |
Related Endpoints
- GET /api/public/analytics/agents/response-time - Individual team member response times
- GET /api/analytics/team/snapshot/average-first-response-time - Team average first response
- GET /api/public/team-members/all - Get list of all team members
Notes
- Real-time Snapshot: Returns current state of open conversations
- Only Active Team Members: Team members with no conversations wonβt appear
- Waiting Time: Time since last customer message
- Milliseconds: All time values in milliseconds
Headers
API key
Query Parameters
Optional array of agent IDs to filter by specific agents
Example:
["agent-id-1", "agent-id-2"]
Optional pipeline ID to filter by specific pipeline
Example:
"pipeline-id-1"
Optional array of stage IDs to filter by specific stages
Example:
["stage-id-1", "stage-id-2"]
Optional boolean to filter by archived conversations
Example:
true
Response
200 - application/json
Successfully retrieved agent distribution