Upcoming Deprecation

  • The Agent Event method is deprecated in LV19 release. You should use the Agent Event Feed method instead.
  • The Call Event and Call Event Feed methods are deprecated in LV19 release. You should use the Interaction Event Feed method instead.

Introduction

The LiveVox Real-Time Reporting API provides methods that allow you to retrieve data in near Real-Time from the LiveVox platform, such as campaign and queue statistics. The Real-Time Reporting API methods will only retrieve data for the current day. For any data pertaining to previous days or that is aggregated by a time interval, see the Reporting API.

For a general overview of the LiveVox APIs, including security aspects, see the  LiveVox API Overview.

Prerequisites

  • To obtain a valid Session ID, you must have successfully logged into the LiveVox platform. See Generating a Session ID for more information.
  • To obtain an Access Token that is used in API requests, you must have an active subscription to the Configuration API. See Access Tokens for details.
  • All messages in this API may be subject to rate limits and other restrictions.

User Roles

Unless otherwise specified in this documentation, for a user to be able to access any data through the Real-Time Reporting API, the user must belong to either the Sysadmin, Superuser, Manager, or Report Admin role. These roles are defined in the LiveVox Configuration Manager and correspond to users who can access LiveVox configuration data through the LiveVox user interfaces.

Real-Time APIs

Agent Event

The Agent Event API is used to gather various agent data, this data is updated in near real-time; a new Agent event is created each time an Agent changes state (i.e. they change from 'Ready' to 'Not Ready'). Agent events are available for a 24hr rolling window, so if the event was created at 8 AM it'll be available until 8 AM the next day. 

Before using the Agent Event APIs clients need to contact the LiveVox Customer Care Team to ensure that the proper backend settings are correctly configured.

Retrieve Agent Event Feed

Description: A long polling implementation of Agent events. When the first request is made it should be a blank request, this is so the first token can be obtained; the next request should include the token and the response will contain all events from the time the token was created until the current request time. After the initial request, subsequent requests should contain the token from the previous request, this will ensure you aren't returned any duplicate events. If there are no new events in the window between the included token and the current time, the Agent event feed will wait 10 seconds before returning a new token; this new token should be used in the subsequent request. Before beginning to use the method backend settings must be configured by LiveVox, these settings start the feed and any events before this configuration are not available. 

User Roles: Sysadmin or Manager

Method: POST /realtime/agentEvent/feed

Parameters:

None

Body:

KeyTypeMandatory?Description
tokenStringNoThe token is a marker for the last event that's been passed to the requester. In the initial request you will not have a token and therefore should make an empty request to receive the first token; subsequent requests should contain the token of the previous request so duplicate events are not received.

Response Code: 200 OK

Body:

KeyTypeMandatory?Description
tokenStringYesA marker for the last event passed; we pass a maximum of 1,000 events. If there are no new events we will wait for 10 seconds before responding, if no new events occur during this time we'll return a new token that should be used in the next request.
agentEventArrayNo

An array of agent events that occurred after the token included in the request.

KeyTypeMandatory?Description
eventIdStringYesThe ID of the Agent event.
timestampdateTimeYesThe time and date the Agent event occurred.
clientIdInteger (ID)Yes

The Client ID for the Agent event.

agentIdInteger (ID)YesThe Agent ID the event is attributed to.
agentServiceIdInteger (ID)Yes

The Service the Agent is logged into at the time of the event.

agentTeamIdInteger (ID)No

The Agent team the Agent is attributed to at the time of the event.

lineNumberEnumNo

The line of the call that the event occurred on, valid values are:

ValueDescription
ACDMain line or debtor line.
DIRECTThe Agents direct line.
EXT1,...EXT20Extension line for the Agent, if supported.
eventTypeEnumYes

The type of Agent event, possible values include:

  • LOGON
  • REGISTERING
  • READY
  • NOT_READY
  • RESERVED
  • MANUAL_DIAL
  • PREVIEW_DIAL_OFFERED
  • PREVIEW_DIAL_ACCEPTED
  • PREVIEW_DIAL_SKIPPED
  • DIALING
  • LOGOFF
  • TRANSFERRING
  • IN_CALL
  • AGENT_HOLD
  • AGENT_RESUMED
  • WRAP_UP
  • AGENT_TRANSFER_INITIATED_SUPERVISOR
  • AGENT_TRANSFER_INITIATED_AGENT2
  • AGENT_TRANSFER_FAILED
  • AGENT_TRANSFER_CONNECTED_SUPERVISOR
  • AGENT_TRANSFER_CONNECTED_AGENT2
  • AGENT_TRANSFER_CONFERENCED_SUPERVISOR
  • AGENT_TRANSFER_CONFERENCED_AGENT2
  • AGENT_TRANSFER_RECONNECTED_SUPERVISOR
  • AGENT_TRANSFER_RECONNECTED_AGENT2
  • AGENT_TRANSFER_COMPLETE_SUPERVISOR
  • AGENT_TRANSFER_COMPLETE_AGENT2
  • AGENT_TRANSFER_HOLD_SUPERVISOR
  • AGENT_TRANSFER_HOLD_AGENT2
  • AGENT_TRANSFER_RESUMED_SUPERVISOR
  • AGENT_TRANSFER_RESUMED_AGENT2
notReadyResonCodeEnumNo

The reason code for the Agent if they are in the 'Not Ready' state, valid values are:

  • LUNCH
  • TRAINING
  • BREAK
  • MEETING
  • TECH_DIFFICULTIES
  • VOICE_MAIL
  • OTHER
callServiceIdInteger (ID)NoThe Service where the call originated.
transactionIdIntegerNoThe transaction ID for the call.
sessionIdStringNoThe session ID for the call.
phoneNumberStringNoThe phone number for the call.
resultStringNoThe result of the call.
campaignTypeEnumNo

The campaign type the call originated from, possible values are:

  • OUTBOUND
  • INBOUND
  • MANUAL
  • PREVIEW
  • HCI
  • SCHEDULE_CALL_BACK
  • TEN_DMT
agent2IdInteger (ID)NoThe receiving Agent of an Agent to Agent transfer.
supervisorSessionIdStringNoThe session ID of the Supervisor/Agent leg of the call when a call is transferred.
supervisorPhoneNumberStringNoThe phone number the Agent transferred the call to; this is not populated on Agent to Agent transfers.
seqNumIntegerYesThe order in which events were created, the number is tracked across all clients so client events may have gaps in the sequence. This does not mean they are missing events, simply that an event was created for another client in between the original clients events. The number is reset every day.

Procuring the Initial Token

#Request (JSON)
POST /realtime/agentEvent/feed
Host: localhost.com
Content-Type: application/json
Accept: application/json

#Response
200 OK
Content-Type: application/json

{
   "agentEvent": [],
   "token": "cfaf0a70-1c52-11e6-8080-808080808080"
}
CODE

Retrieve Events from the Feed

#Request (JSON)
POST /realtime/agentEvent/feed
Host: localhost.com
Content-Type: application/json
Accept: application/json
 
{
   "token": "cfaf0a70-1c52-11e6-8080-808080808080"
}
#Response
200 OK
Content-Type: application/json

