ResetAgentState

Updated at:

Resets the state of a specified agent in a specified instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

ccc-test

UserId

string

No

The agent ID. This parameter is optional. If you do not specify this parameter, the agent mapped to the current RAM user is used by default.

agent@ccc-test

DeviceId

string

No

The device ID. You can specify any value. This parameter has no special purpose or requirements.

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 error parameters.

["ParameterName"]

string

The parameter information.

None

Data

object

The agent state data.

Extension

string

The extension number of the agent.

8001****

WorkMode

string

The work mode.

Valid values:

  • ON_SITE :

    On-site mode.

  • OFF_SITE :

    Off-site mode.

  • OFFICE_PHONE :

    Office phone mode.

ON_SITE

DeviceId

string

The device ID, which identifies a browser WebRTC softphone or a physical phone device. Only one device can be registered at a time.

ACC-YUNBS-1.0.10-****

JobId

string

The call ID. If this field has a value, the agent is currently on a call.

None

UserId

string

The agent ID.

agent@ccc-test

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 a ring timeout), and RejectCall (a break caused by the agent rejecting a call). There are no limits on custom break codes. You can define them based on your business needs.

Valid values:

  • RingingTimeout :

    A break caused by a ring timeout.

  • RejectCall :

    A break caused by the agent rejecting a call.

  • Warm-up :

    A temporary break state after the agent goes online and before becoming idle.

Warm-up

InstanceId

string

The instance ID.

ccc-test

OutboundScenario

boolean

Indicates whether the agent has enabled the outbound-only mode.

false

UserState

string

The agent state.

Valid values:

  • READY :

    Ready.

  • WORKING :

    After-call work.

  • DIALING :

    Dialing.

  • BREAK :

    Break.

  • OFFLINE :

    Offline.

  • TALKING :

    Talking.

  • RINGING :

    Ringing.

OFFLINE

SignedSkillGroupIdList

array

The list of skill group IDs that the agent is signed in to.

string

The skill group ID.

skillgroup@ccc-test

Examples

Success response

JSON format

{
  "Code": "OK",
  "HttpStatusCode": 200,
  "Message": "无",
  "RequestId": "EEEE671A-3E24-4A04-81E6-6C4F5B39DF75",
  "Params": [
    "无"
  ],
  "Data": {
    "Extension": "8001****",
    "WorkMode": "ON_SITE",
    "DeviceId": "ACC-YUNBS-1.0.10-****",
    "JobId": "无",
    "UserId": "agent@ccc-test",
    "BreakCode": "Warm-up",
    "InstanceId": "ccc-test",
    "OutboundScenario": false,
    "UserState": "OFFLINE",
    "SignedSkillGroupIdList": [
      "skillgroup@ccc-test"
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

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.