Reroute an engagement
post
/engagement/api/agent/{fqSiteName}/v1/rerouteEngagement
This operation reroutes the engagement to the escalation queue defined by the site's rules.
The following is the list of exception codes that can be returned from this operation:
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.
- INVALID_FIELD - The engagement Id in the request is null.
- DEPENDENCY_APPLICATION_TIMEOUT - The defined period for retrieving data from a dependency application has expired.
Request
Supported Media Types
- application/json; charset=utf-8
Path Parameters
-
fqSiteName(required): string
The fully qualified site name.
Header Parameters
-
X-AID(required): string
A header element containing the agent account identifier.
-
X-JSESSIONID(required): string
A header element containing the unique session identifier returned in the create automated agent session call.
The object containing the request information.
Root Schema : com.rightnow.chat.rest.agent_api.model.requests.v1.RerouteEngagementRequest
Type:
Show Source
object-
engagementId(required):
integer(int64)
The unique identifier of the chat engagement.
-
sequenceNumber:
integer(int64)
The client application defined transaction sequence number.
-
timeCreated:
integer(int64)
The time the request was created in milliseconds.
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.RerouteEngagementResponse
Type:
Show Source
object-
clientId:
integer(int64)
The unique identifier of the agent client, created to identify the agent during this agent session.
-
clientIdString:
string
The unique identifier of the agent client in string format, created to identify the agent during this agent session.
-
clientSendTime:
integer(int64)
The time when the client request was received in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
engagementEscalated:
boolean
Indicates whether an engagement was escalated. If true, then the engagement was escalated. If false, then the engagement was not escalated.
-
sequenceNumber:
integer(int64)
The client application defined transaction sequence number.
-
sequenceNumberString:
string
The client application defined transaction sequence number as a string.
-
serviceFinishTime:
integer(int64)
The time when the chat server completed processing the client request in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
serviceStartTime:
integer(int64)
The time when the chat server began processing the client request in yyyy-MM-dd'T'HH:mm:ssXXX format.
-
sessionId:
string
The unique identifier of the agent session.
400 Response
The validation of the request object failed.
Root Schema : schema
Type:
object403 Response
The agent session identifier is unknown.
Root Schema : schema
Type:
object404 Response
The resource was not found.
Root Schema : schema
Type:
object500 Response
An error occurred in the chat server while processing the request.
Root Schema : schema
Type:
objectExamples
The following example shows how to reroute an engagement to the escalation queue defined by the sites rules.
cURL Command Example
curl -X POST https://chat_rest_server_domain.com/engagement/api/agent/day001_221100_sql_001h/v1/rerouteEngagement?pool=297:1 -H 'Content-Type: application/json; charset=UTF-8' -H 'X-JSESSIONID: node01h8m13tljpm7ns8nayp0pid91' -d ' -H 'X-AID: 12' {"timeCreated" :1612369971200, "sequenceNumber" : 9, "engagementId" : 538}'
Request Body Example
The following shows an example of the request body in JSON format.
{
"engagementId": 538,
"timeCreated": 1612369971200,
"sequenceNumber": 9
}
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.
{
"engagementEscalated": true,
"clientSendTime": 1612369971200,
"serviceStartTime": 1612369971322,
"serviceFinishTime": 1612370007647,
"sessionId": "node09bodalkwlfhb71560g0e0iqw0",
"clientId": 47,
"clientIdString": "47",
"sequenceNumber": 9,
"sequenceNumberString": "9"
}