{
  "agentEvent": [
    {
      "timestamp": 1463032800000,
      "clientId": 47415,
      "agentId": 393601,
      "agentServiceId": 47416,
      "agentTeamId": 1234,
      "lineNumber": "ACD",
      "eventType": "NOT_READY",
      "notReadyReasonCode": "OTHER",
      "callServiceId": 47416,
      "transactionId": 51296267124,
      "sessionId": "U112FFCT234F79@104.403.828.68",
      "phoneNumber": "6503517450",
      "result": "AGENT - Customer Hung Up",
      "campaignType": "OUTBOUND",
      "agent2Id": 393601,
      "supervisorSessionId": "U112FF324341F79@103.403.88.68",
      "supervisorPhoneNumber": "6503517513",
      "seqNum": 123,
      "eventId": "cid=47315:aid=393401:time=146303243000:seq=123"
    }
  ],
  "token": "aea12ef0-1809-11e6-af08-8f619b2ec41c"
}
CODE

Call Data

Currently, the Real-Time Reporting API supports the gathering of metadata for a call during and post call. The metadata is dependent on the user providing a sessionId, transactionId, and clientId; which together provides the information to uniquely identify a call. 

These methods can only be used to find calls for the current day.

Read In Call Metadata

Description: Gets the in call metadata for a call using the session ID, transaction ID, and Client ID.

User Roles: Sysadmin, Superuser, or Report Admin

This method can only be called while the call is in progress.

Method: GET /realtime/callData/inCall?session={sessionId}&transaction={transactionId}

Parameters:

Path/Query Parameter NameVariable NameTypeMandatory?Description
sessionsessionIdStringYesThe Session ID of the call to be read.
transactiontransactionIdIntegerYesThe Transaction ID of the call to be read.

Body:

None

Response Code: 200 OK

Body:

KeyTypeMandatory?Description
serviceIdInteger (ID)YesID of the Service the call is associated to.
callCenterIdInteger (ID)YesID of the Call Center which contains the Service.
accountStringNo

The account number for the call.

totalDueDecimalNoThe total amount due for the call.
callDirectionOutboundBooleanYesIf true the call is an outbound call, if false the call is an inbound call.
callStartTimeDateTimeYesThe start date and time of the call.
zipCodeStringNoThe zip code for the call.
consumerArrayNo

The name associated with the call.

KeyTypeMandatory?Description
firstNameStringYesThe first name associated with the call.
lastNameStringYesThe last name associated with the call.


Read in call metadata

#Request (JSON)
GET /realtime/callData/inCall?session=UD6134T518A1E40@10.10.112.81&transaction=21162784221
Host: localhost.com
Content-Type: application/json
Accept: application/json

#Response
200 OK
Content-Type: application/json

{
   "consumer":    {
      "firstName": "John",
      "lastName": "Mcgee"
   },
   "serviceId": 4199,
   "callCenterId": 15,
   "account": "087764164",
   "zipCode": null,
   "totalDue": 216.04,
   "callDirectionOutbound": true,
   "callStartTime": 1368006208000
}
CODE

Read Post Call Metadata

Description: Gets the post call metadata for a call using the session ID and transaction ID.

User Roles: Sysadmin, Superuser, or Report Admin

Method: GET /realtime/callData/postCall?session={sessionId}&transaction={transactionId}

Parameters:

Path/Query Parameter NameVariable NameTypeMandatory?Description
sessionsessionIdStringYesThe Session ID of the call to be read.
transactiontransactionIdIntegerYesThe Transaction ID of the call to be read.

Body:

None

Response Code: 200 OK

Body:

KeyTypeMandatory?Description
serviceIdInteger (ID)YesID of the Service the call is associated with.
callEndTimeDateTimeYesThe end date and time of the call.
lvResultStringYesThe LiveVox result name for the call.
phoneDialedIntegerYesThe phone number dialed or the callers ANI.
termCodeNameStringYesThe Termination Code name for the call.

Read post call metadata

#Request (JSON)
GET /realtime/callData/postCall?session=UD6134T518A1E40@10.10.112.81&transaction=21162784221
Host: localhost.com
Content-Type: application/json
Accept: application/json

#Response
200 OK
Content-Type: application/json

{
   "serviceId": 4199,
   "callEndTime": 1368006243000,
   "lvResult": "Invalid Phone Number",
   "phoneDialed": "6503517508",
   "termCodeName": null
}
CODE

Interaction Event

