Getting WFM Intervals (Agent)

You can use GET request to retrieve historical agent data aggregated in 15-minute intervals. You specify the time range from which you want to retrieve the data. For example, you can specify a three-hour range. The historical data within that time frame is then aggregated into 15-minute intervals.

You'll need the WFM_HISTORICAL role permission to perform this request.

Request

Sample request

The request below gets historical WFM intervals:

curl GET -u <username:password> -H "Content-Type: application/json" https://api.cxengage.net/v1/tenants/<tenant-id>/wfm/intervals/agent?start=<start>&end=<end>&page=<page>&limit=<limit> 

Request parameters

The table below lists the parameters you can include in a request:

Parameter Required? Type Description
username:password yes string

The user name and password of the CxEngage user that you created.

tenantId

yes UUID The unique identifier of the tenant.
start yes string

The date and time, in UTC format, from which you want to start collecting data. Note the following:

  • Time range cannot exceed 7 days.
  • Time range cannot be within 10 minutes of the current time.
  • The start must be specified in a 15-minute increment. Examples: 22:00, 22:15, 22:30.
  • The start doesn't need to include the digit for milliseconds.

In the request, specify start like this:

GET https://api.cxengage.net/v1/tenants/<tenant-id>/wfm/intervals/agent?start=2016-01-17T20:15:00Z&end=<end>

end no string

The date and time, in UTC format, at which you want to stop collecting data. Note the following:

  • The time range cannot exceed 7 days.
  • Time range cannot be within 10 minutes of the current time.
  • The end must be specified in a 15-minute increment. Examples: 22:00, 22:15, 22:30.
  • The end doesn't need to include the digit for milliseconds.

In the request, specify end like this:

GET https://api.cxengage.net/v1/tenants/<tenant-id>/wfm/intervals/agent?start=2016-01-17T20:15:00Z&end=2016-01-17T24:00Z

limit no string

The number of records to return from the specified offset. For example, you can specify that an API call returns 50 records.

In the request, specify limit like this:

GET https://api.cxengage.net/v1/tenants/<tenant-id>/wfm/intervals/agent?start=2016-01-17T20:15:00Z&end=2016-01-17T24:00Z&limit=50

If you don't specify a limit, the API call returns all records. There is no maximum limit the API call can return.

offset no integer

Which record the API call should start returning records from. This value must be greater than or equal to 0. The default is 0, meaning that the search starts from record 0. For example, to start searching from the 45th record set this parameter as offset=45.

In the request, specify offset like this:

GET https://api.cxengage.net/v1/tenants/<tenant-id>/wfm/intervals/agent?start=2016-01-17T20:15:00Z&end=2016-01-17T24:00Z&limit=50&offset=45

Response parameters

Sample response

The request returns JSON structured like the example below:

