Request an engagement assignment
post
/engagement/api/agent/{fqSiteName}/v1/requestAssignment
This operation is used by the agent to request an engagement assignment.
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.
Request
Supported Media Types
- application/json; charset=utf-8
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.
The object containing the request information.
Root Schema : com.rightnow.chat.rest.agent_api.model.requests.v1.RequestAssignmentRequest
Type:
Show Source
object
-
assignmentRequested:
boolean
Indicates whether an engagement assignment is requested. If true, then the engagement assignment is requested.
-
idleSessionCount:
integer(int32)
The number of idle engagement sessions associated with the agent's session.
-
maxSessionCount:
integer(int32)
The maximum number of engagement sessions allowed in the agent's session.
-
sequenceNumber(optional):
integer(int64)
The client application defined transaction sequence number.
-
timeCreated(optional):
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.RequestAssignmentResponse
Type:
Show Source
object
-
chatRequestAssignmentResult(optional):
object com.rightnow.chat.rest.agent_api.model.responses.v1.results.ChatRequestAssignmentResult
-
chatSystemError(optional):
object com.rightnow.chat.rest.agent_api.model.types.v1.ChatSystemError
-
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.
-
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.
Nested Schema : com.rightnow.chat.rest.agent_api.model.responses.v1.results.ChatRequestAssignmentResult
Type:
Show Source
object
-
assignmentMade:
boolean
True if the assignment was made successfully.
Nested Schema : com.rightnow.chat.rest.agent_api.model.types.v1.ChatSystemError
Type:
Show Source
object
-
errorCondition(optional):
string
The error condition.
-
text(optional):
string
The error text.
-
type(optional):
string
The error type.
400 Response
The validation of the request object failed.
Root Schema : schema
Type:
object
403 Response
The agent session identifier is unknown.
Root Schema : schema
Type:
object
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 have an agent request an engagement to be assigned by the chat server.
cURL Command Example
curl -X POST https://chat_rest_server_domain.com/engagement/api/agent/day001_221100_sql_001h/v1/requestAssignment?pool=297:1 -H 'Content-Type: application/json; charset=UTF-8' -H 'X-JSESSIONID: node01h8m13tljpm7ns8nayp0pid91' -d ' -H 'X-AID: 12' {"timeCreated" :1621872165581, "sequenceNumber" : 7, "assignmentRequested" : true, "idleSessionCount": 0, "maxSessionCount": 3}'
Request Body Example
The following shows an example of the request body in JSON format.
{ "timeCreated" : 1621872165581, "sequenceNumber" : 7, "assignmentRequested" : true, "idleSessionCount": 0, "maxSessionCount": 3 }
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.
{ "chatRequestAssignmentResult": { "assignmentMade": false }, "chatSystemError": null, "clientSendTime": 1621872165581, "serviceStartTime": 1648136115031, "serviceFinishTime": 1648136115059, "sessionId": "node01j9pve9wgs1s2d5yd93qqs6nw0", "clientId": 47, "clientIdString": "47", "sequenceNumber": 7, "sequenceNumberString": "7" }