Skip to content

Agent Productivity API

Retrieve detailed productivity metrics and event tracking for agents.

Endpoints

Agent Productivity Search API

Retrieves granular productivity metrics for agents, tracking state changes and availability events.

Endpoint: POST /agent-productivity/search

Authentication: Required (auth_token)

Parameters

NameTypeRequiredDescription
auth_tokenstringYesAuthentication token
date_startstringNoStart date in YYYY-MM-DD format
date_endstringNoEnd date in YYYY-MM-DD format
campaign_idstringNoFilter by specific campaign ID
agent_emailsstringNoFilter by agent emails (comma-separated)
offsetintegerNoPagination offset (default 0)
limitintegerNoResults per page (default/max 1000)

Request Examples

POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123"
}
POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123",
  "date_start": "2026-03-01",
  "date_end": "2026-03-03"
}
POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123",
  "campaign_id": "111",
  "limit": 500,
  "offset": 0
}
POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123",
  "agent_emails": "jane@company.com,john@company.com"
}

Response Example

json
{
  "entries": [
    {
      "id": "event_001",
      "user_id": "12345",
      "state": "LOGIN",
      "availability_code": "AVAILABLE",
      "campaign_id": "111",
      "event_epoch": 1709462400,
      "event_sec": 28800,
      "created_at": "2026-03-01 08:00:00",
      "browser": "Chrome 120.0",
      "ip_address": "192.168.1.100",
      "user_name": "Jane Smith",
      "campaign_name": "Sales Campaign",
      "campaign_type": "Outbound"
    },
    {
      "id": "event_002",
      "user_id": "12345",
      "state": "Ready",
      "availability_code": "READY_CALLS",
      "campaign_id": "111",
      "event_epoch": 1709462400,
      "event_sec": 28800,
      "created_at": "2026-03-01 08:00:30",
      "browser": "Chrome 120.0",
      "ip_address": "192.168.1.100",
      "user_name": "Jane Smith",
      "campaign_name": "Sales Campaign",
      "campaign_type": "Outbound"
    },
    {
      "id": "event_003",
      "user_id": "12345",
      "state": "NotReady",
      "availability_code": "BREAK",
      "campaign_id": "111",
      "event_epoch": 1709465400,
      "event_sec": 30600,
      "created_at": "2026-03-01 09:00:00",
      "browser": "Chrome 120.0",
      "ip_address": "192.168.1.100",
      "user_name": "Jane Smith",
      "campaign_name": "Sales Campaign",
      "campaign_type": "Outbound"
    },
    {
      "id": "event_004",
      "user_id": "12345",
      "state": "LogOut",
      "availability_code": "LOGGED_OUT",
      "campaign_id": "111",
      "event_epoch": 1709481600,
      "event_sec": 39600,
      "created_at": "2026-03-01 16:00:00",
      "browser": "Chrome 120.0",
      "ip_address": "192.168.1.100",
      "user_name": "Jane Smith",
      "campaign_name": "Sales Campaign",
      "campaign_type": "Outbound"
    }
  ]
}

Response Fields

FieldTypeDescription
idstringUnique event ID
user_idstringAgent's user ID
statestringCurrent state (LOGIN, Ready, NotReady, LogOut)
availability_codestringAvailability status code
campaign_idstringAssociated campaign ID
event_epochintegerUnix timestamp of event
event_secintegerSeconds elapsed in day for this event
created_atstringEvent timestamp in YYYY-MM-DD HH:MM:SS format
browserstringBrowser/client information used by agent
ip_addressstringIP address of agent's connection
user_namestringAgent's full name
campaign_namestringCampaign name
campaign_typestringCampaign type (Inbound, Outbound, Blended, etc.)

State Values

StateDescription
LOGINAgent logged in
ReadyAgent is ready to take calls/messages
NotReadyAgent is not ready (on pause, break, training, etc.)
LogOutAgent logged out

