NetSapiens icon

NetSapiens

Interact with the NetSapiens API

Actions477

Call Center/Statistics → Get Agent Statistics for Single Agent

AI-generated

Summary

Retrieves agent statistics for a specified domain and agent within a given datetime range, optionally selecting metrics and refreshing the dropdown cache.

Inputs

  • refreshOptions — Whether to bypass cached dropdown values and fetch fresh options
  • GetDomainsByStatisticsAgentBy__path__domain (required) — Main organization name used to link the resource to its group/tenant/organization/enterprise
  • GetDomainsByStatisticsAgentBy__path__agent (required) — Extension ID of the call center agent
  • GetDomainsByStatisticsAgentBy__query__datetime-start (required) — Start of the time window for the query in RFC3339 format
  • GetDomainsByStatisticsAgentBy__query__datetime-end (required) — End of the time window for the query in RFC3339 format
  • GetDomainsByStatisticsAgentBy__query__fields — Metrics to include in the statistics, separated by commas; default is NAME,CH,ATT,AH,AHT,TT
  • GetDomainsByStatisticsAgentBy__query__remove_zeros — Flag to remove zero values from the results

Output shape

a list of agent statistic records

Returns an array of objects containing the selected metrics; optional fields may be omitted and remove_zeros can strip zero values

Examples

Example 1: Fetch statistics for domain example.com, agent 12345, from 2023-01-01 to 2023-01-31

domain=example.com; agent=12345; datetime-start=2023-01-01T00:00:00Z; datetime-end=2023-01-31T23:59:59Z; fields=NAME,CH,ATT,AH,AHT,TT; refreshOptions=false

Example 2: Get attendance and talk time for an agent while removing zero values

domain=example.com; agent=12345; datetime-start=2023-09-01T00:00:00Z; datetime-end=2023-09-01T23:59:59Z; fields=CH,ATT; remove_zeros=true; refreshOptions=false

Example 3: Refresh dropdown cache before retrieving statistics

refreshOptions=true; domain=example.com; agent=12345; datetime-start=2023-10-01T00:00:00Z; datetime-end=2023-10-01T23:59:59Z; fields=NAME,CH,ATT,AH,AHT,TT; refreshOptions=true

Links

Discussion