The GET /agent-activities/interactions endpoint gets information about agents’ interaction activities. Using this endpoint you can determine exactly how long an agent was working on an interaction, and how much time they spent on each part of that interaction.

Each agent interaction activity indicates that an agent spent time working on an interaction. Each interaction activity is returned as a period of time, defined by a start date and a duration (if the activity has completed).

The agent can be engaged in multiple activities on different interactions at the same time, but only in one activity for each interaction. For example, the agent could be in a Wrap category for a call, whilst in a Connected category for a case.

Headers

Header parameters in Requests (Insights Stats API) apply to this endpoint.

Authorization scopes supported:

ScopeAccess granted
statsEntire endpoint

Parameters

The endpoint accepts the following query string parameters:

start

TypeRequiredExample
DateTrue2019-12-10T15:42:39.825Z

The start date and time of the search window. Use ISO 8601 format.

If you plan to poll this endpoint, we recommend that you set start to the value returned in the upTo parameter in the previous request’s response. For more details, see the FAQ page.

end

TypeRequiredExample
DateFalse2019-12-10T15:47:39.825Z

The end date and time of the search window. Use ISO 8601 format. Default is now.

include

TypeRequiredExample
StringFalseStarted

Determines whether to include activities that started, activities that started or ended, or activities that were processed within the specified time period.

The value dictates which values are searched for within the specified time period. Possible values are:

If you plan to poll this endpoint then we recommend specifying Processed. Using Processed removes the need for any offset and ensures that you receive all data. Note, using the StartedOrEnded or Processed values can result in duplicate items being returned across search windows.

The default value is Started.

agentId

TypeRequiredExample
StringFalse1234

Specify an agent ID to limit the response to include only interactions activities relating to the specified agent. agentId is the agent ID provided when creating an agent in the Vonage Contact Center (VCC) Admin Portal.

By default all agents are returned.

state

TypeRequiredExample
StringFalseConnected

Specify an interaction state to limit the response to include only interaction activities relating to the specified state.

Possible values are:

By default, interaction activities relating to all states are included in the response.

direction

TypeRequiredExample
StringFalseInbound

Specify the direction of the interaction to limit the response to include only interaction activities in the specified direction.

Possible values are:

By default all directions of interaction activities are included in the response.

Pagination

Paging parameters in Requests (Insights Stats API) apply to this endpoint.

Requests

Request agent activities interactions including processed

curl -L -X GET "https://***.api.newvoicemedia.com/stats/agent-activities/interactions?start=2021-12-01T14:18:23.857Z&end=2021-12-11T14:18:23.857Z&include=Processed" \
-H "Authorization: bearer <ACCESS_TOKEN>" \
-H "Accept: application/vnd.newvoicemedia.v3+json"

Request page 2 of agent activities interactions

curl -L -X GET "https://***.api.newvoicemedia.com/stats/agent-activities/interactions?start=2021-12-01T14:18:23.857Z&end=2021-12-11T14:18:23.857Z&page=2" \
-H "Authorization: bearer <ACCESS_TOKEN>" \
-H "Accept: application/vnd.newvoicemedia.v3+json"

Responses

Depending on input parameters provided, responses to GET /agent-activities/interaction requests contain interaction activities for the specified time period.

Successful responses

Success response code and parameters in Responses (Insights Stats API) apply to a successful response.

Example response

{
  "meta": {
    "page": 1,
    "count": 16,
    "pageCount": 1,
    "totalCount": 16
  },
  "items": [
    {
      "agentId": "1234",
      "start": "2019-12-19T10:26:26.284Z",
      "status": "Completed",
      "duration": 6309,
      "state": "Wrap",
      "reason": null,
      "interaction": {
        "guid": "cba1ab4f-dcac-442e-be2f-0314d085f966",
        "medium": "API Case PM",
        "mediumManager": "VCC",
        "direction": "Inbound"
      },
      "channel": {
        "guid": null
      }
    }
		...
  ],
  "upTo": "2019-12-19T11:08:40.128Z"
}

Interaction activities contain the following parameters:

Manual wrap activity types are only reported if used to extend an automatic wrap.