Availability Codes

Common availability codes:

CodeDescription
AVAILABLEAgent is available for work
READY_CALLSReady to take calls
BREAKAgent is on break
LUNCHAgent is on lunch break
TRAININGAgent is in training
MEETINGAgent is in a meeting
WRAPAgent is wrapping up call
LOGGED_OUTAgent has logged out

Date Range Parameters

  • date_start: Beginning of period to query (default: current day start)
  • date_end: End of period to query (default: current time)
  • Both parameters use YYYY-MM-DD format
  • If only date_start provided: queries to current time
  • If only date_end provided: queries from start of available data

Pagination

  • offset: Zero-based index of first record (default 0, max 50000)
  • limit: Number of records per page (default 1000, max 1000)
  • Use offset and limit together to page through large result sets

Example pagination:

POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123",
  "offset": 0,
  "limit": 500
}
POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123",
  "offset": 500,
  "limit": 500
}
POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123",
  "offset": 1000,
  "limit": 500
}

Use Cases

  1. Attendance Tracking: Track login/logout times and daily presence
  2. Availability Analysis: Analyze agent availability patterns throughout day
  3. Break/Lunch Monitoring: Track pause code usage and duration
  4. Compliance Reports: Generate audit trails of agent activities
  5. Trend Analysis: Identify productivity patterns across dates
  6. Team Utilization: Analyze ready vs. not-ready ratios
  7. Client Access Logging: Track which agents accessed system and from where

Filtering Examples

All productivity events today:

POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123"
}

Specific date range:

POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123",
  "date_start": "2026-03-01",
  "date_end": "2026-03-03"
}

Specific agent:

POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123",
  "agent_emails": "jane@company.com"
}

Campaign-specific:

POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123",
  "campaign_id": "111",
  "date_start": "2026-03-01"
}

Multiple agents, paginated:

POST https://api.convoso.com/v1/agent-productivity/search
{
  "auth_token": "abc123",
  "agent_emails": "jane@company.com,john@company.com",
  "limit": 500,
  "offset": 0
}

Calculating Work Metrics

From productivity events, you can calculate:

Daily Login Hours:

Duration = LogOut timestamp - LOGIN timestamp

Ready Time:

Ready Time = SUM(Ready state duration between Ready and NotReady/LogOut events)

Break Time:

Break Time = SUM(NotReady state duration with BREAK availability code)

Average Ready Percentage:

Ready % = (Total Ready Time / Total Logged In Time) * 100

Time Zone Considerations

  • Event timestamps are in server time
  • Convert to agent's local time zone using GMT offset if needed
  • Timestamps include timezone information for display
  • Consider DST changes when analyzing date ranges crossing DST transitions

IP Address and Browser Tracking

The response includes:

  • ip_address: Source IP of agent's connection (useful for security auditing)
  • browser: Browser/client version (helps identify softphone vs. web client usage)

This data helps with:

  • Security monitoring
  • Remote work verification
  • Device usage tracking
  • Support issue troubleshooting

Notes

  • Events are recorded chronologically within each date range
  • State transitions are logged as discrete events
  • Large date ranges may return large result sets (use pagination)
  • Event data is typically retained for 1-2 years (check account settings)
  • Timezone handling follows server configuration

Error Handling

IssueError CodeResponse
Invalid auth_token4001{"success": false, "error": "Invalid authentication token"}
Invalid date format6031{"success": false, "error": "Invalid date format. Use YYYY-MM-DD"}
date_start > date_end6032{"success": false, "error": "Start date must be before end date"}
Campaign not found6033{"success": false, "error": "Campaign not found"}
No data for periodN/A{"success": true, "entries": []}
Limit exceeds max6034{"success": false, "error": "Limit cannot exceed 1000"}
General search error7231{"success": false, "error": "An error occurred while processing your search"}

Last Updated: 2026-03-03

Community project — not affiliated with or endorsed by Convoso.