- DarkLight
Set Not Ready
- DarkLight
This API allows a user to change the state of an Agent to Not Ready. If the request to change an agent's state is successful, the response is sent as an event.
Pre-requisite
The agent must be in the LoggedIn state.
Sequence Diagram
Message Structure
Request Parameters | Value |
---|---|
channel | Amazon |
topic | Agent |
subtopic | SetNotReady |
source | <<app-name-broadcasting-this-message>> |
data | JSON Object |
Data Parameters
Parameters | Data Type | Description | Example Data |
---|---|---|---|
ReasonCodeId | String | Not-Ready reason code configured in Amazon Connect. | Not Ready |
Response Parameters | Value |
---|---|
channel | Amazon |
topic | Agent |
subtopic | SetAgentState |
message | JSON Object |
Message Parameters
Parameters | Data Type | Description | Example Data |
---|---|---|---|
rules | JSON Object | Button state rules. Refer Rules in Appendix. | NA |
data | JSON Object | User details of agent. Refer AgentInfo in Appendix. | NA |
event | String | Name of the event. | Not Ready |
source | String | Source of the message. | Event |
Possible Error Cases
Error Type | Error Message |
---|---|
UPDATE_AGENT_STATE_FAILED | Agent state change failed. |
AGENT_STATE_NOT_FOUND | Specified Agent State not found. |
Sample Request
{
"subtopic": "SetNotReady",
"channel": "Amazon",
"topic": "Agent",
"source": "myapp",
"data": {
"ReasonCodeId": "Not Ready"
}
}
Sample Response
{
"channel": "Amazon",
"topic": "Agent",
"subtopic": "SetAgentState",
"message": {
"rules": {
"ButtonStates": {
"items": {
"NotReady": "Enable",
"Ready": "Enable",
"make_call": "Enable",
"mute": "Enable",
"unmute": "Hide"
},
"count": 5
},
"ResponseActual": {
"agentStateARN": null,
"type": "not_routable",
"name": "Not Ready Break",
"startTimestamp": "2020-04-09T13:31:21.183Z"
}
},
"data": {
"muted": false,
"name": "Agent 1",
"extension": "",
"loginName": "agent1",
"softphoneEnabled": true,
"state": "Not_Ready",
"reasonCode": {
"id": "Not Ready Break"
},
"stateChangeTime": "2020-04-09T13:31:21.183Z",
"type": "not_routable"
},
"event": "Not Ready Break",
"source": "event"
}
}