The Interaction Event API is used to gather various interaction data and updates this data in near real-time. Below are the available interaction types: 

  • Voice (Call): The Interaction Event API gathers call data and updates this data in near real-time. Depending on how the call progresses, you can create up to 3 events; call start, call disposition, and call termination. You can retrieve call events for a 24 hour rolling window, meaning that if the event was created at 8 AM it is available for retrieval until 8 AM the next day.

    Before using this Interaction Event API, contact the LiveVox Customer Care Team to ensure that the proper backend settings are correctly configured.

    Event Recovery

    If a situation arises where events are not retrieved within the 24 hour window, you can use the Call Event Recovery Report method in the Reporting API to retrieve most of the data of the call events. It is not provided in event form (that is, you do not see data for call start, call disposition and call termination) but rather in a standard Call Detail Report (CDR) format. There is some data that cannot be included in the report, this includes the following fields: agentActionTypecallEventTypecallOutcome1callOutcome2callOutcome3eventIdoperatorTransferoperatorTransferSuccessfulpriority, and serviceLevelThreshold.

  • Email (outbound)
  • SMS (outbound

Chat, Email (Inbound), and SMS (Inbound) interactions will be available in future releases through this method.

Expected Fields by Interaction Event Type

Each interactionType has certain fields that are passed in the event, not all fields are included in all types because the data might not be available. Below is a table of the current interactionType and the fields that can be expected back for each event; however. this does not mean the fields always return data. This is intended to provide a basic idea of what properties to expect back with each event and not what properties are mandatory for each event. We currently only pass events for Email (outbound) and SMS (outbound).


Field
Interaction Event Type
VoiceEmail (outbound)SMS (outbound)
CALL_STARTCALL_DISPOSITIONCALL_TERMINATION

account(tick)(tick)(tick)

accountNumber


(tick)(tick)
acctTransactionId


(tick)(tick)
agentId(tick)(tick)(tick)

agentLoginId(tick)(tick)(tick)

areaCodeState(tick)(tick)(tick)

callCenterId(tick)(tick)(tick)(tick)(tick)
callDirection(tick)(tick)(tick)

callEventType(tick)(tick)(tick)

callerId

(tick)

callStartTime



(tick)
campaignId(tick)
(tick)(tick)(tick)
campaignType(tick)(tick)(tick)(tick)(tick)
carrier


(tick)(tick)
clientId(tick)(tick)(tick)(tick)(tick)
duration

(tick)

end

(tick)

eventType


(tick)(tick)
fromEmail


(tick)
interactionType(tick)(tick)(tick)(tick)(tick)
lvResult

(tick)

lvResultId

(tick)

operatorPhone(tick)
(tick)

operatorTransfer

(tick)

operatorTransferSuccessful

(tick)

phoneDialed(tick)(tick)(tick)

phonePosition(tick)(tick)(tick)

phoneNumber



(tick)
priority

(tick)

roundedIvrDuration

(tick)

serviceId


(tick)(tick)
serviceLevelThreshold

(tick)

sessionId(tick)(tick)(tick)(tick)(tick)
smsCode



(tick)

start

(tick)(tick)(tick)

threadId


(tick)(tick)
timestamp(tick)(tick)(tick)(tick)(tick)
toEmail


(tick)
transactionId(tick)(tick)(tick)(tick)(tick)
transferHoldDuration

(tick)

zipCode(tick)(tick)(tick)

Retrieve Interaction Event Feed

Description:  A long polling implementation of interaction events. When the first request is made, it should be a request with a blank token, this is so the first token can be obtained; the next request should include the token, the response contains all interaction events from the time the token was created until the current request time depending on filters. After the initial request, subsequent requests should contain the token from the previous request, this ensures that duplicate events are not returned. If there are no new events in the window between the included token and the current time, the interaction events feed wait 10 seconds before returning a new token; this new token should be used in the subsequent request. Before using, the method backend settings must be configured by LiveVox, these settings start the feed, and any events before this configuration are not available. Interaction events are available for 24 hours from the time they are created.

If you include a token that is older than 24 hours, an error is returned stating that the token needs to be within 24 hours. 

User Roles: Sysadmin or Manager

Method: POST /realtime/event/feed[?count={n}]

Parameters:

Request ParameterValueTypeMandatory?Description
countnIntegerNo

Specifies the maximum number of items to return for the request.

The count value needs to be between 500 and 1,000. The default is set to 1,000 by the system.

If the Accept-Encoding header with the value gzip is provided, the served content is compressed. This header is optional.

Body:

KeyTypeMandatory?Description
tokenStringNo

The token is similar to a time stamp except the token marks a specific point in the events feed; by including a token in the request, you will only receive the events that occurred after that point in the feed. 

filterObjectNo

Filter criteria for the events

Key

Type

Mandatory?

Description

interactionTypeArrayNo

Limits the events to only those for the specified interaction types

Key

Type

Mandatory?

Description

typeStringYesInteraction type
callCenterArrayNo

Limits the events to only those for the specified Call Center.

Key

Type

Mandatory?

Description

idInteger (ID)YesCall Center ID.

If you filter by multiple Services you cannot filter by the call center.

serviceArrayNo

Limits the events to only those for the specified Service(s).

Key

Type

Mandatory?

Description

idInteger (ID)YesThe Service ID.

If you filter by multiple Call Centers you cannot filter by service.

Response Code: 200 OK

Body: 

KeyTypeMandatory?Description
tokenStringYes

Marks a specific point in the event feed. Including this token in the next request will limit the returned values to only events that occurred after the point in the event feed marked by the token.

eventsArrayYes

An array of events that have occurred since the token included in the request. The number of events can be up to the count in the request.

KeyTypeMandatory?Description

ObjectNoThe object representing the event

If you provide the  Accept-Encoding  header with valid value gzip, the served content is compressed. 

Response Code: 200 OK

Body: [binary compressed]

Getting a first token

#Request (JSON)
POST /realtime/callEvent/feed
Host: localhost.com
Content-Type: application/json
Accept: application/json

{
  "token": ""
}

#Response
200 OK
Content-Type: application/json

{
  "token": "e0646720-a7f3-11eb-8080-808080808080",
  "events": []
}
CODE

Retrieve Interaction Event Feed

#Request (JSON)
POST /realtime/event/feed/?count=500
Host: localhost.com
Content-Type: application/json
Accept: application/json

{
  "token": "e0646720-a7f3-11eb-8080-808080808080",
  "filter": {
    "interactionType": [
      {
        "type": "EMAIL"
      },
      {
        "type": "SMS"
      }
    ],
    "callCenter": [
      {
        "id": 11363
      }
    ],
    "service": [
      {
        "id": 93140
      }
    ]
  }
}

#Response
200 OK
Content-Type: application/json

{
  "token": "c388c0f0-a4d9-11eb-8080-808080808080",
  "events": [
    {
      "eventId": "41e22410-a4d9-11eb-abe6-bd1649d297a6",
      "interactionType": "SMS",
      "clientId": "93119",
      "callCenterId": "11363",
      "serviceId": "93140",
      "timestamp": "2021-04-24T04:44:08.000-04:00",
      "campaignId": "29161334",
      "sessionId": "93140-55926849742-1619253848682",
      "phoneNumber": "4154164061",
      "acctTransactionId": "55926849742",
      "eventType": "Attempt",
      "threadId": "55926849742",
      "accountNumber": "13213",
      "campaignType": "OB",
      "carrier": "sap_sms365",
      "smsCode": "53063"
    },
    {
      "eventId": "41e928f0-a4d9-11eb-abe6-bd1649d297a6",
      "interactionType": "Email",
      "clientId": "93119",
      "callCenterId": "11363",
      "serviceId": "93140",
      "timestamp": "2021-04-24T04:44:15.106-04:00",
      "campaignId": "29161335",
      "sessionId": "93140_55926849743_1619253855019",
      "fromEmail": "qa@livevox.com",
      "toEmail": "kyargal@livevox.com",
      "acctTransactionId": "55926849743",
      "eventType": "Attempt",
      "threadId": null,
      "accountNumber": "APIQAE1234",
      "campaignType": "OB",
      "carrier": "sendgrid"
    }
  ]
}
CODE

Retrieve Interaction Event Feed for Multiple Events

#Request (JSON)
POST /realtime/event/feed/?count=500
Host: localhost.com
Content-Type: application/json
Accept: application/json

{
  "token": "04a2ab40-0384-11ee-8080-808080808080"
}

#Response
200 OK
Content-Type: application/json

{
  "token": "8fe74990-0384-11ee-8080-808080808080",
  "events": [
    {
      "eventId": "1c9bc100-0384-11ee-8d7c-873023fbd061",
      "interactionType": "SMS",
      "clientId": "83424",
      "callCenterId": "6797",
      "serviceId": "83447",
      "timestamp": "2023-06-05T05:33:58.000-04:00",
      "campaignId": "751740258",
      "sessionId": "83447-1229726123827-1685957638296",
      "phoneNumber": "4154164061",
      "acctTransactionId": "1229726123827",
      "eventType": "Attempt",
      "threadId": "1229726123827",
      "accountNumber": "13213",
      "campaignType": "OB",
      "carrier": "sap_sms365",
      "smsCode": "53063",
      "campaignTypeId": "6",
      "callStartTime": "1685957638000"
    },
    {
      "eventId": "34740850-0384-11ee-a680-714d10a96a0a",
      "interactionType": "Email",
      "clientId": "83424",
      "callCenterId": "6797",
      "serviceId": "83447",
      "timestamp": "2023-06-05T05:34:39.968-04:00",
      "campaignId": "751740257",
      "sessionId": "83447_1229726123830_1685957679957",
      "fromEmail": "qa@livevox.com",
      "toEmail": "kyargal@livevox.com",
      "acctTransactionId": "1229726123830",
      "eventType": "Attempt",
      "threadId": "1229726123830",
      "accountNumber": "APIQAE1234",
      "campaignType": "OB",
      "campaignTypeId": "11",
      "carrier": "sendgrid"
    },
    {
      "eventId": "63ce1280-0384-11ee-8d7c-873023fbd061",
      "callEventType": "CALL_START",
      "interactionType": "VOICE",
      "transactionId": 1229726123859,
      "clientId": 83424,
      "serviceId": 149926,
      "callCenterId": 6799,
      "sessionId": "U5BT647DAC80@10.111.17.102",
      "campaignId": 751740268,
      "phoneDialed": "6283860755",
      "account": "asd1",
      "operatorPhone": "0",
      "areaCodeState": "CA",
      "callDirection": "MANUAL",
      "campaignType": "MANUAL",
      "agentLoginId": "APITEST1",
      "agentId": "544004",
      "start": "2023-06-05T09:36:00.000Z",
      "timestamp": "2023-06-05T09:36:00.000Z"
    },
    {
      "eventId": "6fbabee0-0384-11ee-a680-714d10a96a0a",
      "callEventType": "CALL_TERMINATION",
      "interactionType": "VOICE",
      "transactionId": 1229726123859,
      "clientId": 83424,
      "serviceId": 149926,
      "callCenterId": 6799,
      "sessionId": "U5BT647DAC80@10.111.17.102",
      "campaignId": 751740268,
      "phoneDialed": "6283860755",
      "account": "asd1",
      "operatorPhone": "0",
      "areaCodeState": "CA",
      "callDirection": "MANUAL",
      "campaignType": "MANUAL",
      "agentLoginId": "APITEST1",
      "agentId": "544004",
      "start": "2023-06-05T09:36:00.000Z",
      "end": "2023-06-05T09:36:14.000Z",
      "timestamp": "2023-06-05T09:36:14.000Z",
      "callerId": null,
      "serviceLevelThreshold": 20,
      "transferHoldDuration": 0,
      "roundedIvrDuration": 0,
      "duration": 12,
      "agentSkillId": "",
      "lvResultId": 661,
      "priority": 308,
      "lvResult": "Operator Transfer (Agent Terminated Call)",
      "operatorTransferSuccessful": 1,
      "operatorTransfer": 1
    },
    {
      "eventId": "8ddc5e60-0384-11ee-a680-714d10a96a0a",
      "callEventType": "CALL_DISPOSITION",
      "interactionType": "VOICE",
      "transactionId": 1229726123859,
      "clientId": 83424,
      "serviceId": 149926,
      "callCenterId": 6799,
      "sessionId": "U5BT647DAC80@10.111.17.102",
      "campaignId": null,
      "phoneDialed": null,
      "account": null,
      "areaCodeState": "null",
      "zipCode": "null",
      "start": "2023-06-05T09:36:00.000Z",
      "timestamp": "2023-06-05T09:37:05.611Z"
    }
  ]
}
CODE

Retrieve interaction event feed when the token is older than 24 hours

#Request (JSON)
POST /realtime/event/feed
Host: localhost.com
Content-Type: application/json
Accept: application/json

{
  "token": "d57fa600-9117-11eb-8080-808080808080",
  "filter": {
    "interactionType": [
      {
        "type": "EMAIL"
      },
      {
        "type": "SMS"
      }
    ],
    "callCenter": [
      {
        "id": 7432
      }
    ],
    "service": [
      {
        "id": 83626
      }
    ]
  }
}

#Response
400 Bad Request
Content-Type: application/json

{
  "code": 202,
  "message": "Time \"2021-03-30 01:21:51-0400\" is more than 24 hours old. This type of data is kept for 24 hours."
} 
CODE

Retrieve Event Feed Through Server-Sent Event (SSE)

Description: Server-Sent Events allows you to receive automatic updates from a server over an HTTP connection without resorting to polling. Once the request is received by the server, a connection can be kept open as long as needed. If there are new events, the server will send as many new events as possible, up to the specified count. If there are no new events, the server will send a comment in the SSE term (a line starting with ':') for the purpose of keeping the connection alive during the idle period. Before beginning to use the method backend settings must be configured by LiveVox, these settings start the feed, and any events before this configuration are not available.

You are expected to keep a record of the eventId from the last event such that, in case of lost connection, you can send the last eventId as token in a new request. This will make sure that you don't miss any events in between. Otherwise, you can send the request without a token, and the event feed will only send events that are created after the request is started.

  • There is a timer for a connection. If there is no event for 5 minutes, the system closes the connection and sends a comment to you. 
  • SSE does not work well with the Postman tool. Manually, curl may be the only tool, as shown in the below examples.

User Roles: Sysadmin or Manager

Method: POST /realtime/event/feed/sse[?count={n}]

Parameters:

Request ParameterValueTypeMandatory?Description
countnIntegerNo

Specifies the maximum number of items to return for the request

The count value needs to be between 500 and 1,000. The default is set to 1,000 by the system.

Headers: 

HeaderValueMandatory?Description
Accept-EncodinggzipNoIf this header with the value gzip is provided, the served content is compressed. This header is optional.
Accepttext/event-stream, application/jsonYesNotice the two values for the header as we will use JSON to report validation/authorization errors.

Body:

KeyTypeMandatory?Description
tokenStringNo

The token is similar to a time stamp except the token marks a specific point in the events feed; by including a token in the request, you will only receive the events that occurred after that point in the feed. If not present, the feed will start with the current moment. You need to add the eventId from the last event retrieved as a token.

filterObjectNo

Filter criteria for the events

Key

Type

Mandatory?

Description

interactionTypeArrayNo

Limits the events to only those for the specified interaction types

Key

Type

Mandatory?

Description

typeStringYesInteraction type
callCenterArrayNo

Limits the events to only those for the specified Call Center

Key

Type

Mandatory?

Description

idInteger (ID)YesCall Center ID

If you filter by multiple services, you cannot filter by the call center.

serviceArrayNo

Limits the events to only those for the specified Service(s)

Key

Type

Mandatory?

Description

idInteger (ID)YesThe Service ID

If you filter by multiple call centers, you cannot filter by the service.

Response Code: 200 OK

Headers:

HeaderValueMandatory?Description
Content-Typetext/event-streamYesSimple stream of text data that must be encoded using UTF-8

Body:

The event stream is a simple stream of text data that is encoded using UTF-8. Messages in the event stream are separated by a pair of newline characters. Each message consists of one or more lines of text listing the fields for that message. Each field is represented by the field name, followed by a colon, followed by the text data for that field's value.

KeyTypeMandatory?Description
dataStringYes

 A JSON string representation of an event.

Retrieve interaction event feed through SSE

#Request

curl --location --request POST 'http://<LiveVox API server name>/realtime/event/feed/sse?count=500' \
--header 'LV-Session: 47cbd019-9736-4236-9a75-8a9a25d2154f' \
--header 'Content-Type: application/json' \
--data-raw '{
    "token": "",
    "filter": {
        "interactionType": [
            {
                "type": "EMAIL"
            },
            {
                "type": "SMS"
            }          
        ],
        "callCenter": [
            {
                "id": 11363
            }
        ],
        "service": [
            {
                "id": 93140
            }
        ]
    }
}'

