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 NameVariable NameTypeMandatory?Description
correlationIdcorrelationIdStringYesUnique Identifier by Client
customerNumbercustomerNumberStringYesCustomer's phone number

  Body:

Key

Type

Mandatory?

Description

accountStringNo

Account number.

qualificationDataStringNoObject for the Call details.
callerIdStringYes

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.

dateDateTimeNo

The date and time of the callback.

timezoneStringNo

The timezone of the callback date, valid values are:

KeyDescription
ATAlaska Time
CTCentral Time
ETEastern Time
HIHawaiian
MTMountain Time
PTPacific Time
ALAtlantic Time
GUGuam Time

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
CODE

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 NameVariable NameTypeMandatory?Description
correlationIdcorrelationIdStringYesUnique Identifier by Client
dialedNumberdialedNumberStringNoNumber dialed by Customer
customerNumbercustomerNumberStringNoCustomer'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
CODE

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 NameVariable NameTypeMandatory?Description
serviceIdserviceIdIntegerYesService ID of the hold queue.

Body:

None

Response Code: 200 OK

Body:  

Key

Type

Mandatory?

Description
estimatedWaitTimeIntegerNoThe estimated wait time for a call in the queue in seconds.
callsInQueueIntegerNoTotal 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,
}
CODE

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 NameVariable NameTypeMandatory?Description
correlationIdcorrelationIdStringYesUnique Identifier by Client.
dialedNumberdialedNumberStringYesNumber dialed by Customer.
customerNumbercustomerNumberStringYesCustomer's phone number.

Body:

None

Response Code: 200 OK

Body:  

Key

Type

Mandatory?

Description

routeUidStringNoUnique routing ID.

routeDomain

String

No

Route Domain.

endPointUidStringNoAgent 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.

statusEnumYes

The status of the call in the queue, valid values are:

StatusDescription
IN_QUEUECall is waiting in the queue for an Agent.
NO_AGENTNo Agents are currently logged into the queue.
AGENT_RESERVEDAgent has been reserved and the call is being transferred.

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"
 }
CODE

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 NameVariable NameTypeMandatory?Description
correlationIdcorrelationIdStringYesUnique Identifier by Client.
dialedNumberdialedNumberStringYesNumber dialed by Customer.
customerNumbercustomerNumberStringYesCustomer's phone number.

Body:

Key

Type

Mandatory?

Description

accountStringNo

Account number.

qualificationDataStringNoJSON Object for the call details.
agentSkillStringNoAgent skill required to handle the call.
priorityIntegerNoPriority of the call.
reservationTimeIntegerNoAmount 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

routeUidStringNoUnique Routing ID.

routeDomain

String

No

The route domain of the call.

endPointUidStringNoAgent 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.

statusEnumYes

The status of the call in the queue, valid values are:

StatusDescription
IN_QUEUECall is waiting in the queue for an Agent.
NO_AGENTNo Agents are currently logged into the queue.
AGENT_RESERVEDAgent has been reserved and the call is being transferred.

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"
 }
CODE

Top of Page