{
    "tenantId": "92f50f30-661c-11e6-b1b9-ca81484488df",
    "limit": 1000,
    "offset": 0,
    "start": "2017-11-28T12:00:00.000Z",
    "type": "agent",
    "page": null,
    "total": 13,
    "end": "2017-11-28T15:00:00.000Z",
    "results": [
        {
            "end": "2017-11-28T12:15:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T12:00:00.000Z",
            "agentIntervalId": "d6facd4f-759f-52bc-a3a6-63705497205a",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T12:30:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T12:15:00.000Z",
            "agentIntervalId": "82d77cf8-6188-5594-bfb0-b476db798014",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T12:45:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T12:30:00.000Z",
            "agentIntervalId": "8bdc8e40-7b6c-5352-a662-bf61f1978f00",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T13:00:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T12:45:00.000Z",
            "agentIntervalId": "2c3a9a60-d05b-50b4-b9ab-b752826d3e16",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T13:15:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T13:00:00.000Z",
            "agentIntervalId": "f4b54461-c057-5d5f-9c9b-a47042736061",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T13:30:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T13:15:00.000Z",
            "agentIntervalId": "e614c94d-a176-51dc-a145-436442eef28e",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T13:45:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T13:30:00.000Z",
            "agentIntervalId": "69c5c676-7b98-59f9-a48d-9eadbc692e49",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T14:00:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T13:45:00.000Z",
            "agentIntervalId": "77076224-edfa-5a57-8232-6198bba08e34",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T14:15:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T14:00:00.000Z",
            "agentIntervalId": "b347ee91-59c1-5796-b126-8ffc70cda523",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T14:30:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T14:15:00.000Z",
            "agentIntervalId": "6c95baeb-abf3-5a83-9100-9e699dde73e1",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T14:45:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 10800,
            "platformAgentId": 45,
            "start": "2017-11-28T14:30:00.000Z",
            "agentIntervalId": "d3daa768-a70d-5dde-a672-f9beb99458c2",
            "agentName": "Sara Bright"
        },
        {
            "end": "2017-11-28T15:00:00.000Z",
            "tenantAgentId": 1549,
            "agentId": "82edc2e0-d9ca-11e6-b358-e898003f3411",
            "platformAgentId": 202,
            "start": "2017-11-28T14:45:00.000Z",
            "agentIntervalId": "07c56391-35fb-5722-840b-dc26ffbaabc4",
            "agentName": "Rose Smith"
        },
        {
            "end": "2017-11-28T15:00:00.000Z",
            "tenantAgentId": 4647,
            "agentId": "eb9ecfc0-6de9-11e6-b8d8-ca81484488df",
            "agentTalkTime": 11152.994,
            "platformAgentId": 45,
            "start": "2017-11-28T14:45:00.000Z",
            "agentIntervalId": "62abdaad-4e94-500d-897d-2aa7b3bee3e0",
            "agentName": "Sara Bright"
        }
    ]
}

Response parameters

The response includes the following parameters. The response only includes the attributes that you included in the request.

Parameter Type Description
tenantId UUID The unique identifier of the tenant.
limit integer The number of records to return from the specified offset.
offset integer The offset indicates from which page to return intervals.
start string

The date and time, in UTC format, of the start of the time range being requested.

type string The type of interval, either agent, queue or agent-queue.
page string The page returned. By default, this is the first page which is page 0.
total integer

Total number of records found for the time range specified for the request. If you include the limit parameter in the request, total could be greater than limit.

If total is greater than limit, there are remaining records. To get the remaining records, do the following in the subsequent request:

  • Specify the offset (total - limit)
  • Modify the start and end parameters
end string

The date and time, in UTC format, of the end of the time range being requested.

results object

A JSON object containing the following information:

Parameters that have null values are filtered out of the response.

Parameter Description
end The date and time (in UTC format) when the interval ended.
tenantAgentId The agent's ID on the tenant.
agentId The agent's unique identifier.
agentTalkTime The length of time that the agent spent talking to a customer.
platformAgentId The agent's ID on the platform.
start The date and time (in UTC format) when the interval started.
agentIntervalId The unique identifier given to the agent for this specific interval.
agentName The agent's first name and last name.
abandonedCallCount The count of abandoned calls agent was involved in.
busyTime The amount of time agent was in busy state.
offeredCallCount The count of calls offered to agent.
avgHandleTime The average handle time of interactions the agent was involved in.
agentHandleTime: The total handle time of interactions the agent was involved in.
agentInitiatedHoldTime The total hold time initiated by agent.
agentHoldCount The count of times the agent was on hold.
agentHoldTime The total hold time agent was involved in.
awayTime The total time agent was in away state.
idleTime The total time agent was in idle state.
answeredCallCount The count of calls answered by agent.
readyTime The total time agent was in ready state.
transferCount The total transfers initiated by agent.
avgTimeToAnswer The average time for agent to answer.
notReadyTime The total time agent was in a not ready state.
outboundCallCount The number of outgoing (click-to-dial) interactions initiated by the agent in the given interval.
outboundCallTime The time in seconds spent on outgoing (click-to-dial) interactions by the agent in the given interval.