Get interactions
- 1 Overview
- 2 Placeholder values
- 3 Headers
- 4 Parameters
- 5 Pagination
- 6 Requests
- 7 Responses
- 7.1 Successful response
- 7.2 Example response
- 7.3 Response parameters
- 7.3.1 InteractionPlanMapping parameters
- 7.3.2 Channels parameters
- 7.3.3 Party parameters
- 7.3.4 Events parameters
- 7.3.5 Event type values
- 7.3.6 Event properties
- 7.3.7 Outcome values
- 7.4 Errors
Overview
The GET /interactions endpoint returns detailed information about a collection of interactions. You can use the response to calculate metrics for a group of interactions within a specified time period.
Placeholder values
The example code in this documentation uses the following placeholder values. Replace each placeholder before sending requests.
Region subdomain
Replace *** in the base URL with the subdomain for your region:
Region | URL subdomain | Base URL |
|---|---|---|
EMEA |
|
|
USA |
|
|
APAC |
|
|
Bearer access token
Replace <ACCESS_TOKEN> with your bearer access token. You must include a valid bearer access token in every request. For information about obtaining a bearer access token, see How to authenticate with a Vonage Contact Center (VCC) API.
Headers
Header parameters in Requests (Insights Stats API) apply to this endpoint.
Authorization scopes supported:
Scope | Access granted |
|---|---|
| Entire endpoint |
Parameters
The endpoint accepts the following query string parameters:
Name | Type | Required | Description | Example |
|---|---|---|---|---|
| Date | True | The start date and time of the search window. Use ISO 8601 format. If you plan to poll this endpoint, we recommend setting start to the value returned in the upTo parameter of the previous request’s response. For more details, see the FAQ (Insights Stats API). |
|
| Date | False | The end date and time of the search window. Use ISO 8601 format. Default is now. Max request window Request time windows are limited to 31 days for endpoints. If your request exceeds 31 days, the response will contain an {
"message": "Request window size limit exceeded 31 days"
} |
|
| String | False | Determines whether to include interactions that started, interactions that started or ended, or interactions 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, 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. The default value is Started. |
|
Pagination
Paging parameters in Requests (Insights Stats API) apply to this endpoint.
Requests
Request interactions including processed
curl -L -X GET "https://***.api.newvoicemedia.com/stats/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 interactions
curl -L -X GET "https://***.api.newvoicemedia.com/stats/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
The response to the GET /interactions endpoint contains a collection of interaction items. The interaction items are ordered by ascending start time.
Successful response
Success response code and parameters in Responses (Insights Stats API) apply to a successful response.
Example response
{
"meta":{
"page":1,
"count":3,
"pageCount":1,
"totalCount":2
},
"items":[
{
"status": "Completed",
"medium": "Phone",
"mediumManager": "VCC",
"guid": "016f7e44-7525-4e37-b0db-5dd09afe592e",
"conversationGuid": "0c7df94e-a2f9-44e6-80bf-73ffe08f7c34",
"start": "2020-01-07T12:48:48.023Z",
"duration":64547,
"handleTime":47511,
"talkTime":44005,
"direction": "Inbound",
"serviceName": "Report Gp 2",
"connectTo": "0123456789",
"connectFrom": "0987654321",
"categorizedAt": null,
"outcome": "Handled by agent",
"interactionPlanMapping":{
"addressName": "Main Support Number",
"mappingName": "Mapping1",
"interactionPlanName": "Customer Support Plan",
"reportingGroup": "Report Gp 2"
},
"channels":[
{
"guid": "016f7e44-7525-4e37-b0db-5dd09afe592e",
"offset":0,
"duration":62903,
"handleTime": null,
"endReason": "Released",
"integrationType": null,
"party":{
"id": null,
"role": "External",
"touchpoint": "0987654321"
},
"events":[
{
"type": "Ringing",
"offset":0,
"name": null,
"duration":0,
"properties": null
},
{
"type": "Connected",
"offset":0,
"name": null,
"duration":62903,
"properties": null
},
{
"type": "InteractionPlan",
"offset":620,
"name": "Customer Support Plan",
"duration":62283,
"properties":{
"reportingGroup": "Report Gp 2"
}
},
{
"type": "Applet",
"offset":718,
"name": "Welcome",
"duration":0,
"properties":{
"appletType": "Announcement"
}
},
{
"type": "Applet",
"offset":812,
"name": "Call Record",
"duration":0,
"properties":{
"appletType": "CallRecording"
}
},
{
"type": "Applet",
"offset":3538,
"name": "MainMenu1",
"duration":0,
"properties":{
"appletType": "Menu"
}
},
{
"type": "Applet",
"offset":8078,
"name": "SkillTag1",
"duration":0,
"properties":{
"appletType": "SkillTagger"
}
},
{
"type": "Applet",
"offset":8550,
"name": "ACD1",
"duration":0,
"properties":{
"appletType": "ACD"
}
},
{
"type": "Queue",
"offset":8654,
"name": "ACD1",
"duration":8382,
"properties":{
"interactionPlan": "0123456789",
"interactionPlanName": "Customer Support Plan",
"presentedSkills":[
"Billing"
],
"virtualQueues":[
"Billing Queue"
],
"targets":[
{
"virtualQueue": "Billing Queue",
"targetTimeToAnswer":30000
}
],
"result": "Delivered"
}
},
{
"type": "CallRecording",
"offset":17055,
"name": null,
"duration":45848,
"properties": null
}
]
},
{
"guid": "41720567-7acd-40a4-94ac-e5a2b60c484c",
"offset":9682,
"duration":54865,
"handleTime": 47511,
"endReason": "Released",
"integrationType": null,
"party":{
"id": "01",
"role": "Agent",
"touchpoint": "01122334455"
},
"events":[
{
"type": "Ringing",
"offset":9682,
"name": null,
"duration":7354,
"properties": null
},
{
"type": "Connected",
"offset":17036,
"name": null,
"duration":44005,
"properties": null
},
{
"type": "CallRecording",
"offset":17055,
"name": null,
"duration":43986,
"properties": null
},
{
"type": "Wrap",
"offset":61041,
"name": null,
"duration":3506,
"properties": null
},
{
"type": "Disposition",
"offset":61042,
"name": null,
"duration":0,
"properties":{
"disposition": "CallBack"
}
},
{
"type": "CallRating",
"offset":61043,
"name": null,
"duration":0,
"properties":{
"classification": "3"
}
}
]
}
]
},
{
"status": "Completed",
"medium": "API Case PM",
"mediumManager": "VCC",
"guid": "49e5af96-0cd0-45df-b916-8b2b2c4d0070",
"conversationGuid": "d9480a6b-7795-4427-8ea5-44f0826743bf",
"start": "2020-01-07T12:49:37.855Z",
"duration":24872,
"direction": "Inbound",
"handleTime": 21690,
"talkTime": 15174,
"serviceName": "Case Report Group",
"connectTo": "APIRouting",
"connectFrom": "",
"categorizedAt": "2020-01-07T12:53:37.855Z",
"outcome": "Handled by agent",
"interactionPlanMapping":{
"addressName": "API Cases",
"mappingName": "API Mapping",
"interactionPlanName": "Case Plan",
"reportingGroup": "Case Report Group"
},
"channels":[
{
"guid": "49e5af96-0cd0-45df-b916-8b2b2c4d0070",
"offset":0,
"duration":17740,
"handleTime": null,
"endReason": "Released",
"integrationType": null,
"party":{
"id": null,
"role": "External",
"touchpoint": ""
},
"events":[
{
"type": "Ringing",
"offset":0,
"name": null,
"duration":0,
"properties": null
},
{
"type": "Connected",
"offset":0,
"name": null,
"duration":17740,
"properties": null
},
{
"type": "InteractionPlan",
"offset":96,
"name": "Case Plan",
"duration":17644,
"properties":{
"reportingGroup": "Case Report Group"
}
},
{
"type": "Applet",
"offset":623,
"name": "Cases",
"duration":0,
"properties":{
"appletType": "ACD"
}
},
{
"type": "Queue",
"offset":774,
"name": "Cases",
"duration":2408,
"properties":{
"interactionPlan": "DanAccount-1",
"interactionPlanName": "Case Plan",
"result": "Delivered"
}
}
]
},
{
"guid": "8ed8ee4a-f564-45c7-b0fc-2ee3c094bb2b",
"offset":3107,
"duration":21765,
"handleTime": 21690,
"endReason": "Released",
"integrationType": null,
"party":{
"id": "002",
"role": "Agent",
"touchpoint": "01122334455"
},
"events":[
{
"type": "Ringing",
"offset":3107,
"name": null,
"duration":75,
"properties": null
},
{
"type": "Connected",
"offset":3182,
"name": null,
"duration":15174,
"properties": null
},
{
"type": "Wrap",
"offset":18356,
"name": null,
"duration":6516,
"properties": null
},
{
"type": "Disposition",
"offset":18357,
"name": null,
"duration":0,
"properties":{
"disposition": "CallBack"
}
},
{
"type": "CallRating",
"offset":18358,
"name": null,
"duration":0,
"properties":{
"classification": "3"
}
}
]
}
]
},
{
"guid": "03d154eb-f3fa-4151-bf61-eff2e8197343",
"conversationGuid": "5c778f8f-bf19-467c-b22e-255fee5b06e1",
"medium": "Webchat",
"mediumManager": "VCC",
"start": "2020-01-07T12:49:37.955Z",
"duration":41005,
"handleTime": null,
"talkTime": null,
"direction": "Inbound",
"serviceName": null,
"connectTo": "c038a638-f9fb-4cb6-948d-7a4ce6667798",
"categorizedAt": null,
"outcome": "Abandoned in bot",
"interactionPlanMapping":{
"addressName": "Main route",
"mappingName": "Digital",
"interactionPlanName": "Digital Plan",
"reportingGroup": null
},
"channels":[
{
"guid": "03d154eb-f3fa-4151-bf61-eff2e8197343",
"offset":0,
"duration":41005,
"endReason": "Released",
"integrationType": null,
"party":{
"id": null,
"role": "External",
"touchpoint": null,
"touchpointKey": "6257c572-a081-4788-a5b3-6c6abdbb25cd"
},
"events":[
{
"type": "Ringing",
"offset":0,
"name": null,
"duration":0,
"properties": null
},
{
"type": "Connected",
"offset":0,
"name": null,
"duration":41005,
"properties": null
},
{
"type": "InteractionPlan",
"offset":142,
"name": "Digital Plan",
"duration":40863,
"properties":{
"reportingGroup": null
}
},
{
"type": "Applet",
"offset":1310,
"name": "virtual assistant",
"duration":0,
"properties":{
"appletType": "VirtualAssistant"
}
},
{
"type": "VirtualAssistant",
"offset":2249,
"name": "Simple Agent",
"duration":38217,
"properties":{
"result": "Resolved",
"messageCount": "10"
}
},
{
"type": "Applet",
"offset":40687,
"name": "DR route to queue",
"duration":0,
"properties":{
"appletType": "DataRouter"
}
},
{
"type": "Applet",
"offset":40919,
"name": "Resolved announcement",
"duration":0,
"properties":{
"appletType": "Announcement"
}
}
]
}
]
}
],
"upTo": "2020-01-07T12:51:27.982Z",
"latestUpdate": "2020-01-07T12:51:24.919Z"
}Response parameters
Each interaction item in the collection contains the following parameters:
Parameter | Type | Description | Example |
|---|---|---|---|
| String | The current state of the interaction. Possible values: |
|
| String | The type of communication method. |
|
| String | The origin application of the interaction, for example, |
|
| String (GUID) | The unique identifier for an interaction. |
|
| String (GUID) | The unique identifier for the conversation. Individual interactions can be part of a larger conversation. For example, if a customer requests a callback from an agent, both interactions share the same conversation GUID. |
|
| String (ISO 8601) | The time when the interaction started. |
|
| Integer (ms) | The length of time the interaction lasted, in milliseconds. |
|
| Integer (ms) | The interaction's handle time. A combination of all channels' handle times; may exceed the length of the interaction. |
|
| Integer (ms) | The amount of time a channel participant spent in the connected channel state while another channel participant was also connected, where at least one participant is an agent. Calculated only for channels with the role of |
|
| String | The direction of the interaction. Possible values: |
|
| String | The service name assigned to the interaction. If using Interaction Plans Manager: the name of the destination, interaction plan, or reporting group. Otherwise: the service name assigned to the interaction plan. |
|
| String | The address of the party being contacted. For a phone call, the phone number being called. |
|
| String | The address of the party that initiated the interaction. For a phone call, their phone number. |
|
| String (ISO 8601) | The time at which the interaction was categorized. |
|
| String | A high-level description of the outcome. |
|
| Object | Details about the mapping used to link the address to the destination interaction plan. |
|
| Array | A collection of all channels within the interaction. See the Channels parameters section later in the page. |
|
| String (ISO 8601) | The time of the most recent interaction event available in the Insights Stats API. The difference between the current time and |
|
InteractionPlanMapping parameters
Parameter | Type | Description | Example |
|---|---|---|---|
| String | The name of the address contacted by the external party. |
|
| String | The name of the mapping used to connect the address to the interaction plan. |
|
| String | The name of the destination interaction plan. |
|
| String | A label used to differentiate interaction plans. Useful for reporting on similar types of interaction plans and their associated interactions. |
|
Channels parameters
Parameter | Type | Description | Example |
|---|---|---|---|
| String (GUID) | The unique identifier for the channel. |
|
| Integer (ms) | The length of time after the start of the interaction that the channel started. |
|
| Integer (ms) | The length of time the channel was involved with the interaction. |
|
| Integer (ms) | The amount of time a controlling or non-controlling agent spent actively working on the interaction. Calculated by adding the duration of the connected and wrap channel states for that participant, and subtracting the duration of any interrupted or parked channel states. |
|
| String | The reason the channel ended. Possible values: |
|
| String | The type of channel integration. |
|
| Object | Information about the party on the channel. See the Party parameters section later in the page |
|
| Array | A collection of events that happened on the channel. Use |
|
Party parameters
Parameter | Type | Description | Example |
|---|---|---|---|
| String | An identifying name for the party. If |
|
| String | The role of the party. Possible values: |
|
| String | The address of the party, such as a phone number (if known). |
|
Events parameters
Parameter | Type | Description | Example |
|---|---|---|---|
| String | The type of event. See the Event type Values section later in the page. |
|
| Integer (ms) | The length of time after the start of the interaction that the channel event started. |
|
| String | The name associated with the event.
|
|
| Integer (ms) | The length of time the channel event was ongoing. |
|
| Object | A collection of properties dependent on the event type. See Event properties below. |
|
Event type values
Value | Description |
|---|---|
| The agent selected Abandon in ContactPad. |
| The time in which an agent was queuing. |
| An applet was run on this channel. |
| An applet failed on this channel. |
| An agent reported an issue with the quality of the call's audio. |
| The agent rated the call. The |
| Channel was being recorded. |
| Channel was connected and capable of communicating with other connected parties. |
| The participant on the channel attempted to connect to another participant to consult with them. |
|