Get reroute availability
get
/engagement/api/agent/{fqSiteName}/v1/rerouteAvailability
This operation gets the best guess reroute availability on the escalation queue defined by the site's rules.
Only the product and category of the engagement is passed to the backend to run the routing rules.
No Personally Identifiable Information (PII) of the customer is passed.
The JSON object passed as the URL parameter is defined as follows and must be URL encoded -
{"engagementId": 0}
The following is the list of exception codes that can be returned from this operation:
Only the product and category of the engagement is passed to the backend to run the routing rules.
No Personally Identifiable Information (PII) of the customer is passed.
The JSON object passed as the URL parameter is defined as follows and must be URL encoded -
{"engagementId": 0}
The following is the list of exception codes that can be returned from this operation:
- ACCESS_DENIED - Authentication failed.
- UNKNOWN_EXCEPTION - An unknown error has occurred.
- BAD_REQUEST - A field in the request is invalid.
- INTERNAL_SERVER_ERROR - An error occurred within the core server.
- ENGAGEMENT_ID_UNKNOWN - The engagement Id provided is invalid.
- DEPENDENCY_APPLICATION_TIMEOUT - The defined period for retrieving data from a dependency application has expired.
Request
Path Parameters
-
fqSiteName: string
The fully qualified site name.
Header Parameters
-
X-AID: string
A header element containing the agent account identifier.
-
X-JSESSIONID: string
A header element containing the unique session identifier returned in the create automated agent session call.
Response
Supported Media Types
- application/json; charset=utf-8
200 Response
The request completed successfully.
Root Schema : com.rightnow.chat.rest.agent_api.model.responses.v1.RerouteAvailabilityResponse
Type:
Show Source
object
-
availableAgentSessions(optional):
integer(int32)
The total number of sessions available across all agents.
-
clientId(optional):
integer(int64)
The unique identifier of the agent client, created to identify the agent during this agent session.
-
clientIdString(optional):
string
The unique identifier of the agent client in string format, created to identify the agent during this agent session.
-
clientSendTime(optional):
integer(int64)
The time when the client request was received in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
engagementsInQueue(optional):
integer(int32)
The number of engagements currently in the queue.
-
escalationQueueId(optional):
integer(int64)
The unique queue identifier to use if the engagement requires escalation.
-
escalationQueueIdString(optional):
string
The escalation queue identifier as a string.
-
expectedWaitSeconds(optional):
integer(int64)
The expected wait time in the queue, in seconds. The value is zero or greater than zero. The value is -1 if there's inadequate information.
-
expectedWaitSecondsString(optional):
string
Expected wait time in queue as a string.
-
outsideOperatingHours(optional):
boolean
Indicates whether the current time is outside operating hours. If true, the current time is outside operating hours
-
queueId(optional):
integer(int64)
The unique identifier of the engagement queue.
-
queueIdString(optional):
string
The unique identifier of the engagement queue as a string.
-
sequenceNumber(optional):
integer(int64)
The client application defined transaction sequence number.
-
sequenceNumberString(optional):
string
The client application defined transaction sequence number as a string.
-
serviceFinishTime(optional):
integer(int64)
The time when the chat server completed processing the client request in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
serviceStartTime(optional):
integer(int64)
The time when the chat server began processing the client request in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
sessionId(optional):
string
The unique identifier of the agent session.
-
totalAgentsRequestingNewEngagement(optional):
integer(int32)
The total number of agents who are available and have capacity.
-
totalAvailableAgents(optional):
integer(int32)
The total number of agents whose status is 'AVAILABLE'.
- totalUnavailableAgents(optional): integer(int32)
404 Response
The resource was not found.
Root Schema : schema
Type:
object
500 Response
An error occurred in the chat server while processing the request.
Root Schema : schema
Type:
object
Examples
The following example shows how to perform a best guess reroute availability check on the escalation queue defined by the site rules.
cURL Command Example
curl -X POST https://chat_rest_server_domain.com/engagement/api/agent/day001_221100_sql_001h/v1/rerouteAvailability?pool=297:1 -H 'Content-Type: application/json; charset=UTF-8' -H 'X-JSESSIONID: node01h8m13tljpm7ns8nayp0pid91' -d ' -H 'X-AID: 12' {"timeCreated" :1621872165581, "sequenceNumber" : 8, "engagementId" : 15}'
Request Body Example
The following shows an example of the request body in JSON format.
{ "engagementId": 15, "timeCreated": 1621872165581, "sequenceNumber": 8 }
Response Header Example
The following shows an example of the response header.
Status: 200 OK Content-Type: application/json;charset=utf-8
Response Body Example
The following shows an example of the response body in JSON format.
{ "queueId": 7, "queueIdString": "7", "expectedWaitSeconds": 0, "expectedWaitSecondsString": "0", "availableAgentSessions": 3, "totalAvailableAgents": 4, "totalUnavailableAgents": 2, "totalAgentsRequestingNewEngagement": 1, "outsideOperatingHours": false, "escalationQueueId": 19, "escalationQueueId String": "19", "engagementsInQueue": 0, "clientSendTime": 1621872165581, "serviceStartTime": 1648136115031, "serviceFinishTime": 1648136115059, "sessionId": "node01j9pve9wgs1s2d5yd93qqs6nw0", "clientId": 47, "clientIdString": "47", "sequenceNumber": 7, "sequenceNumberString": "7" }