Download PDF
Download page Routing API Methods.
Routing API Methods
The Routing APIs provide the functionality for integrating 3rd party IVRs around routing calls. These include routing a call to an Agent, scheduling a callback, get the status of a route request, canceling a route request, and getting the stats about a hold queue.
Callback
Description: Used to schedule a callback.
User Roles: Sysadmin, Superuser, or Manager
Method: POST /callControl/routing/voice/route/callback?correlationId={correlationId}&customerNumber={customerNumber}
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
correlationId | correlationId | String | Yes | Unique Identifier by Client |
customerNumber | customerNumber | String | Yes | Customer's phone number |
Body:
Key | Type | Mandatory? | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
account | String | No | Account number. | ||||||||||||||||||
qualificationData | String | No | Object for the Call details. | ||||||||||||||||||
callerId | String | Yes | Caller ID. Note: The included callerId needs to match to an inbound LiveVox service as that is the service the call will be dropped into. | ||||||||||||||||||
date | DateTime | No | The date and time of the callback. | ||||||||||||||||||
timezone | String | No | The timezone of the callback date, valid values are:
|
Response Code: 204 No Content
Body:
None
Schedule a Callback
#Request (JSON)
POST /callControl/supervisor/routing/callback?correlationId=55411121qET5&customerNumber=6178498812
Content-Type: application/json
Host: localhost.com
{
"account": " Ambysch123",
"qualificationData": " any data 2",
"callerId": "4156926957",
"date": "1407398400000",
"timeZone": "CT"
}
#Response
204 No Content
Cancel Route
Description: Used to cancel a previous route request made in the Route to Agent API.
User Roles: Sysadmin, Superuser, or Manager
Method: DELETE /callControl/routing/voice/route?correlationId={correlationId}&dialedNumber={dialedNumber}[&customerNumber={customerNumber}]
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
correlationId | correlationId | String | Yes | Unique Identifier by Client |
dialedNumber | dialedNumber | String | No | Number dialed by Customer |
customerNumber | customerNumber | String | No | Customer's phone number |
Body:
None
Response Code: 204 No Content
Body:
None
Cancel Route Request
#Request
DELETE /callControl/routing/voice/route?correlationId=a1126512007&dialedNumber=4156926957&customerNumber=6178498812
Host: localhost.com
#Response
204 No Content
Get Hold Queue Status
Description: Used to return the stats for a hold queue.
User Roles: Sysadmin, Superuser, or Manager
Method: GET /callControl/routing/call/queue/stats?serviceId={serviceId}
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
serviceId | serviceId | Integer | Yes | Service ID of the hold queue. |
Body:
None
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description |
---|---|---|---|
estimatedWaitTime | Integer | No | The estimated wait time for a call in the queue in seconds. |
callsInQueue | Integer | No | Total number of calls in the queue. |
Get Hold Queue Stats
#Request (JSON)
GET /callControl/routing/call/queue/stats?serviceId=11237
Host: localhost.com
Accept: application/json
#Response
200 OK
Content-Type: application/json
{
"estimatedWaitTime":2400,
"callsInQueue":4,
}
Get Route Status
Description: Used to return the current status of a call in the queue.
User Roles: Sysadmin, Superuser, or Manager
Method: GET /callControl/routing/voice/route/status?correlationId={correlationId}&dialedNumber={dialedNumber}[&customerNumber={customerNumber}]
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
correlationId | correlationId | String | Yes | Unique Identifier by Client. |
dialedNumber | dialedNumber | String | Yes | Number dialed by Customer. |
customerNumber | customerNumber | String | Yes | Customer's phone number. |
Body:
None
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
routeUid | String | No | Unique routing ID. | ||||||||
routeDomain | String | No | Route Domain. | ||||||||
endPointUid | String | No | Agent session ID or Agent ID. | ||||||||
estimatedWaitTime | Integer | No | Wait time in queue. | ||||||||
positionInQueue | Integer | No | The current position of the call in the queue. | ||||||||
queueSize | Integer | No | Total calls in the Queue. | ||||||||
maxAgents | Integer | No | Current number of agents logged into the associated resource group. | ||||||||
status | Enum | Yes | The status of the call in the queue, valid values are:
|
Get the Status of a Route Request
#Request (JSON)
GET /callControl/routing/voice/route?correlationId=a1126512007&dialedNumber=4156926957&customerNumber=6178498812
Host: localhost.com
Accept: application/json
#Response
200 OK
Content-Type: application/json
{
"routeUid": "lv-2126705544",
"estimatedWaitTime":2400,
"positionInQueue":4,
"queueSize":4,
"maxAgents":1
"status":"NO_AGENT"
}
Route To Agent
Description: Used to route a call to a queue of Agents, however a specific Agent can’t be chosen.
User Roles: Sysadmin, Superuser, or Manager
Method: PUT /callControl/routing/voice/route?correlationId={correlationId}&dialedNumber={dialedNumber}&customerNumber={customerNumber}
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
correlationId | correlationId | String | Yes | Unique Identifier by Client. |
dialedNumber | dialedNumber | String | Yes | Number dialed by Customer. |
customerNumber | customerNumber | String | Yes | Customer's phone number. |
Body:
Key | Type | Mandatory? | Description |
---|---|---|---|
account | String | No | Account number. |
qualificationData | String | No | JSON Object for the call details. |
agentSkill | String | No | Agent skill required to handle the call. |
priority | Integer | No | Priority of the call. |
reservationTime | Integer | No | Amount of time Agent will be reserved before being put back into 'Ready' if the call doesn't arrive. |
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
routeUid | String | No | Unique Routing ID. | ||||||||
routeDomain | String | No | The route domain of the call. | ||||||||
endPointUid | String | No | Agent Session ID or Agent ID. | ||||||||
estimatedWaitTime | Integer | No | Wait time in Queue. | ||||||||
positionInQueue | Integer | No | The current position of the call in the queue. | ||||||||
queueSize | Integer | No | Total number of calls in the queue. | ||||||||
maxAgents | Integer | No | Current number of agents logged into the associated resource group that can accept the call. | ||||||||
status | Enum | Yes | The status of the call in the queue, valid values are:
|
Route to Agent
#Request (JSON)
PUT /callControl/routing/voice/route?correlationId=a1126512007&dialedNumber=4156926957&customerNumber=6178498812
Content-Type: application/json
Host: localhost.com
{
"account":"098981213",
"qualificationData":"Test Data",
"agentSkill": "English",
"priority": "10"
}
#Response
200 OK
Content-Type: application/json
{
"routeUid": "lv-2126705544",
"estimatedWaitTime":0,
"positionInQueue":3,
"queueSize":3,
"maxAgents":2,
"status":"NO_AGENT"
}