PollUserStatus
Polls the status of a specified agent in a specified instance. It is typically called by the frontend agent workbench to synchronize agent statuses.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
ccc-test |
| UserId |
string |
No |
The agent ID. |
agent@ccc-test |
| DeviceId |
string |
No |
The device ID. This parameter is not used and can be set to any value. |
device |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The response code. |
OK |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Message |
string |
The response message. |
None |
| RequestId |
string |
The request ID. |
EEEE671A-3E24-4A04-81E6-6C4F5B39DF75 |
| Params |
array |
The list of response parameters. |
|
|
string |
The response parameter. |
None |
|
| Data |
object |
The data. |
|
| ContextId |
integer |
The system auto-incremented ID. You can ignore this field. |
103655 |
| CallContext |
object |
The call context. |
|
| CallType |
string |
The call type. Valid values:
|
OUTBOUND |
| InstanceId |
string |
The instance ID. |
ccc-test |
| JobId |
string |
The call ID. |
job-6538214103685**** |
| ChannelContexts |
array<object> |
The list of call channels. |
|
|
object |
The call channel. |
||
| Index |
integer |
The system auto-incremented ID. You can ignore this field. |
1 |
| ReleaseInitiator |
string |
The party that disconnected the call channel, indicating who initiated the disconnection. |
1390501**** |
| ChannelState |
string |
The state of the call channel. Valid values:
|
CREATED |
| Destination |
string |
The called party of the call channel. |
1390501**** |
| UserId |
string |
The ID of the agent associated with the call channel. This field is empty if the call channel belongs to a customer. |
agent@ccc-test |
| ChannelFlags |
string |
The flags of the call channel. Valid values:
|
MONITORING |
| SkillGroupId |
string |
The ID of the skill group associated with the call channel. In an inbound scenario, the associated skill group ID is determined by the skill group configured in the IVR transfer-to-agent module. In an outbound scenario, the associated skill group ID is the ID of the first skill group that the agent signed in to. |
skillgroup@ccc-test |
| Timestamp |
integer |
The timestamp of the last state change of the call channel. The value is a UNIX timestamp in milliseconds. |
1609138903315 |
| ReleaseReason |
string |
The disconnection reason of the call channel, indicating why the current call channel was disconnected. The value is a response code defined in the Session Initiation Protocol (SIP). Refer to the SIP protocol to analyze the disconnection reason. |
404 - No destination |
| CallType |
string |
The call type of the call channel. Valid values:
|
OUTBOUND |
| ChannelVariables |
string |
The attached data. |
123 |
| JobId |
string |
The call ID. |
job-6538214103685**** |
| ChannelId |
string |
The call channel ID. |
ch:user:1390501****->8032****:1609138902226:job-653821410368**** |
| UserExtension |
string |
The extension number of the agent associated with the call channel. |
8032**** |
| Originator |
string |
The calling party of the call channel. |
0830019**** |
| CallVariables |
string |
The attached data. This is custom data transmitted through SIP signaling. |
a=b;c=d |
| UserContext |
object |
The agent context. |
|
| Extension |
string |
The extension number of the agent. |
8032**** |
| Heartbeat |
integer |
The time when the last agent heartbeat was received. The value is a UNIX timestamp in milliseconds. |
1609136956378 |
| WorkMode |
string |
The work mode. Valid values:
|
ON_SITE |
| DeviceId |
string |
The device ID. This is the identifier of a browser WebRTC softphone or a physical phone device. Only one device can be registered at a time. |
ACC-YUNBS-1.0.10-**** |
| UserId |
string |
The agent ID. |
agent@ccc-test |
| Reserved |
integer |
The time when the agent was last reserved. A reservation indicates that an incoming call will be assigned to the agent soon. The value is a UNIX timestamp in milliseconds. |
1609136956378 |
| BreakCode |
string |
The break code. Break codes are divided into system-defined and custom codes. System-defined break codes include: Warm-up (a temporary break state after the agent goes online and before becoming idle), RingingTimeout (a break caused by an agent ringing timeout), and RejectCall (a break caused by an agent rejecting a call). There are no limits on custom break codes. You can define them based on your business needs. Valid values:
|
Warm-up |
| InstanceId |
string |
The instance ID. |
ccc-test |
| OutboundScenario |
boolean |
Indicates whether the agent is in outbound-only mode. |
false |
| Mobile |
string |
The personal phone number of the agent. |
1324730**** |
| JobId |
string |
The call ID. |
job-6538214103685**** |
| UserState |
string |
The agent state. Valid values:
|
BREAK |
| SignedSkillGroupIdList |
array |
The list of skill group IDs that the agent is signed in to. |
|
|
string |
The skill group ID. |
skillgroup1@ccc-test |
|
| ParallelJobList |
array<object> |
The chat sessions that the agent is currently handling or has handled. |
|
|
object |
|||
| JobId |
string |
The session ID. |
job-6538214103685**** |
| Status |
string |
The state of the agent in the session. Valid values:
|
RINGING |
| Timestamp |
integer |
The time when the state changed. The time is a UNIX timestamp in milliseconds. |
1609136956378 |
| ChatContexts |
array<object> |
The session context. |
|
|
array<object> |
|||
| InstanceId |
string |
The instance ID. |
ccc-test |
| JobId |
string |
The job ID. |
chat-65382141036853491 |
| ChatType |
string |
The session type. |
INBOUND |
| CallVariables |
string |
The attached data. |
None |
| Members |
array<object> |
The information about the agents and customers participating in the chat session. |
|
|
object |
|||
| Index |
integer |
The system auto-incremented ID. You can ignore this field. |
1 |
| UserId |
string |
The agent ID. |
agent@ccc-test |
| UserType |
string |
The user type. Valid values:
|
Manager |
| Status |
string |
The state of the agent in the session. Valid values:
|
RINGING |
| SkillGroupId |
string |
The skill group ID. |
a527a80a-75cf-448f-aba0-fca37c61946d |
| ReleaseInitiator |
string |
The party that disconnected the call. |
User |
| ReleaseReason |
string |
The disconnection reason of the call channel, indicating why the current call channel was disconnected. The value is a response code defined in the Session Initiation Protocol (SIP). Refer to the SIP protocol to analyze the disconnection reason. |
None |
Examples
Success response
JSON format
{
"Code": "OK",
"HttpStatusCode": 200,
"Message": "无",
"RequestId": "EEEE671A-3E24-4A04-81E6-6C4F5B39DF75",
"Params": [
"无"
],
"Data": {
"ContextId": 103655,
"CallContext": {
"CallType": "OUTBOUND",
"InstanceId": "ccc-test",
"JobId": "job-6538214103685****",
"ChannelContexts": [
{
"Index": 1,
"ReleaseInitiator": "1390501****",
"ChannelState": "CREATED",
"Destination": "1390501****",
"UserId": "agent@ccc-test",
"ChannelFlags": "MONITORING",
"SkillGroupId": "skillgroup@ccc-test",
"Timestamp": 1609138903315,
"ReleaseReason": "404 - No destination",
"CallType": "OUTBOUND",
"ChannelVariables": "123",
"JobId": "job-6538214103685****",
"ChannelId": "ch:user:1390501****->8032****:1609138902226:job-653821410368****",
"UserExtension": "8032****",
"Originator": "0830019****"
}
],
"CallVariables": "a=b;c=d"
},
"UserContext": {
"Extension": "8032****",
"Heartbeat": 1609136956378,
"WorkMode": "ON_SITE",
"DeviceId": "ACC-YUNBS-1.0.10-****",
"UserId": "agent@ccc-test",
"Reserved": 1609136956378,
"BreakCode": "Warm-up",
"InstanceId": "ccc-test",
"OutboundScenario": false,
"Mobile": "1324730****",
"JobId": "job-6538214103685****",
"UserState": "BREAK",
"SignedSkillGroupIdList": [
"skillgroup1@ccc-test"
],
"ParallelJobList": [
{
"JobId": "job-6538214103685****\n",
"Status": "RINGING",
"Timestamp": 1609136956378
}
]
},
"ChatContexts": [
{
"InstanceId": "ccc-test",
"JobId": "chat-65382141036853491\n",
"ChatType": "INBOUND",
"CallVariables": "无",
"Members": [
{
"Index": 1,
"UserId": "agent@ccc-test\n",
"UserType": "Manager",
"Status": "RINGING",
"SkillGroupId": "a527a80a-75cf-448f-aba0-fca37c61946d",
"ReleaseInitiator": "User",
"ReleaseReason": "无"
}
]
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Parameter.Blank | The parameter %s may not be null or blank. | The parameter cannot be null or a string that contains whitespace characters. |
| 404 | NotExists.InstanceId | The specified instance %s does not exist. | The specified call center instance does not exist. |
| 404 | NotExists.UserId | The user %s does not exist in instance %s. | The specified user does not exist in the Cloud Contact Center instance. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.