ChangeWorkMode

更新时间:
复制 MD 格式

You can invoke ChangeWorkMode to change the agent's work mode.

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

Instance ID.

ccc-test

UserId

string

No

Agent ID. If not specified, the agent mapped to the current Resource Access Management (RAM) user is used by default.

agent@ccc-test

DeviceId

string

No

Device ID, which is the identity ID of a browser-based Web Real-Time Communication (WebRTC) softphone or a physical phone device. Only one type of device can be registered at a time.

ACC-YUNBS-1.0.10-****

WorkMode

string

Yes

Work mode.

Valid values:

  • ON_SITE :

    On-site mode

  • OFF_SITE :

    Off-site mode

  • OFFICE_PHONE :

    Office phone mode

ON_SITE

SignedSkillGroupIdList

string

No

List of skill groups to sign in to. When changing the work mode to off-site mode, you can use this parameter to specify the list of skill groups that the off-site agent needs to sign in to.

["online-1@ccc-test","online-2@ccc-test","online-3@ccc-test","skg-default@ccc-test"]

Mobile

string

No

The agent's personal phone number, which is used in off-site mode. The agent can use this number to answer calls in off-site mode.

1382114****

Response elements

Element

Type

Description

Example

object

Code

string

Response code.

OK

HttpStatusCode

integer

HTTP status code.

200

Message

string

Response message.

RequestId

string

Request ID.

87731ED1-6224-48A5-99E3-6237FF9B1C00

Params

array

Response parameters.

string

Response parameters.

Data

object

Data.

Extension

string

Agent extension number.

8001****

WorkMode

string

Work mode.

Valid values:

  • ON_SITE :

    On-site mode

  • OFF_SITE :

    Off-site mode

  • OFFICE_PHONE :

    Office phone mode

ON_SITE

DeviceId

string

Device ID, which is the identity of a browser-based Web Real-Time Communication (WebRTC) softphone or a physical phone device. Only one type of device can be registered at a time.

ACC-YUNBS-1.0.10-****

JobId

string

Call ID. If this field has a value, the agent is currently in a call.

UserId

string

Agent ID.

agent@ccc-test

BreakCode

string

Break status code, which can be either System-defined or Custom-defined. System-defined break codes include: Warm-up (temporary break state after agent is published and before becoming idle), RingingTimeout (break caused by agent ringing timeout), and RejectCall (break caused by agent rejecting a call). There are no restrictions on Custom-defined status codes; customers can define them according to their business needs.

Valid values:

  • RingingTimeout :

    Break caused by agent ringing timeout

  • RejectCall :

    Break caused by agent rejecting a call

  • Warm-up :

    Temporary break state after agent is published and before becoming idle

Warm-up

InstanceId

string

Instance ID.

ccc-test

OutboundScenario

boolean

Indicates whether the agent has enabled outbound-only mode.

false

UserState

string

Agent status.

Valid values:

  • READY :

    Ready

  • WORKING :

    Post-processing

  • DIALING :

    Dialing

  • BREAK :

    Break

  • OFFLINE :

    Offline

  • TALKING :

    Talking

  • RINGING :

    Ringing

OFFLINE

SignedSkillGroupIdList

array

List of skill group IDs that the agent has signed into.

string

Skill group ID.

skillgroup@ccc-test

Examples

Success response

JSON format

{
  "Code": "OK",
  "HttpStatusCode": 200,
  "Message": "无",
  "RequestId": "87731ED1-6224-48A5-99E3-6237FF9B1C00",
  "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

400 Parameter.Enumeration The parameter %s must be one of the value of enumeration %s.
400 Parameter.Blank The parameter %s may not be null or blank.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.