Appendix A. Interaction lifecycle (Insights Stats API)
As an agent interacts with an assigned interaction, the interaction goes into different states. Interaction states include Ringing, Connected, Wrap, Failure and Unexpected. The following sections describe typical lifecycles of an interaction in various scenarios.
Inbound
Successful inbound call lifecycle
When an interaction of call type is assigned to an agent, the interaction goes into Ringing state. When the agent answers the call, the interaction goes into Connected state. The interaction remains in Connected state until the agent or caller ends the call OR the agent parks the call*.
*If the agent parks the call, another Connected state for the interaction starts when the agent unparks the call. The interaction remains in Connected state until the agent or caller ends the call OR the agent parks the call…
When the call is ended, the interaction goes into Wrap state. Throughout the call flow, the agent’s presence is in Ready state. The agent’s workload increases by one when the interaction goes into Ringing state, and decreases by one on wrap.
Example request for a single agent’s activities
The bearer access token has been replaced with <access_token>
.
curl -X GET -H "accept: accept: application/vnd.newvoicemedia.v2+json" -H "authorization: Bearer <access_token>" "https://***.api.newvoicemedia.com/stats/agent-activities?start=2017-06-13T13:28:00.000Z&end=2017-06-13T13:30:00.000Z&agentID=110"
Example response containing a successful inbound call lifecycle
{ "agentId": "110", "type": "Interaction", "category": "Ringing", "name": null, "start": "2017-06-13T13:28:58.776Z", "duration": 4980, "reason": null, "interaction": { "guid": "015c9f80-6232-4e2c-96f4-b54c473ba520", "type": "Call", "direction": "Inbound" }, "workload": null }, { "agentId": "110", "type": "Workload", "category": null, "name": null, "start": "2017-06-13T13:28:58.776Z", "duration": 38704, "reason": null, "interaction": null, "workload": { "calls": 1 } }, { "agentId": "110", "type": "Interaction", "category": "Connected", "name": null, "start": "2017-06-13T13:29:03.756Z", "duration": 18378, "reason": null, "interaction": { "guid": "015c9f80-6232-4e2c-96f4-b54c473ba520", "type": "Call", "direction": "Inbound" }, "workload": null }, { "agentId": "110", "type": "Interaction", "category": "Wrap", "name": null, "start": "2017-06-13T13:29:22.134Z", "duration": 15346, "reason": null, "interaction": { "guid": "015c9f80-6232-4e2c-96f4-b54c473ba520", "type": "Call", "direction": "Inbound" }, "workload": null }, { "agentId": "110", "type": "Workload", "category": null, "name": null, "start": "2017-06-13T13:29:37.480Z", "duration": null, "reason": null, "interaction": null, "workload": { "calls": 0 } }
Failed call lifecycle
When an interaction of call type is assigned to an agent, the interaction goes into Ringing state. If the agent fails to answer the call, the interaction goes into Unexpected state. Throughout the call flow, the agent’s presence is in Ready state. The agent’s workload increases by one when the interaction goes into Ringing state, and decreases by one on failure.
Example request for a single agent’s activities
The bearer access token has been replaced with <access_token>
.
curl -X GET -H "accept: accept: application/vnd.newvoicemedia.v2+json" -H "authorization: Bearer <access_token>" "https://***.api.newvoicemedia.com/stats/agent-activities?start=2017-06-13T13:39:00.000Z&end=2017-06-13T13:41:00.000Z&agentID=110"
Example response containing a failed inbound call lifecycle
{ "agentId": "110", "type": "Interaction", "category": "Ringing", "name": null, "start": "2017-06-13T13:39:57.985Z", "duration": 10817, "reason": null, "interaction": { "guid": "015c9f80-6250-4716-b2c0-dcb0f50850df", "type": "Call", "direction": "Inbound" }, "workload": null }, { "agentId": "110", "type": "Workload", "category": null, "name": null, "start": "2017-06-13T13:39:57.985Z", "duration": 252063, "reason": null, "interaction": null, "workload": { "calls": 1 } }, { "agentId": "110", "type": "Interaction", "category": "Unexpected", "name": null, "start": "2017-06-13T13:40:08.802Z", "duration": null, "reason": "NoAnswer", "interaction": { "guid": "015c9f80-6250-4716-b2c0-dcb0f50850df", "type": "Call", "direction": "Inbound" }, "workload": null }, { "agentId": "110", "type": "Workload", "category": null, "name": null, "start": "2017-06-13T13:40:23.802Z", "duration": null, "reason": null, "interaction": null, "workload": { "calls": 0 } }
Outbound
Successful outbound call lifecycle
When an agent makes a call to a customer, a new interaction is assigned to the agent and, as the agent’s telephone rings, the interaction goes into Ringing state. When the customer answers the call, the interactions goes into Connected state. The interaction remains in Connected state until the agent or customer ends the call OR the agent parks the call*.
*If the agent parks the call, another Connected state for the interaction starts when the agent unparks the call. The interaction remains in Connected state until the agent or caller ends the call OR the agent parks the call…
When the call is ended, the interaction goes into Wrap state. Throughout the call flow, the agent’s presence is in Ready state. The agent’s workload increases by one on connection, and decreases by one on wrap.
Example response containing a successful outbound call lifecycle
{ "agentId": "110", "type": "Interaction", "category": "Ringing", "name": null, "start": "2017-06-13T14:02:40.766Z", "duration": 6428, "reason": null, "interaction": { "guid": "015ca1c3-74d9-1c2a-0fba-00f2de4938da", "type": "Call", "direction": "Outbound" }, "workload": null }, { "agentId": "110", "type": "Workload", "category": null, "name": null, "start": "2017-06-13T14:02:40.766Z", "duration": 47155, "reason": null, "interaction": null, "workload": { "calls": 1 } }, { "agentId": "110", "type": "Interaction", "category": "Connected", "name": null, "start": "2017-06-13T14:02:47.194Z", "duration": 14731, "reason": null, "interaction": { "guid": "015ca1c3-74d9-1c2a-0fba-00f2de4938da", "type": "Call", "direction": "Outbound" }, "workload": null }, { "agentId": "110", "type": "Interaction", "category": "Wrap", "name": null, "start": "2017-06-13T14:03:01.925Z", "duration": 25996, "reason": null, "interaction": { "guid": "015ca1c3-74d9-1c2a-0fba-00f2de4938da", "type": "Call", "direction": "Outbound" }, "workload": null }, { "agentId": "110", "type": "Workload", "category": null, "name": null, "start": "2017-06-13T14:03:27.921Z", "duration": null, "reason": null, "interaction": null, "workload": { "calls": 0 } }