This API enables you to control the agent states (applicable for offline agents only) within the account directly through your CRM system.
To use this API with the help of a token, follow these steps:
- Generate the Token: Use the 'Generate Token' API to obtain an authentication token.
- Enter the Token ID: Navigate to the right section of this page, under the 'AUTHORIZATION' tab. Here, input the generated token ID.
- With the token entered, pass the below header and body parameters:
Header parameters
Parameter | Description |
---|---|
Content-Type | application/json |
Body Params
{
"userName":"xxxxx",
"phoneName":"xxxx",
"state":"Pause / Ready",
"agentId":"xxxx",
"pauseReason":"xxxxx"
}
Parameter | Description |
---|---|
userName* | Your CloudAgent account username |
state* | Mention the agent state change - 'Ready', 'Pause' |
agentId* | The unique ID assigned to an agent |
pauseReason | The reason provided if the state is 'Pause' |
Note
- Parameters with ‘*’ are considered to be mandatory parameters.
- This API is applicable only in case of offline agents
Possible responses
Invalid apiKey | "status": "error" |
Empty apiKey | "status": "error" |
Invalid userName | "status": "error" |
Empty userName | "status": "error" |
Invalid state | "status": "error" |
Passing Invalid pauseReason Value. When the user passes State as Pause. | "status":"error", |
Changing the agent to 'Pause' / 'Ready" state when he is not logged in. | "status":"error", |
Changing the agent to Pause state when he is in ACW state. | "status":"error", |
Changing the agent to Pause state when he is in BUSY state. | "status":"error", |
Success response | "status": "success" |