The GET /agent-activities
endpoint gets information about agents’ activities. This information includes the agents’ presence, workload, and interaction activities. Use this endpoint for a full picture of an agent’s activity.
...
Info |
---|
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 FAQ (Insights Stats API). |
end
Type | Required | Example |
---|---|---|
Date | False | 2019-12-19T15:47:39.825Z |
The end date and time of the search window. Use ISO 8601 format. Default The default is now.
Info | |||||||
---|---|---|---|---|---|---|---|
Max request window
|
...
Determines whether to include activities that started, started or , ended, or were processed within the specified time period.
...
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 , that using the StartedOrEnded or Processed values can result in duplicate items being returned across search windows.
...
Specify an agent ID to limit the response to include only 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.
type
...
- Presence. The response includes only agent presence activities.
- Interaction. The response includes only agent interaction activities.
- Workload. The response includes only agent workload activities.
By default, all types of agent activities are returned.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "meta": { "page": 1, "count": 6, "pageCount": 1, "totalCount": 6 }, "items": [ { "agentId": "01", "type": "Presence", "category": "LoggedOut", "name": "Logged Out", "eligibleForRouting": false, "start": "2019-12-19T15:47:07.077Z", "status": null, "duration": 9523, "reason": null, "interaction": null, "channel": null, "workload": null }, { "agentId": "01", "type": "Presence", "category": "Ready", "name": "Ready", "eligibleForRouting": true, "start": "2019-12-19T15:47:16.600Z", "status": null, "duration": null, "reason": null, "interaction": null, "channel": null, "workload": null }, { "agentId": "01", "type": "Workload", "category": null, "name": null, "eligibleForRouting": null, "start": "2019-12-19T15:47:30.246Z", "status": null, "duration": 86354, "reason": null, "interaction": null, "channel": null, "workload": { "calls": 1, "semiLive": 0, "nonLive": 0 } }, { "agentId": "01", "type": "Interaction", "category": "Ringing", "name": null, "eligibleForRouting": null, "start": "2019-12-19T15:47:31.289Z", "status": "Completed", "duration": 4547, "reason": null, "interaction": { "guid": "016f1c6b-9766-498c-9756-30afb0354d5b", "medium": "Phone", "mediumManager": "VCC", "direction": "Inbound" }, "channel": { "guid": null"6a6d57c3-2105-42e3-86fe-411a3496a28f" }, "workload": null }, { "agentId": "01", "type": "Interaction", "category": "Connected", "name": null, "eligibleForRouting": null, "start": "2019-12-19T15:47:35.836Z", "status": "Completed", "duration": 80764, "reason": null, "interaction": { "guid": "016f1c6b-9766-498c-9756-30afb0354d5b", "medium": "Phone", "mediumManager": "VCC", "direction": "Inbound" }, "channel": { "guid": null"6a6d57c3-2105-42e3-86fe-411a3496a28f" }, "workload": null }, { "agentId": "01", "type": "Interaction", "category": "Wrap", "name": null, "eligibleForRouting": null, "start": "2019-12-19T15:48:56.600Z", "status": "Completed", "duration": 3912, "reason": null, "interaction": { "guid": "016f1c6b-9766-498c-9756-30afb0354d5b", "medium": "Phone", "mediumManager": "VCC", "direction": "Inbound" }, "channel": { "guid": null"6a6d57c3-2105-42e3-86fe-411a3496a28f" }, "workload": null } ], "upTo": "2019-12-19T15:49:39.389Z" } |
The response responses for the three activity types are described below.
...
The agent can be engaged in multiple activities on different interactions at the same time , but in 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.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "agentId": "1005", "type": "Interaction", "category": "Connected", "name": null, "eligibleForRouting": null, "start": "2019-12-19T10:38:58.017Z", "status": "Ongoing", "duration": 2078, "reason": null, "interaction": { "guid": "015cd2ff-f696-4458-a6a4-01909f155ac5", "medium": "Email", "mediumManager": "VCC", "direction": "Inbound" }, "channel": { "guid": "015cd2ff017d99a8-f696da3b-44584fe6-a6a48a4c-01909f155ac5221eeec295aa" }, "workload": null } |
An agent activity of Interaction type contains the following parameters:
agentId
. The agent’s ID, as defined in VCC during agent creation.type
. The type of activity.type
will always be Interaction for an interaction activity.category
. The category of interaction activity. The following interaction activity categories exist:- Ringing. The agent was offered the interaction. For a phone call, the Ringing category describes the period in which the phone was ringing.
- Connected. The agent was connected to the interaction. Typically the Connected category describes the period the agent was working on the interaction; for a phone call, Connected is the period in which parties are connected and able to talk.
If an agent parks a phone call, the Connected activity ends. A new Connected activity starts when the agent unparks the call.
If a non-call interaction is interrupted by a call, the Connected activity ends. A new Connected activity starts when the interaction is resumed. - Wrap. The agent was in the wrap period at the end of an interaction. Wrap time is normally used for post-interaction work, such as note-taking.
- Unexpected. An activity of the Unexpected category usually occurs after the Ringing category. The category indicates that an agent (who was available for work) does not answer their phone, or their line is busy on another call.
- Failed. A Failed activity can occur at any time during an interaction. Possible causes are network congestion, a fault on the line, or configuration issue.
start
. A time stamp timestamp that indicates when the interaction activity started.start
is a UTC date and time in ISO 8601 format.status
. The processing status of the interaction. This will be set to one of the following values:- Ongoing. The processing of the interaction is still ongoing.
- Completed. The processing of the interaction completed without errors.
- InternalError. An error occurred with the processing of the interaction before it could complete.
duration
. A length of time, in milliseconds, that indicates exactly how long the agent remained in this interaction activity. If the agent is currently in this interaction activity,duration
is null.reason
.reason
will be one of the following values (ornull
if any of the conditions are not met):- For Ringing interaction activities:
- Monitor. The user is monitoring the interaction.
- For Connected interaction activities:
- Resumed. The agent was reconnected to the interaction when it was resumed from being interrupted.
- Unparked. The agent was reconnected to the interaction after it was unparked.
- Monitor. The user is monitoring the interaction.
- For Wrap interaction activities:
- Monitor. The user is monitoring the interaction.
- For Unexpected interaction activities:
- NumberBusy. The agent being called declined the call or is busy. For a phone call NumberBusy indicates that the agent is already connected to another call, or rejected the call.
- NoAnswer. A Ringing interaction activity was never answered , or was rejected, and eventually timed out.
- NumberUnobtainable. The target number could not be reached.
- CallRejected. The connection was rejected at some point while trying to connect.
- CallFailed. Exact The exact cause is undetermined.
ConnectionUnavailable. While trying to connect the call to the agent, the agent's connection to the required media — such as WebRTC — was not available.
- For Failed interaction activities:
- NumberUnobtainable. The target number could not be reached.
- CallRejected. The connection was rejected at some point while trying to connect.
- CallFailed. Exact The exact cause is undetermined.
- For Ringing interaction activities:
interaction
. Theinteraction
parameter contains information about the interaction itself.guid
. The unique identifier for the interaction. All activities on this interaction have the same Guid.medium
. The medium over which the interaction took place.mediumManager
. The origin application of the interaction, e.g. “VCC” (Vonage Contact Centre) or “VBC” (Vonage Business Cloud).direction
. The direction of A value that indicates how the agent was involved in the interaction.direction
is one of the following values:- Inbound (a customer called into the call center)
- Outbound (the agent called a customer) Internal (an agent called another agent)Direction can be one of inbound, outbound, or internal. If the agent participated in the interaction multiple times, the activities relating to each participation may have different directions.
- Inbound. The agent received the interaction from a queue or a cold transfer. Note that this does not include receiving a callback (see outbound) or receiving a consult (see Internal).
- Outbound. The agent initiated an outbound interaction to an external participant or received a callback.
- Internal. The agent received a consult from another agent or initiated an internal interaction to another agent.
channel
. The channel
parameter contains information about the agent’s connection to the interaction.guid
. Currently this is unused and will return ‘null’. In the future this will contain the The unique identifier for the agent’s channel.
...
agentId
. The agent’s ID, as defined in VCC during agent creation.type
. The type of activity.type
will always be Presence for a presence activity.category
. The category of presence activity.category
can be one of the following:Ready. The agent is working and capable of receiving new interactions. You can determine an agent’s actual availability from their presence category in conjunction with their workload activities at the same time. For example, a presence activity of Ready category and a workload activity containing “calls”: 0 indicates that an agent is idle and therefore available.
Away. The agent is temporarily away and is not available to receive new interactions. This is commonly used for activities such as breaks.
ExtendedAway. The agent is away for an extended period of time and is not available to receive new interactions. This is commonly used for activities such as meetings or lunch.
LoggedOut. The agent is logged out of ContactPad, and cannot work on interactions or receive new interactions.
name
. Presences can have a more descriptive name, these are configurable in Contact World. For example, a the presence of category ExtendedAway may have a description of Lunch or Meeting.eligibleForRouting
. A boolean value which indicates whether new interactions can be routed to an agent whilst they are in this presence.start
. A time stamp timestamp which indicates when the presence activity started.start
is a UTC date in ISO 8601 format.duration
. A length of time, in milliseconds, that indicates exactly how long the agent remained in this presence activity. If the agent is currently in this presence,duration
is null.
...
An agent has a single workload state at any one time. When an agent begins or finishes work on an interaction, their previous workload activity ends and a new workload activity begins. For example, if an agent was working on a live interaction (call) they would have a workload activity with "calls": 1
. "semiLive": 0
and "nonLive": 0
. When they complete that call, their new workload activity would present a workload of "calls": 0
, "semiLive": 0
and "nonLive": 0
.
...
A new workload activity will be returned each time an agent either starts or finishes working on an interaction, or changes presence.
Example workload activity
...
agentId
. The agent’s ID, as defined in VCC during agent creation.type
. The type of activity.type
will always be Workload for a workload activity.start
. A timestamp which that indicates when the workload activity started.start
is a UTC date in ISO 8601 format.duration
A length of time, in milliseconds, that indicates exactly how long the agent remained in this workload activity. If the activity represents the agent's current workload,duration
is null.workload
.workload
contains a list of all of the agent’s interactions broken down by type.calls
. The number of live interactions that the agent is currently handling.semiLive
. The number of semi-live interactions that the agent is currently handling.nonLive
. The number of non-live interactions that the agent is currently handling.
...