#Response

: keepalive 2021-04-24 07:34:29-0400

: keepalive 2021-04-24 07:34:39-0400

: keepalive 2021-04-24 07:34:49-0400

data: {"eventId":"41e22410-a4d9-11eb-abe6-bd1649d297a6","interactionType":"SMS","clientId":"93119",
"callCenterId":"11363","serviceId":"93140","timestamp":"2021-04-24T07:34:52.000-04:00","campaignId":"29161334",
"sessionId":"93140-55926849742-1619253848682","phoneNumber":"4154164061","acctTransactionId":"55926849742",
"eventType":"Attempt","threadId":"55926849742","accountNumber":"13213","campaignType":"OB","carrier":"sap_sms365","smsCode":"53063"}

data: {"eventId":"41e928f0-a4d9-11eb-abe6-bd1649d297a6","interactionType":"Email","clientId":"93119",
"callCenterId":"11363","serviceId":"93140","timestamp":"2021-04-24T07:34:55.106-04:00","campaignId":"29161335",
"sessionId":"93140_55926849743_1619253855019","fromEmail":"qa@livevox.com","toEmail":"kyargal@livevox.com",
"acctTransactionId":"55926849743","eventType":"Attempt","threadId":null,"accountNumber":"APIQAE1234","campaignType":"OB","carrier":"sendgrid"}

