Accept an engagement assignment
post
/engagement/api/agent/{fqSiteName}/v1/assignmentAcknowledgement
This operation is used by the agent to accept 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(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.AssignmentAcknowledgementRequest
Type:
Show Source
object-
action(required):
string
Allowed Values:
[ "NONE", "ACCEPT", "DECLINE", "UNAVAILABLE", "AVAILABLE" ]The assignment action. -
actionType(required):
string
Allowed Values:
[ "NONE", "MANUAL", "AUTO" ]The agent status. -
assignmentType(required):
string
Allowed Values:
[ "NONE", "CONFERENCE", "LEAD", "TRANSFER", "MONITOR" ]The assignment type. -
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.AssignmentAcknowledgementResponse
Type:
Show Source
object-
chatAssignmentAcknowledgementResult:
object com.rightnow.chat.rest.agent_api.model.responses.v1.results.ChatAssignmentAcknowledgementResult
-
chatSystemError:
object com.rightnow.chat.rest.agent_api.model.types.v1.ChatSystemError
-
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.
-
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.
Nested Schema : com.rightnow.chat.rest.agent_api.model.responses.v1.results.ChatAssignmentAcknowledgementResult
Type:
Show Source
object-
accountId(required):
integer(int64)
The account identifier.
-
accountIdString(required):
string
The account identifier as a string.
-
action(required):
string
Allowed Values:
[ "NONE", "ACCEPT", "DECLINE", "UNAVAILABLE", "AVAILABLE" ]The agent status. -
clientList:
array clientList
The list of client information objects.
-
engagementId(required):
integer(int64)
The unique identifier of the chat engagement.
-
engagementIdString(required):
string
The engagement identifier as a string.
Nested Schema : com.rightnow.chat.rest.agent_api.model.types.v1.ChatSystemError
Type:
Show Source
object-
errorCondition:
string
The error condition.
-
text:
string
The error text.
-
type:
string
The error type.
Nested Schema : com.rightnow.chat.rest.agent_api.model.types.v1.ChatClientInfo
Type:
Show Source
object-
accountId(required):
integer(int64)
The account identifier.
-
accountIdString(required):
string
The account identifier as a string.
-
connectionState(required):
string
Allowed Values:
[ "NONE", "ABSENT", "ACTIVE", "DISCONNECTED" ]The connection state. -
id(required):
integer(int64)
The client identifier.
-
idString(required):
string
The client identifier as a string.
-
name(required):
string
The client name.
-
role(required):
string
Allowed Values:
[ "NONE", "END_USER", "CONFEREE", "LEAD", "MONITOR", "TRANSIENT" ]The client role. -
type(required):
string
Allowed Values:
[ "NONE", "ADMINISTRATOR", "AGENT", "END_USER", "SUPERVISOR", "UNKNOWN", "UNIVERSAL_QUEUE", "VIRTUAL_AGENT" ]The client type.
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 inform the chat server that the agent will accept or decline an engagement assignment.
cURL Command Example
curl -X POST https://chat_rest_server_domain.com/engagement/api/agent/day001_221100_sql_001h/v1/assignmentAcknowledgement?pool=297:1 -H 'Content-Type: application/json; charset=UTF-8' -H 'X-JSESSIONID: node01h8m13tljpm7ns8nayp0pid91' -d ' -H 'X-AID: 12' {"timeCreated" :1618317020415, "sequenceNumber" : 1, "action" : "ACCEPT", "assignmentType": "LEAD", "actionType": "MANUAL", "engagementId": 1000}'
Request Body Example
The following shows an example of the request body in JSON format.
{
"timeCreated" : 1618317020415,
"sequenceNumber" : 1,
"action" : "ACCEPT",
"assignmentType": "LEAD",
"actionType": "MANUAL",
"engagementId": 1000
}
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.
{
"chatAssignmentAcknowledgementResult": {
"clientList": [
{
"name": "John Doe",
"type": "END_USER",
"id": 940,
"idString": "940",
"connectionState": "ACTIVE",
"role": "END_USER",
"accountId": 0,
"accountIdString": "0"
},
{
"name": "Some Agent",
"type": "AGENT",
"id": 939,
"idString": "939",
"connectionState": "ACTIVE",
"role": "LEAD",
"accountId": 12,
"accountIdString": "12"
}
],
"engagementId": 1000,
"engagementIdString": "1000",
"action": "ACCEPT",
"accountId": 0,
"accountIdString": "0"
},
"chatSystemError": null,
"clientSendTime": 1618302560000,
"serviceStartTime": 1647960946752,
"serviceFinishTime": 1647960946946,
"sessionId": "node01h8m13tljpm7ns8nayp0pid91",
"clientId": 939,
"clientIdString": "939",
"sequenceNumber": 1,
"sequenceNumberString": "1"
}