Download PDF
Download page Real-Time Reporting API.
Real-Time Reporting API
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:
Key | Type | Mandatory? | Description |
---|---|---|---|
token | String | No | The 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:
Key | Type | Mandatory? | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
token | String | Yes | A 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
agentEvent | Array | No | An array of agent events that occurred after the token included in the request.
|
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"
}
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"
}
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?[client={clientId}&]session={sessionId}&transaction={transactionId}
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
client | clientId | Integer (ID) | No | The ID of the Client the call is associated to. |
session | sessionId | String | Yes | The Session ID of the call to be read. |
transaction | transactionId | Integer | Yes | The Transaction ID of the call to be read. |
Body:
None
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
serviceId | Integer (ID) | Yes | ID of the Service the call is associated to. | ||||||||||||
callCenterId | Integer (ID) | Yes | ID of the Call Center which contains the Service. | ||||||||||||
account | String | No | The account number for the call. | ||||||||||||
totalDue | Decimal | No | The total amount due for the call. | ||||||||||||
callDirectionOutbound | Boolean | Yes | If true the call is an outbound call, if false the call is an inbound call. | ||||||||||||
callStartTime | DateTime | Yes | The start date and time of the call. | ||||||||||||
zipCode | String | No | The zip code for the call. | ||||||||||||
consumer | Array | No | The name associated with the call.
|
Read in call metadata
#Request (JSON)
GET /realtime/callData/inCall?client=4199&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
}
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?[client={clientId}&]session={sessionId}&transaction={transactionId}
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
client | clientId | Integer (ID) | No | The ID of the Client the call is associated to. |
session | sessionId | String | Yes | The Session ID of the call to be read. |
transaction | transactionId | Integer | Yes | The Transaction ID of the call to be read. |
Body:
None
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description |
---|---|---|---|
serviceId | Integer (ID) | Yes | ID of the Service the call is associated with. |
callEndTime | DateTime | Yes | The end date and time of the call. |
lvResult | String | Yes | The LiveVox result name for the call. |
phoneDialed | Integer | Yes | The phone number dialed or the callers ANI. |
termCodeName | String | Yes | The Termination Code name for the call. |
Read post call metadata
#Request (JSON)
GET /realtime/callData/postCall?client=4199&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
}
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:
agentActionType
,callEventType
,callOutcome1
,callOutcome2
,callOutcome3
,eventId
,operatorTransfer
,operatorTransferSuccessful
,priority
, andserviceLevelThreshold
.- 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 | ||||
---|---|---|---|---|---|
Voice | Email (outbound) | SMS (outbound) | |||
CALL_START | CALL_DISPOSITION | CALL_TERMINATION | |||
account | |||||
accountNumber | |||||
acctTransactionId | |||||
agentId | |||||
agentLoginId | |||||
areaCodeState | |||||
callCenterId | |||||
callDirection | |||||
callEventType | |||||
callerId | |||||
callStartTime | |||||
campaignId | |||||
campaignType | |||||
carrier | |||||
clientId | |||||
duration | |||||
end | |||||
eventType | |||||
fromEmail | |||||
interactionType | |||||
lvResult | |||||
lvResultId | |||||
operatorPhone | |||||
operatorTransfer | |||||
operatorTransferSuccessful | |||||
phoneDialed | |||||
phonePosition | |||||
phoneNumber | |||||
priority | |||||
roundedIvrDuration | |||||
serviceId | |||||
serviceLevelThreshold | |||||
sessionId | |||||
smsCode | |||||
start | |||||
threadId | |||||
timestamp | |||||
toEmail | |||||
transactionId | |||||
transferHoldDuration | |||||
zipCode |
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 Parameter | Value | Type | Mandatory? | Description |
---|---|---|---|---|
count | n | Integer | No | 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:
Key | Type | Mandatory? | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
token | String | No | The | ||||||||||||||||||||||||||||||||||||||||
filter | Object | No | Filter criteria for the events
|
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
token | String | Yes | Marks a specific point in the event feed. Including this | ||||||||
events | Array | Yes | An array of events that have occurred since the
|
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": []
}
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"
}
]
}
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"
}
]
}
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."
}
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 Parameter | Value | Type | Mandatory? | Description |
---|---|---|---|---|
count | n | Integer | No | 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. |
Headers:
Header | Value | Mandatory? | Description |
---|---|---|---|
Accept-Encoding | gzip | No | If this header with the value gzip is provided, the served content is compressed. This header is optional. |
Accept | text/event-stream, application/json | Yes | Notice the two values for the header as we will use JSON to report validation/authorization errors. |
Body:
Key | Type | Mandatory? | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
token | String | No | The | ||||||||||||||||||||||||||||||||||||||||
filter | Object | No | Filter criteria for the events
|
Response Code: 200 OK
Headers:
Header | Value | Mandatory? | Description |
---|---|---|---|
Content-Type | text/event-stream | Yes | Simple 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.
Key | Type | Mandatory? | Description |
---|---|---|---|
data | String | Yes | 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
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
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 Element | Type | Mandatory? | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter | Object | No | 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.
|
Response Code: 200 OK
Body:
Key or Attribute | Type | Mandatory? | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stats | Array | Yes | An array of campaign statistics.
|
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
}
]
}
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 Element | Type | Mandatory? | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter | Object | No | Specifies the filter criteria
|
Response Code: 200 OK
Body:
Key or Attribute | Type | Mandatory? | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
agentAverages | Array | Yes | Provides summary of Agent averages for various Agent states.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
timeStamp | DateTime | Yes | Last 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"
}
Get Agent Statistics
Description: Returns Agent statistical information.
User Roles: Sysadmin, Superuser, or Manager
Method: POST /realtime/service/agent/stats
Parameters:
None
Body:
Key | Type | Mandatory? | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter | Object | No | Specifies the filter criteria.
|
Response Code: 200 OK
Body:
Key or Attribute | Type | Mandatory? | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
agentStatistics | Array | Yes | Provides statistical information of the agent.
|
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
}]}
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:
Key | Type | Mandatory? | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter | Object | No | 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.
|
Response Code: 200 OK
Body:
Key or Attribute | Type | Mandatory? | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
agentStatistics | Array | Yes | Provides statistical information of the agent.
|
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"
}
]}
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 | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stateChangedAfter | dateTime | No | Timestamp for state change. | ||||||||||||||||||||||||||||
filter | Object | No | Specifies the filter criteria.
|
Response Code: 200 OK
Body:
Key or Attribute | Type | Mandatory? | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
agentDetails | Array | Yes | Provides current status details of the agent.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
timeStamp | DateTime | Yes | Last 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
}
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 Element | Type | Mandatory? | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter | Object | No | Specifies the filter criteria
|
Response Code: 200 OK
Body:
Key or Element | Type | Mandatory? | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
callsDetails | Array | Yes | Provides details for calls on hold.
| ||||||||||||||||||||||||||||||||||||
timeStamp | DateTime | Yes | 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"
}
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 Element | Type | Mandatory? | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter | Object | No | Specifies the filter criteria
|
Response Code: 200 OK
Body:
Key or Element | Type | Mandatory? | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
liveConnects | Array | Yes | Provides summary of right party contacts.
|
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"
}
]
}
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:
Key | Type | Mandatory? | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter | Object | No | Specifies the filter criteria
|
Response Code: 200 OK
Body:
Key or Attribute | Type | Mandatory? | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stats | Array | Yes | Provide details for the Service
|
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"
}]}
Errors
For more information, see the Errors section on the REST APIs page.