: keepalive 2021-04-24 07:35:05-0400
CODE

Retrieve interaction event feed through SSE when eventId is used as token

#Request

curl --location --request POST 'http://<LiveVox API server name>/realtime/event/feed/sse' \
--header 'LV-Session: 47cbd019-9736-4236-9a75-8a9a25d2154f' \
--header 'Content-Type: application/json' \
--data-raw '{
    "token": "41e22410-a4d9-11eb-abe6-bd1649d297a6",
    "filter": {
        "interactionType": [
            {
                "type": "EMAIL"
            },
            {
                "type": "SMS"
            }            
        ],
        "callCenter": [
            {
                "id": 11363
            }
        ],
        "service": [
            {
                "id": 93140
            }
        ]
    }
}'

#Response

data: {"eventId":"41e928f0-a4d9-11eb-abe6-bd1649d297a6","interactionType":"Email","clientId":"93119",
"callCenterId":"11363","serviceId":"93140","timestamp":"2021-04-24T07:34:55.106-04:00","campaignId":"29161335",
"sessionId":"93140_55926849743_1619253855019","fromEmail":"qa@livevox.com","toEmail":"kyargal@livevox.com",
"acctTransactionId":"55926849743","eventType":"Attempt","threadId":null,"accountNumber":"APIQAE1234","campaignType":"OB","carrier":"sendgrid"}

data: {"eventId":"41ee8020-a4d9-11eb-abe6-bd1649d297a6","interactionType":"Email","clientId":"93119",
"callCenterId":"11363","serviceId":"93140","timestamp":"2021-04-24T07:52:16-100-04:00","campaignId":"29161335",
"sessionId":"93140_55926849744_1619253855759","fromEmail":"qa@livevox.com","toEmail":"kyargal@livevox.com",
"acctTransactionId":"55926849744","eventType":"Attempt","threadId":null,"accountNumber":"APIQAE1234","campaignType":"OB","carrier":"sendgrid"}

: keepalive 2021-04-24 07:52:26-0400

: keepalive 2021-04-24 07:52:36-0400
CODE

Campaign

The Campaign APIs return campaign statistical information.

Campaign Level Statistics

Description: 

Returns Campaign statistical information that includes records uploaded to the platform, records processed successfully, records yet to be dialed, and records for which dialing is complete.  The statistics are returned only for current day campaigns, which are not in the following states: Deactivates, scheduled unbuilt, and ready unbuilt.

User Roles: Sysadmin, Superuser, IT user, Auditor, or Manager

Method: POST /realtime/campaign/stats

Parameters:

None

Body:

Key or ElementTypeMandatory?Description
filterObjectNo

Specifies the filter criteria. The filter is not an 'and' filter, but rather an exclusive 'or' filter, meaning that no more than 1 filter may be specified when making a request.

AttributeTypeMandatory?Description
campaignArrayNo

An array of Campaign IDs to filter the campaign statistics.

KeyTypeMandatory?Description
idInteger (ID)YesID of the Campaign
callCenterArrayNo

An array of Call Center IDs to filter the campaign statistics.

KeyTypeMandatory?Description
idInteger (ID)YesID of the Call Center
serviceArrayNo

An array of Service IDs to filter the campaign statistics.

KeyTypeMandatory?Description
idInteger (ID)YesID of the Service

Response Code: 200 OK

Body:

Key or AttributeTypeMandatory?Description

stats

ArrayYes

An array of campaign statistics.

AttributeTypeMandatory?Description
campaignIdIntegerYesId associated to this campaign

serviceId

IntegerYesService Id associated with this campaign

uploaded

IntegerYesNumber of records processed by the platform
loadedIntegerYesNumber of records successfully processed as dial-able records
remainingIntegerYesNumber of records pending to be dialed
completedIntegerYesNumber of records that have been dialed
timezoneBreakdownArrayYes

Array of Timezone Items

AttributeTypeDescription
timezoneStringA dial-able timezone
countIntegerNumber of records for this timezone


The timezone Attribute may have values from the following table:

Possible valuesDescription
ALAL timezone
ATAT timezone
CHTCHT timezone
CTCT timezone
ETET timezone
HIHI timezone
MTMT timezone
PTPT timezone
SAFESAFE timezone for zip/area code mismatches
UKUK timezone

Campaign Level Statistics

#Request (JSON)
POST /realtime/realtime/campaign/stats
Host: localhost.com
Content-Type: application/json
Accept: application/json

{
    "filter": {
        "campaign": [
            {
                "id": "103629512"
            }
        ]
    }
}

#Response
200 OK
Content-Type: application/json

{
    "stats": [
        {
            "timezoneBreakdown": [
                {
                    "timezone": "AL",
                    "count": 0
                },
                {
                    "timezone": "AT",
                    "count": 2
                },
                {
                    "timezone": "CHT",
                    "count": 0
                },
                {
                    "timezone": "CT",
                    "count": 0
                },
                {
                    "timezone": "ET",
                    "count": 5
                },
                {
                    "timezone": "HI",
                    "count": 0
                },
                {
                    "timezone": "MT",
                    "count": 3
                },
                {
                    "timezone": "PT",
                    "count": 1
                },
                {
                    "timezone": "SAFE",
                    "count": 0
                },
                {
                    "timezone": "UK",
                    "count": 0
                }
            ],
            "campaignId": 103629512,
            "serviceId": 1008351,
            "loaded": 11,
            "uploaded": 15,
            "remaining": 10
        }
    ]
}
CODE

Service

The Service APIs return in real-time the statistics pertaining to a particular Service or the Agents that are part of that Service.

Get Agent Averages

Description: Returns the average time Agents spent in various states (i.e. Ready, Not Ready, In Call, etc.)

User Roles: Sysadmin, Superuser, or Manager

Method: POST /realtime/service/agents/averages

Parameters:

None

Body:

Key or ElementTypeMandatory?Description
filterObjectNo

Specifies the filter criteria

Key or ElementTypeMandatory?Description
callCenterArrayNo

An array of Call Center IDs to filter the agent averages.

AttributeTypeMandatory?Description
idInteger (ID)YesID of the Call Center

If the value is empty, it is treated as a request for all Call Centers.

serviceArrayNo

An array of Service IDs to filter the agent averages.

AttributeTypeMandatory?Description
idInteger (ID)YesID of the Service

If the value is empty, it is treated as a request for all Services.

Response Code: 200 OK

Body:

Key or AttributeTypeMandatory?Description
agentAveragesArrayYes

Provides summary of Agent averages for various Agent states.

AttributeTypeMandatory?Description
averageReadyTimeIntegerYesAverage time (seconds) agent spent waiting for customer.
averageNotReadyTimeIntegerYesAverage time (seconds) agent is unavailable to receive customer.
averageTalkTimeIntegerYesAverage time (seconds) agent spent talking to customer.
averageWrapupTimeIntegerYesAverage time (seconds) agent spent post talk work.
averagePreviewTimeIntegerYesAverage time (seconds) agent spent in previewing before launching the call.
averageManualDialTimeIntegerYesAverage time (seconds) agent spent in manual dial.
averageHoldTimeIntegerYesAverage time (seconds) agent was on hold.
averageTransferringTimeIntegerYesAverage time (seconds) agent spent transferring the call.
averageRegisteringTimeIntegerYesAverage time (seconds) agent spent during registering the call.
averageDialingTimeIntegerYesAverage time (seconds) agent spent dialing the call.
averageReservedTimeIntegerYes Average time (seconds) agent spent in reserve.
timeStampDateTimeYesTimestamp representing when the averages were calculated.
timeStampDateTimeYesLast Timestamp since the Agent Service was updated.

