Updated on 2025-11-13 GMT+08:00

Querying the Statistics About a Set of Skill Queues

Prerequisites

  • The agent has signed in.

Description

This interface is used to query the statistics about a set of skill queues after an agent has signed in.

Interface Method

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

URI

https://IP address:Port number/agentgateway/resource/queuedevice/{agentid}/queryacdstat

If the CC-Gateway is deployed in single-node mode, set IP address to the CC-Gateway server address and Port number to the HTTPS port number of the CC-Gateway server (the default value is 8043). If the CC-Gateway is deployed in cluster mode, set IP address to the NSLB address and Port number to the default value 8043.

For the CC-Gateway port number on the NSLB, log in to any NSLB node as the nslb user and run the ./nslbctl l command to query the port number. In the query result, the following port is opened by the CC-Gateway to third-party systems through the NSLB.

In the SaaS scenario, contact O&M personnel to obtain the values of IP address and Port number.

Table 1 Parameter in the URI

No.

Parameter

Value Type

Mandatory (Yes/No)

Description

1

agentid

String

Yes

Agent ID. The value ranges from 101 to 999999.

Method Name in Logs

queryStatInfoOfAcd

Request Description

  • Message header
    Table 2 Parameters in the request message header

    No.

    Parameter

    Value Type

    Mandatory (Yes/No)

    Description

    1

    Content-Type

    String

    Yes

    Coding mode of the message body. The default value is application/json; charset=UTF-8.

    2

    Guid

    String

    Yes

    GUID returned by the sign-in interface during static authentication (AUTHMODE is set to 1) or GUID returned by the polling event query interface during dynamic authentication (AUTHMODE is set to 2).

  • Message body
    Table 3 Parameter in the message body

    No.

    Parameter

    Value Type

    Mandatory (Yes/No)

    Description

    1

    skills

    List

    Yes

    Indicates a list of skill queue IDs. The maximum array size is 100.

Response Description

Table 4 Parameters in the message body

No.

Parameter

Value Type

Description

1

message

String

Description.

2

retcode

String

Error code. The options are as follows:

0: success

Other values: failure

3

result

Array

Indicates the return result of a successful query, that is, skill queue statistics.

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

Table 5 Parameter description of result

No.

Parameter

Value Type

Description

4.1

pilotNbr

String

The pilot number of ACD group (It means accesscode.)

4.2

deviceNo

Integer

Skill queue ID.

4.3

queueSize

Integer

The number of calls in waiting queue

4.4

queueTime

Long

The maximum duration of call in waiting queue (second)

4.5

loadFactor

Integer

It is not used.

4.6

estWaitTime

Long

It is not used.

4.7

loggedOnAgents

Integer

Number of agents signing in to this ACD group.

4.8

availAgents

Integer

The number of available agents in this ACD group

4.9

transferFlg

Integer

Transfer flag (0: release; 2: transfer)

4.10

transferDeviceType

Integer

Device type. For details, see Device Type.

4.11

transferDeviceNo

Integer

Device number

4.12

skillDescrip

String

Skill description.

4.13

resourceIdleRate

Integer

It is not used.

4.14

serviceLevel

Integer

It is not used.

4.15

oldCallIdEx

Object

The call ID information object of waiting maximum duration.

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

4.16

maxQueueSize

Integer

The max number of calls in the queue

Table 6 Parameter description of oldCallIdEx

No.

Parameter

Value Type

Description

4.15.1

dateTime

Date

The time of call entering

4.15.2

dsn

Integer

The task number of call entering

4.15.3

server

Integer

Unique server identifier.

4.15.4

handle

Integer

The number of times that a call enters a task.

The method of converting oldCallIdEx to callId:

StringBuilder buffer = new StringBuilder(24);

buffer.append(dateTime);

buffer.append('-');

long identify = ((long) server << 24) + ((long) handle << 16) + dsn;

buffer.append(identify);

Triggered Event

  • None

Error Code

  • 000-002
  • 100-006
  • 100-007

Example

  • Message header
    Content-Type:application/json; charset=UTF-8
    Guid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.AgentGateway1
  • Request parameter
    {
        "skills": [
            1,
            10
        ]
    }
  • Response parameter
    {
        "message": "",
        "retcode": "0",
        "result": [
            {
                "pilotNbr": "",
                "deviceNo": 1,
                "queueSize": 0,
                "queueTime": 0,
                "loadFactor": 65535,
                "estWaitTime": 0,
                "loggedOnAgents": 1,
                "availAgents": 1,
                "transferFlg": 0,
                "transferDeviceType": 255,
                "transferDeviceNo": 65535,
                "skillDescrip": "chat_madeqiang",
                "resourceIdleRate": 100,
                "serviceLevel": 100,
                "oldCallIdEx": {
                    "dateTime": 4294967295000,
                    "dsn": 65535,
                    "server": 255,
                    "handle": 255
                },
                "maxQueueSize": 100
            },
            {
                "pilotNbr": "1009",
                "deviceNo": 10,
                "queueSize": 0,
                "queueTime": 0,
                "loadFactor": 65535,
                "estWaitTime": 0,
                "loggedOnAgents": 2,
                "availAgents": 2,
                "transferFlg": 0,
                "transferDeviceType": 255,
                "transferDeviceNo": 65535,
                "skillDescrip": "chat_jinsitao",
                "resourceIdleRate": 100,
                "serviceLevel": 100,
                "oldCallIdEx": {
                    "dateTime": 4294967295000,
                    "dsn": 65535,
                    "server": 255,
                    "handle": 255
                },
                "maxQueueSize": 100
            }
        ]
    }