Updated on 2023-09-27 GMT+08:00

Creating a Skill Queue (createSkill)

Scenario

Create a single skill queue.

Method

POST

URI

https://Domain name/apiaccess/rest/cc-management/v1/skill/createSkill. For example, the domain name is service.besclouds.com.

Request Description

Table 1 Request header parameters

No.

Name

Type

Mandatory or Not

Description

1

X-APP-KEY

String

No

App key field, which is the user ID. Contact the operation personnel to obtain the app key.

2

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

Table 2 Request body parameters

No.

Name

Type

Mandatory or Not

Description

1.1

mediaTypeId

Number

Yes

Media type. The options are as follows:

5: voice

53: multimedia

19: video

2: voice click-to-dial

18: video click-to-dial

1.2

description

String

Yes

Skill short name or description. The value can contain a maximum of 50 characters, including Chinese characters, letters, and digits.

1.3

name

String

Yes

Name of a skill queue. The value contains a maximum of 20 characters.

The following special characters are not allowed:

[ `~!#$%^&*()+=|{}':;',<>/?~#%……&*+|{}]|\n|\r|\t

1.4

maxWaitTime

Number

Yes

Maximum queuing duration, in seconds. The maximum value is 60000.

1.5

maxWaitNum

Number

Yes

Maximum number of users waiting in a queue. The maximum value is 10000.

1.6

maxAgentWrapupTime

Number

Yes

Duration of the wrap-up state, in seconds. The maximum value is 3600.

1.7

skillParam

Object

Yes

Skill queue parameter information. When mediaTypeId is 53, 2, or 18, only noAgents, busy, and timeOut are available. When mediaTypeId is 53, deviceType must be set to 1. When mediaTypeId is 5 or 19, noAgents, busy, timeOut, answerFunction, and waitVoice are mandatory.

1.7.1

noAgents

Object

Yes

Configuration when no agent is on-duty.

1.7.1.1

deviceType

String

No

Device type.

3: IVR

1: skill queue

1.7.1.2

transferType

String

Yes

Processing policy.

Release: If this value is used, leave other parameters at the same level empty.

Transfer: If this value is used, other parameters at the same level are mandatory.

1.7.1.3

value

Number

No

For a skill queue, the value is the skill queue ID (skillId). For an IVR flow, the value is the IVR flow ID.

1.7.2

busy

Object

Yes

Configuration when the queue is busy or overflows.

1.7.2.1

deviceType

String

No

Device type.

3: IVR

1: skill queue

1.7.2.2

transferType

String

Yes

Processing policy.

Release: If this value is used, leave other parameters at the same level empty.

Transfer: If this value is used, other parameters at the same level are mandatory.

1.7.2.3

value

Number

No

For a skill queue, the value is the skill queue ID (skillId). For an IVR flow, the value is the IVR flow ID.

1.7.3

answerFunction

String

No

Agent answering mode. The options are 0 (reporting the agent ID) and 2 (reporting no voice).

1.7.4

timeOut

Object

Yes

Queuing timeout configuration.

1.7.4.1

deviceType

String

No

Device type.

3: IVR

1: skill queue

1.7.4.2

transferType

String

Yes

Processing policy.

Release: If this value is used, leave other parameters at the same level empty.

Transfer: If this value is used, other parameters at the same level are mandatory.

1.7.4.3

value

Number

No

For a skill queue, the value is the skill queue ID (skillId). For an IVR flow, the value is the IVR flow ID.

1.7.5

waitVoice

Object

No

Queuing configuration.

1.7.5.1

parameterType

String

Yes

Parameter type.

  • Voice: default waiting tone. If this value is used, leave other parameters at the same level empty.
  • IVR: If this value is used, other parameters at the same level are mandatory.

1.7.5.2

id

String

No

For an IVR flow, the value is the IVR flow ID.

Response Description

  • Status code: 200
    Table 3 Response body parameters

    No.

    Name

    Type

    Mandatory or Not

    Description

    1.1

    returnCode

    String

    Yes

    Operation result. The value 0 indicates success, and other values indicates failure.

    1.2

    description

    String

    No

    Description.

    1.3

    skillId

    String

    No

    Skill queue ID.

  • Status code: 401

    Authentication fails.

  • Status code: 404

    The requested resource does not exist.

  • Status code: 500

    An exception occurs on the server.

Error Codes

None

Example

Request header:

Content-Type:application/json
X-APP-KEY:XXXXXXXXXXXXXXXXXXXXXXX
Authorization:Bearer XXXXXXXXXXXXXXXXXXXXXXX
Request parameters:
{
    "mediaTypeId": 5,
    "description": "ccfdc",
    "name": "dddpodfst",
    "maxWaitTime": 30,
    "maxWaitNum": 100,
    "maxAgentWrapupTime": 5,
    "skillParam": {
                "noAgents": {
                    "deviceType": "1",
                    "transferType": "Transfer",
                    "value": 2
                },
                "busy": {
                    "deviceType": "1",
                    "transferType": "Transfer",
                    "value": 1
                },
                "answerFunction": "0",
                "timeOut": {
                    "deviceType": "1",
                    "transferType": "Transfer",
                    "value": 1
                },
                "waitVoice": {
                    "parameterType": "Voice"
                }
            }
}

Response parameters:

{
    "returnCode": "0",
    "skillId": "5",
    "description": "Create Skill successfully"
}