Get Agent Averages

#Request (JSON)
POST /realtime/service/agents/averages
Host: localhost.com
Content-Type: application/json
Accept: application/json

{ 
   "filter":  {
      "service": [{"id": "38049"}]
   }
}

#Response
200 OK
Content-Type: application/json

{
	"agentAverages": [
      {
        "averageReadyTime": "3",
        "averageNotReadyTime": "2",
        "averageTalkTime": "5",
        "averageWrapupTime": "1",
        "averagePreviewDialTime": "1",
        "averageManualDialTime": "0",
        "averageHoldTime": "2",
        "averageTransferringTime": "1",
        "averageRegisteringTime": "0",
        "averageDialingTime": "0",
        "averageReservedTime": "0",
        "timeStamp": "1417075930315"
      }],
    "timeStamp": "1417077749955"
}
CODE

Get Agent Statistics

Description: Returns Agent statistical information.

User Roles: Sysadmin, Superuser, or Manager

Method: POST /realtime/service/agent/stats

Parameters:

None

Body:

KeyTypeMandatory?Description
filterObjectNo

Specifies the filter criteria.

KeyTypeMandatory?Description
callCenterArrayNo

An array of Call Center IDs to filter the agent statistics.

KeyTypeMandatory?Description
idInteger (ID)YesID of the Call Center

If the value is empty, it is treated as a request for all Call Centers.

serviceArrayNo

An array of Service IDs to filter the agent statistics.

KeyTypeMandatory?Description
idInteger (ID)YesID of the Service

If the value is empty, it is treated as a request for all Services.

Response Code: 200 OK

Body:

Key or AttributeTypeMandatory?Description
agentStatisticsArrayYes

Provides statistical information of the agent.

AttributeTypeMandatory?Description
agentNameStringYesName of the Agent
agentStatusStringYesCurrent status of the agent
inboundCallsIntegerYesTotal number of inbound calls received
outboundCallsIntegerYesTotal number of outbound calls received
stateChangedTimeDateTimeYesTimestamp of when agent entered current state.
readyDurationIntegerYesTotal Ready Duration
wrapupDurationIntegerYesTotal Wrapup Duration
talkDurationIntegerYesTotal Talk Duration
totalNotReadyDurationIntegerYesTotal Not Ready Duration
notReadyLunchDurationIntegerYesNot Ready - Lunch Duration
notReadyTrainingDurationIntegerYesNot Ready - Training Duration
notReadyBreakDurationIntegerYesNot Ready - Break Duration
notReadyMeetingDurationIntegerYesNot Ready - Meeting Duration
notReadyTechDiffDurationIntegerYesNot Ready - Technical Difficulties Duration
notReadyOtherDurationIntegerYesNot Ready - Other Duration
rpcCompleteIntegerYesRPC - Complete
rpcIncompleteIntegerYesRPC - Incomplete
wpcIntegerYesTotal WPC
nonContactsIntegerYesTotal Non Contact (Other) Results

Agent Statistics

#Request (JSON)
POST /realtime/service/agent/stats
Host: localhost.com
Content-Type: application/json
Accept: application/json

{ 
   "filter":  {
      "service": [{"id": "38049"}]
   }
}

#Response
200 OK
Content-Type: application/json

"agentStatistics": [{
   "agentName": "VINAY K",
   "agentStatus": "Ready",
   "inboundCalls": 0,
   "outboundCalls": 0,
   "stateChangedTime": 1401957077840,
   "readyDuration": 0,
   "totalNotReadyDuration": 68,
   "notReadyLunchDuration": 0,
   "notReadyTrainingDuration": 0,
   "notReadyBreakDuration": 0,
   "notReadyMeetingDuration": 0,
   "notReadyTechDiffDuration": 0,
   "notReadyOtherDuration": 68,
   "wrapupDuration": 0,
   "talkDuration": 0,
   "rpcComplete": 0,
   "rpcIncomplete": 0,
   "wpc": 0,
   "nonContacts": 0
}]}

XML

Get Agent Statistics Ex

Description: Returns Agent statistical information.

User Roles: Sysadmin, Superuser, or Manager

This is a newer version of the Get Agent Statistics which will eventually be deprecated. The main difference between this method and the old one besides the obvious structural differences is in the way the filter works. In the old method the filter used the Service or Call Center to determine what data was returned based on what Agents were logged in at that exact moment; while in the new version the data returned is for any Agent that logged into that Service or Call Center throughout the day.

Method: POST /realtime/service/agent/stats/ex

Parameters:

None

Body:

KeyTypeMandatory?Description
filterObjectNo

Specifies the filter criteria. The filter is not an 'and' filter but rather an 'or' filter, meaning that if both a Service and Call Center are included the returned data will pertain to the included Service or Call Center.

KeyTypeMandatory?Description
callCenterArrayNo

An array of Call Center IDs to filter the agent statistics.

KeyTypeMandatory?Description
idInteger (ID)YesID of the Call Center

If the value is empty, it is treated as a request for all Call Centers.

serviceArrayNo

An array of Service IDs to filter the agent statistics.

KeyTypeMandatory?Description
idInteger (ID)YesID of the Service

If the value is empty, it is treated as a request for all Services.


Response Code: 200 OK

Body:

Key or AttributeTypeMandatory?Description
agentStatisticsArrayYes

Provides statistical information of the agent.

AttributeTypeMandatory?Description
agentNameStringYesName of the Agent.
agentLoginIdStringYesThe login ID of the Agent.
servicesArrayYes

An array of Services the Agent has logged into and stats for the Agent in that Service.

AttributeTypeMandatory?Description
idInteger (ID)YesThe Service ID that the Agent was logged into, and to which the stats pertain.
inboundCallsIntegerYesTotal number of inbound calls received
outboundCallsIntegerYesTotal number of outbound calls received
callCenterIdStringYesThe Call Center ID of the Service.
readyDurationIntegerYesTotal Ready Duration
totalNotReadyDurationIntegerYesTotal Not Ready Duration
notReadyLunchDurationIntegerYesNot Ready - Lunch Duration
notReadyTrainingDurationIntegerYesNot Ready - Training Duration
notReadyBreakDurationIntegerYesNot Ready - Break Duration
notReadyMeetingDurationIntegerYesNot Ready - Meeting Duration
notReadyTechDiffDurationIntegerYesNot Ready - Technical Difficulties Duration
notReadyOtherDurationIntegerYesNot Ready - Other Duration
wrapupDurationIntegerYesTotal Wrapup Duration
talkDurationIntegerYesTotal Talk Duration
rpcCompleteIntegerYesRPC - Complete
rpcIncompleteIntegerYesRPC - Incomplete
wpcIntegerYesTotal WPC
nonContactsIntegerYesTotal Non Contact (Other) Results

Get Agent Statistics

#Request (JSON)
POST /realtime/service/agent/stats/ex
Host: localhost.com
Content-Type: application/json
Accept: application/json

#Response
200 OK
Content-Type: application/json

