Updated on 2023-12-19 GMT+08:00

Querying Details About Signed-in Agents in a Skill Queue

Description

This interface is invoked to return details about signed-in agents in a skill queue based on the skill queue ID.

Interface Method

The request method must be set to POST. This interface supports only the POST method.

Internal Encapsulation Interfaces

BMS interface: /ccbms/ws/monitor/agentstatusinfo

Request URL

https://ip:port/rest/cmsapp/v1/openapi/skill/agentbyconfigedskill

In a public cloud environment, ip indicates the IP address of the CC-CMS server, and port indicates the HTTPS port number of the CC-CMS server. Contact the administrator to obtain the values.In a non–public cloud environment where the NSLB service is configured, ip indicates the IP address of the NSLB server, and port indicates the HTTPS port number of the CC-CMS service mapped on the NSLB server.

Request Description

Table 1 Parameters in the request header

No.

Parameter

Value Type

Mandatory

Description

1

Content-Type

String

Yes

The value is fixed to application/json; charset=UTF-8.

2

Authorization

String

Yes

For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication.

Table 2 Parameters in the message body

No.

Parameter

Value Type

Mandatory

Description

1

ccId

Integer

Yes

ID of a call center.

The value ranges from 1 to 65535.

2

vdn

Integer

Yes

ID of a VDN.

The value ranges from 1 to 5000.

3

skillId

Integer

Yes

Skill queue ID.

The value ranges from 1 to 2000.

Response Message

Table 3 Parameters in the message body

No.

Parameter

Value Type

Description

1

resultCode

String

Query result. The options are as follows:

  • 0100000: success
  • Other values: failure
  • For details about the failure causes, see Error Code Reference.

2

resultDesc

Array

Object array in the returned result after a successful query.

For details about the parameters of this object, see Table 4.

Table 4 Parameters of resultDesc

No.

Parameter

Value Type

Description

2.1

workNo

Integer

Agent ID.

2.2

name

String

Agent name.

2.3

status

Integer

Agent status. For details, see Table 5.

2.4

ctiStatus

Integer

Platform agent status. For details, see CTI Platform Agent Status Code Reference.

2.5

groupId

Integer

Agent group ID.

2.6

mediaType

Integer

Agent media type. For details, see Table 1.

2.7

vdnId

Integer

ID of the VDN to which a call belongs.

2.8

phoneNumber

String

Agent phone number.

2.9

currentStateTime

Long

Duration of the current state, in seconds.

2.10

loginDate

Long

Sign-in time. The value is a timestamp in milliseconds.

Table 5 Agent status

Value

Description

0

Unknown. The value corresponds to status 9 on the CTI platform.

2

An exception occurs when the interface is invoked.

3

Showing busy. The value corresponds to status 7 on the CTI platform.

4

Idle. The value corresponds to status 1 on the CTI platform.

5

Wrap-up. The value corresponds to status 6 on the CTI platform.

7

Talking. The value corresponds to states 2, 3, 4, and 5 on the CTI platform.

8

Rest. The value corresponds to status 8 on the CTI platform.

Message Example

  • Request header
    Content-Type: application/json;charset=UTF-8
    Authorization: ******************
  • Request parameters
    {
        "queryParam":
        {
            "ccId":1, 
            "vdn":1,
            "skillId":1
        }
    }
  • Request parameters
    {
      "resultCode": "0100000",
      "resultDesc": [{
        "workNo": 20011,
        "name": "20011",
        "status": 4,
        "ctiStatus": 1,
        "groupId": 1,
        "mediaType": 1,
        "vdnId": 1,
        "phoneNumber": "70942",
        "currentStateTime": 1505,
        "loginDate": 1501125758000
      }]
    }