Frequently Asked Questions

I see Busy in ContactPad. Why is that not reflected by the Insights Stats API?

ContactPad displays a simplified status to represent an agent’s current activity. The Insights Stats API provides a more detailed view of an agent’s presence and each individual interaction state. For example, when using our omni-channel solution, an agent can work on a chat and wrap up an outbound call at the same time. The Insights Stats API will report the agent’s presence as Ready—that is, online—the chat will have an interaction state of Connected, and the outbound call will have an interaction state of Wrap Up.

How do I know if an agent is Ready and Idle, or Ready and Busy/Working?

To answer this, you must look at both the agent’s presence and interaction states. Consider the below example from the GET /agent-status endpoint:

{
  "meta": {
    "page": 1,
    "count": 2,
    "pageCount": 1,
    "totalCount": 2
  },
  "items": [
    {
      "agentId": "002",
      "presence": {
        "since": "2019-12-19T16:00:23.249Z",
        "name": "Ready",
        "description": "Ready",
        "eligibleForRouting": true
      },
      "workload": {
        "since": "2019-12-19T16:05:30.212Z",
        "calls": 1
      },
      "interaction": [
        {
          "guid": "b6c01065-a5fa-432f-981b-649f98518878",
          "channelGuid": null,
          "since": "2019-12-19T16:05:30.212Z",
          "medium": "Phone",
					"mediumManager": "CC",
          "direction": "Outbound",
          "state": "Connected",
          "reason": null
        }
      ]
    },
    {
      "agentId": "003",
      "presence": {
        "since": "2019-12-19T16:00:30.145Z",
        "name": "Ready",
        "description": "Ready",
        "eligibleForRouting": true
      },
      "workload": {
        "since": "2019-12-19T15:49:00.512Z",
        "calls": 0
      },
      "interaction": []
    }
  ],
  "upTo": "2019-12-23T09:39:07.012Z"
}

Agent “002” has a presence of Ready, but has an interaction in the Connected state and therefore can be considered busy. However agent “003” has a presence of Ready and no interactions, and therefore can be considered idle. A more complex example may contain many interactions of different mediums or states.

This approach allows you to decide what you consider busy. For example, you may wish to treat an agent with all interactions in the Wrap up state separately from busy.

How do I know when a call was transferred?

We do not explicitly detail the transfer event. Look at the channel details on the Interactions endpoints to see the times when a second agent connects and when the first agent disconnects. (The second agent connects when the agent is consulted—the first agent channel is open and the new agent channel connects. The first agent disconnects when they transfer to the second agent—the first agent’s channel is closed, but second agent and external party channels remain connected.)

In this example, a call is transferred from agent 01 to agent 002.

{
  "status": "Completed",
  "medium": "Phone",
	"mediumManager": "CC",
  "start": "2020-01-10T11:13:05.836Z",
  "guid": "016f8db7-798f-407c-9925-ef8c2b51e6b0",
  "conversationGuid": "0044a6da-f741-4a9f-ad74-2b0fff6d052a",
  "duration": 87028,
  "direction": "Inbound",
  "serviceName": "Report Gp 2",
  "connectTo": "02034631242",
  "connectFrom": "01256700817",
  "interactionPlanMapping": {
    "addressName": "Main Support Number",
    "mappingName": "Mapping1",
    "interactionPlanName": "Customer Support Plan"
  },
  "channels": [
    {
      "guid": "016f8db7-798f-407c-9925-ef8c2b51e6b0",
      "offset": 0,
      "duration": 84646,
      "endReason": "Released",
      "party": {
        "id": null,
        "role": "External",
        "touchpoint": "01256700817"
      },
      "events": [
        {
          "type": "Ringing",
          "offset": 0,
          "name": null,
          "duration": 0,
          "properties": null
        },
        {
          "type": "Connected",
          "offset": 0,
          "name": null,
          "duration": 84646,
          "properties": null
        },
        {
          "type": "InteractionPlan",
          "offset": 268,
          "name": "Customer Support Plan",
          "duration": 84378,
          "properties": {
            "reportingGroup": "Report Gp 2"
          }
        },
        {
          "type": "Applet",
          "offset": 326,
          "name": "Welcome",
          "duration": 0,
          "properties": {
            "appletType": "Announcement"
          }
        },
        {
          "type": "Applet",
          "offset": 372,
          "name": "Call Record",
          "duration": 0,
          "properties": {
            "appletType": "CallRecording"
          }
        },
        {
          "type": "Applet",
          "offset": 3122,
          "name": "MainMenu1",
          "duration": 0,
          "properties": {
            "appletType": "Menu"
          }
        },
        {
          "type": "Applet",
          "offset": 5195,
          "name": "SkillTag1",
          "duration": 0,
          "properties": {
            "appletType": "SkillTagger"
          }
        },
        {
          "type": "Applet",
          "offset": 5605,
          "name": "ACD1",
          "duration": 0,
          "properties": {
            "appletType": "ACD"
          }
        },
        {
          "type": "Queue",
          "offset": 5725,
          "name": "ACD1",
          "duration": 6787,
          "properties": {
            "interactionPlan": "02034631242",
            "presentedSkills": [
              "Billing"
            ],
            "result": "Delivered"
          }
        },
        {
          "type": "CallRecording",
          "offset": 12531,
          "name": null,
          "duration": 72115,
          "properties": null
        },
        {
          "type": "Held",
          "offset": 30233,
          "name": null,
          "duration": 23169,
          "properties": {
            "initiatingAgentId": "01",
            "type": "Held"
          }
        }
      ]
    },
    {
      "guid": "45f4ee27-a4ae-4530-ba04-3fdb2cab2cc2",
      "offset": 6721,
      "duration": 51897,
      "endReason": "Released",
      "party": {
        "id": "01",
        "role": "Agent",
        "touchpoint": "07760255435"
      },
      "events": [
        {
          "type": "Ringing",
          "offset": 6721,
          "name": null,
          "duration": 5791,
          "properties": null
        },
        {
          "type": "Connected",
          "offset": 12512,
          "name": null,
          "duration": 40889,
          "properties": null
        },
        {
          "type": "CallRecording",
          "offset": 12531,
          "name": null,
          "duration": 40870,
          "properties": null
        },
        {
          "type": "Wrap",
          "offset": 53401,
          "name": null,
          "duration": 5217,
          "properties": null
        }
      ]
    },
    {
      "guid": "b805b718-569e-447c-8252-15678e855cd8",
      "offset": 30239,
      "duration": 56789,
      "endReason": "Released",
      "party": {
        "id": "002",
        "role": "Agent",
        "touchpoint": "07760274856"
      },
      "events": [
        {
          "type": "Ringing",
          "offset": 30239,
          "name": null,
          "duration": 4906,
          "properties": null
        },
        {
          "type": "CallRecording",
          "offset": 30239,
          "name": null,
          "duration": 52571,
          "properties": null
        },
        {
          "type": "Connected",
          "offset": 35145,
          "name": null,
          "duration": 47665,
          "properties": null
        },
        {
          "type": "Wrap",
          "offset": 82810,
          "name": null,
          "duration": 4218,
          "properties": null
        }
      ]
    }
  ]
}

How do I determine login time?

A logging-in action occurs when an agent transitions from “Logged Out” to any other presence. If agents do not set their presence to “Logged Out”, then you cannot determine the login time for the following session.

How do I identify Call Connect Router channels?

Identify Call Connect Router (CCR) channels using the party.id property of the channel—id will be set to the value “CCRConnect”.

Note that, unlike other channels, CCR channels will only appear over the API when they have completed and will not be available while in progress.