{"agentStatistics": [
      {
      "services":       [
                  {
            "id": 23068,
            "callCenterId": "1623",
            "inboundCalls": 0,
            "outboundCalls": 2,
            "readyDuration": 75,
            "totalNotReadyDuration": 48,
            "notReadyLunchDuration": 0,
            "notReadyTrainingDuration": 0,
            "notReadyBreakDuration": 0,
            "notReadyMeetingDuration": 0,
            "notReadyTechDiffDuration": 0,
            "notReadyOtherDuration": 48,
            "wrapupDuration": 0,
            "talkDuration": 156,
            "rpcComplete": 1,
            "rpcIncomplete": 0,
            "wpc": 0,
            "nonContacts": 0
         },
                  {
            "id": 38049,
            "callCenterId": "1623",
            "inboundCalls": 0,
            "outboundCalls": 0,
            "readyDuration": 191,
            "totalNotReadyDuration": 1049,
            "notReadyLunchDuration": 0,
            "notReadyTrainingDuration": 0,
            "notReadyBreakDuration": 0,
            "notReadyMeetingDuration": 0,
            "notReadyTechDiffDuration": 0,
            "notReadyOtherDuration": 1049,
            "wrapupDuration": 0,
            "talkDuration": 154,
            "rpcComplete": 0,
            "rpcIncomplete": 0,
            "wpc": 0,
            "nonContacts": 0
         }
      ],
      "agentName": "LIVE VOX",
      "agentLoginId": "SEBY"
   },
...
      {
      "services": [      {
         "id": 23068,
         "callCenterId": "1623",
         "inboundCalls": 0,
         "outboundCalls": 1,
         "readyDuration": 297,
         "totalNotReadyDuration": 31,
         "notReadyLunchDuration": 0,
         "notReadyTrainingDuration": 0,
         "notReadyBreakDuration": 0,
         "notReadyMeetingDuration": 0,
         "notReadyTechDiffDuration": 0,
         "notReadyOtherDuration": 31,
         "wrapupDuration": 27,
         "talkDuration": 17,
         "rpcComplete": 1,
         "rpcIncomplete": 1,
         "wpc": 0,
         "nonContacts": 0
      }],
      "agentName": "QA PASS1234",
      "agentLoginId": "1AMBY"
   }
]}
CODE

Get Agent Status

Description: API responsible for returning agent status at service level.

User Roles: Sysadmin, Superuser, or Manager

Method: POST /realtime/service/agents/status

Parameters:

None

Body:

Key

Type

Mandatory?

Description

stateChangedAfterdateTimeNoTimestamp for state change.
filterObjectNo

Specifies the filter criteria.

KeyTypeMandatory?Description
callCenterArrayNo

An array of Call Center IDs to filter the agent status'.

AttributeTypeMandatory?Description
idInteger (ID)YesID of the Call Center

If the value is empty, it is treated as a request for all Call Centers.

serviceArrayNo

An array of Service IDs to filter the agent status'.

AttributeTypeMandatory?Description
idInteger (ID)YesID of the Service

If the value is empty, it is treated as a request for all Services.

Response Code: 200 OK

Body:

Key or AttributeTypeMandatory?Description
agentDetailsArrayYes

Provides current status details of the agent.

AttributeTypeMandatory?Description
monitorTypeIntegerNo

The type of monitoring being done on the agent.


IDDescription
0None
1Listen
2Coach
3Barge
serviceNameStringYesName of the Service.
serviceIdIntegerYesID of the Service.
agentLoginIdStringYesAgent Login ID.
agentNameStringYesName of the Agent.
stateStringYesCurrent state of the Agent.
stateIdIntegerYes

The ID of the state the Agent is in, mapping of values below.

IDDescription
0Logon
1Logoff
2Ready
3Not Ready
4In Call
5Wrap Up
6Transferring
7Manual Dial
8Preview Dial
9Dialing
12Registering
13Hold
reasonCodeStringNo

Possible values are:

  • Break
  • Lunch
  • Meeting
  • Other
  • Tech Difficulties
  • Training
callTypeStringNoThe type of call.
stateChangedAfterDateTimeYesTimestamp when the agent went to current state.
inboundCallsIntegerYesTotal Number of Inbound Calls Received by Agent.
outboundCallsIntegerYesTotal Number of Outbound Calls Received by Agent.
isAgentMonitoredBooleanYesIndicates whether or not the agent is currently being monitored.
sessionIdStringNoCurrent Session ID of the agent call.
accountStringNoAccount number of the current customer agent is attending to.
agentSkillStringNoAgent Skill of the current customer agent is attending to.
phoneStringNoPhone Number of the current customer agent is attending to.
callCenterIdStringYesCall Center Id.
callCenterNameStringYesCall Center Name.
transactionIdIntegerNoThe transaction ID if an Agent is on a call.
timeStampDateTimeYesLast timestamp since the Agent Service was updated.

Agent Status

#Request (JSON)
POST /realtime/service/status
Host: localhost.com
Content-Type: application/json
Accept: application/json

{ 
   "filter":  {
      "service": [{"id": "38049"}]
   }
}

#Response
200 OK
Content-Type: application/json

{
   "agentDetails": [   {
      "serviceId": 38049,
      "serviceName": "Manual (Manual 4)",
      "agentLoginId": "VKUMARK",
      "agentName": "VINAY K",
      "state": "Not Ready",
      "stateId": 3,
      "reasonCode": "",
      "callType": null,
      "stateChangedAfter": 1401958827016,
      "inboundCalls": null,
      "outboundCalls": null,
      "isAgentMonitored": false,
      "transactionId": null,
      "sessionId": null,
      "account": null,
      "agentSkill": null,
      "phone": null,
      "callCenterId": "1623",
      "callCenterName": "Call Center"
   }],
   "timeStamp": 1401958827016
}
XML

Get Hold Service Details

Description: Returns information about each call that is currently on hold.

User Roles: Sysadmin, Superuser, or Manager

Method: POST /realtime/service/calls/status

Parameters:

None

Body:

Key or ElementTypeMandatory?Description
filterObjectNo

Specifies the filter criteria

Key or ElementTypeMandatory?Description
callCenterArrayNo

An array of Call Center IDs to filter the hold details.

AttributeTypeMandatory?Description
idInteger (ID)YesID of the Call Center

If the value is empty, it is treated as a request for all Call Centers.

serviceArrayNo

An array of Service IDs to filter the hold details.

AttributeTypeMandatory?Description
idInteger (ID)YesID of the Service

If the value is empty, it is treated as a request for all Services.

Response Code: 200 OK

Body:

Key or ElementTypeMandatory?Description
callsDetailsArrayYes

Provides details for calls on hold.

AttributeTypeMandatory?Description
serviceNameStringYesName of the Service for the Call
serviceIdIntegerYesID of the Service for the Call
nameStringYesCustomer First name and last name
accountStringYesAccount number of the Customer
phoneStringYesPhone Number of the customer
timeStampDateTimeYesTimestamp when the call arrived to ACD.
agentSkillStringNoCall AgentSkill
priorityIntegerYesCall Priority
timeStampDateTimeYes

Current Server time stamp

Get Hold Details

#Request (JSON)
POST /realtime/service/calls/status
Host: localhost.com
Content-Type: application/json
Accept: application/json

{ 
   "filter":  {
      "service": [{"id": "38049"}]
   }
}

#Response
200 OK
Content-Type: application/json

{
   "callsDetails": [
      {
        "serviceName": "Manual_test",
        "serviceId": "38049",
        "name": "Will",
        "account": "34964238",
        "phone": "6503517490",
        "timeStamp": "1417066734",
        "agentSkill": "38049",
        "priority": "1",
       }]
    "timeStamp": "1417077534000"
  }
CODE

Get Live Connects

Description: Returns the number of live (right party) connects over the last 30 min broken down in 5 min intervals.

User Roles: Sysadmin, Superuser, or Manager

Method: POST /realtime/service/liveConnects

Parameters:

None

Body:

Key or ElementTypeMandatory?Description
filterObjectNo

Specifies the filter criteria

Key or ElementTypeMandatory?Description
callCenterArrayNo

An array of Call Center IDs to filter the live connects.

AttributeTypeMandatory?Description
idInteger (ID)YesID of the Call Center

If the value is empty, it is treated as a request for all Call Centers.

serviceArrayNo

An array of Service IDs to filter the live connects.

AttributeTypeMandatory?Description
idInteger (ID)YesID of the Service

If the value is empty, it is treated as a request for all Services.

Response Code: 200 OK

Body:

Key or ElementTypeMandatory?Description
liveConnectsArrayYes

Provides summary of right party contacts.

AttributeTypeMandatory?Description
totalIntegerYesTotal number of live connects. A call is considered live connect if the termination code selected by the agent is classified as "Right Party with Payment" (RTR.agent_action_type = 1) or "Right Party without Payment" (RTR.agent_action_type = 2).
timeStampDateTimeYesTimestamp representing when the averages were calculated.

Get Right Party Live Connects

#Request (JSON)
POST /realtime/service/liveConnects
Host: localhost.com
Content-Type: application/json
Accept: application/json

{ 
   "filter":  {
      "service": [{"id": "38049"}]
   }
}

#Response
200 OK
Content-Type: application/json

{
   "liveConnects": [
      {
        "total": "10",
        "timeStamp": "1417075930315"
      },
      {
        "total": "12",
        "timeStamp": "1417077749955"
      }
      ]
}
CODE

Get Service Statistics

Description: Returns Service statistical information.

This method provides service statistics only for those services in which agents are involved.

User Roles: Sysadmin, Superuser, or Manager

Method: POST /realtime/service/stats

Parameters:

None

Body:

KeyTypeMandatory?Description
filterObjectNo

Specifies the filter criteria

KeyTypeMandatory?Description
callCenterArrayNo

An array of Call Center IDs to filter the service statistics.

KeyTypeMandatory?Description
idInteger (ID)YesID of the Call Center

If the value is empty, it is treated as a request for all call centers.

serviceArrayNo

An array of Service IDs to filter the service statistics.

KeyTypeMandatory?Description
idInteger (ID)YesID of the Service

If the value is empty, it is treated as a request for all services.


Response Code: 200 OK

Body:

Key or AttributeTypeMandatory?Description
statsArrayYes

Provide details for the Service

Key or AttributeTypeMandatory?Description
callsArrayYes

Provides statistical information of the service.

AttributeTypeMandatory?Description
callStateStringYes

State

ValueDescription
With no agentsWhen a call is dropped or being sent to voicemail because no Agent was found that could handle the call.
On holdThe call is on hold waiting to be assigned to an agent (this does not include when an agent puts the call on hold).
With operatorThe call is being handled by an agent.
sessionIdStringYesSession
transferStartTimeDateTimeYesThe time the call started the transfer process.
transferBridgeTimeDateTimeYesThe time the call was bridged to an agent.
transferConnectTimeDateTimeYesThe time the call is connected to an agent.
transferEndTimeDateTimeYesThe time the agent and customer are disconnected.
priorityByteYesThe priority of the call.
agentSkillStringNoThe agent skill assigned to the call.
accountStringNoAccount number of the customer.
phoneStringYesPhone Number of the customer.
agentNameStringNoName of the agent handling the call.
agentLogonIdStringNoLogon Id of the agent.
serviceIdStringYesID of the Service
serviceNameStringYesName of the Service
cipIntegerYesCIP
totalOfferedIntegerYesTotal number of calls that tried to transfer to an agent.
totalHandledIntegerYesTotal number of calls were handled by an agent.
totalAbandonedIntegerYesNumber of attempted OP that failed to reach an agent.
abandonRateDecimalYesTotal calls offered divided by the total calls abandoned.
serviceLevelDecimalYesThe Service level set at the client or service level.
averageSpeedOfAnswerIntegerYesThe sum of the time it takes for calls to be answered divided by the total calls handled.
averageDurationToAbandonIntegerYesThe sum of the duration of all abandoned calls divided by the total number of abandoned calls.
averageTalkDurationIntegerYesTotal time agents were talking with a customer divided by the total number of calls handled.
averageWrapupDurationIntegerYesTotal time agents were in wrap up divided by the total number of calls handled.
averageHandleDurationIntegerYesThe sum of total talk time and wrap up time divided by the total number of calls handled.
totalCallsAnsweredWithinSLAIntegerYesTotal number of calls answered before the service level threshold.
totalCallsAbandonedWithinSLAIntegerYes

Total number of calls abandoned before the service level threshold.

pacingMethodStringYesCurrent Pacing Method
throttleStringYesThe throttle set on the service.
unitsStringYesThe units of the throttle setting.
totalCallsInQueueIntegerYesTotal number of calls on hold waiting to be transferred to an agent.
callsWithAgentIntegerYesTotal number of calls currently with an agent.
totalAgentsIntegerYesTotal number of agents logged into the service.
longestCallInQueueIntegerYesThe longest time a current call has been on hold (only calls currently in a queue)
maxHoldTimeIntegerYesThe total time a call can stay on hold.
loadedIntegerYesThe total number of records loaded to the service.
remainingIntegerYesTotal number of dialable records left to be dialed.
playingDialableIntegerYesThe total number of dialable records loaded to the service.
percentCompleteDecimalYesThe total remaining records divided by the total dialable records.
callCenterIdStringYesCall Center Id
callCenterNameStringYesCall Center Name

Service Statistics

#Request (JSON)
POST /realtime/service/stats
Host: localhost.com
Content-Type: application/json
Accept: application/json

{ 
   "filter":  {
      "service": [{"id": "38049"}]
   }
}

#Response
200 OK
Content-Type: application/json

{"stats": [{
   "calls": [],
   "serviceId": "38049",
   "serviceName": "Manual (Manual 4)",
   "cip": 0,
   "totalOffered": 0,
   "totalHandled": 0,
   "totalAbandoned": 0,
   "abandonRate": 0,
   "serviceLevel": 0,
   "averageSpeedOfAnswer": 0,
   "averageDurationToAbandon": 0,
   "averageTalkDuration": 0,
   "averageWrapupDuration": 0,
   "averageHandleDuration": 0,
   "totalCallsAnsweredWithinSLA": 0,
   "totalCallsAbandonedWithinSLA": 0,
   "pacingMethod": "Max CIP",
   "throttle": "750",
   "units": "calls",
   "totalCallsInQueue": 1,
   "callsWithAgent": 0,
   "totalAgents": 1,
   "longestCallInQueue": 4024,
   "maxHoldTime": 30,
   "loaded": 0,
   "remaining": 0,
   "playingDialable": 0,
   "percentComplete": 100,
   "callCenterId": "1623",
   "callCenterName": "Call Center"
}]}
XML

Errors

For more information, see the  Errors section on the REST APIs page.

Top of Page