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

Querying Statistics Details of Skill Queues in Batches

Description

This interface is invoked to query statistics details of skill queues in batches.

  • To invoke this interface in the integration environment, set ccId of the call center to 1.

Interface Method

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

Internal Encapsulation Interfaces

BMS interfaces:

  • /ccbms/ws/monitor/querycurrentcallstatinfo
  • /ccbms/ws/monitor/queryStatInfoOfEverySkill

Request URL

https://ip:port/rest/cmsapp/v1/openapi/realindex/skill/stateinfo

In the URL, 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

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.

  • Message header

    Content-Type:application/json; charset=UTF-8

  • Message body
    The following provides an example of the request message body of this interface:
    {
        "queryParam":
        {
            "ccId":1, 
            "vdn":1, 
            "skillIds":[1,2]
        }
    }

    Table 2 describes the parameters in the request message body of this interface.

    Table 2 Parameters in the request message body

    Parameter

    Type

    Mandatory

    Description

    ccId

    Integer

    Yes

    ID of a call center.

    The value ranges from 1 to 65535.

    vdn

    Integer

    Yes

    ID of a VDN.

    The value ranges from 1 to 5000.

    skillIds

    Array

    Yes

    Object array of skill queue ID information. The array cannot exceed 1000 characters.

Response Message

The following provides an example of the response message body of this interface:

{ 
    "result": "0",
    "resultDatas":[{
        "skillId":1,
        "agentLoginNums":1,
        "agentTalkingNums":0,
        "agentIdleNums":0,
        "agentAvailableNums":0,
        "agentSetbusyNums":1,
        "agentRestNums":0,
        "agentMaxIdleTimeIn5":0,
        "agentWorkNums":0,
        "agentStudyNums":0,
        "agentOccupyNums":0,
        "agentPreOccupyNums":0,
        "totalCallNums":0,
        "processingCallNums":0,
        "maxCallWaitTimesIn5":0,
        "callWaitNums":0,
        "evenCallTimeIn5":0,
        "evenWaitTimeIn5":0},
        {
        "skillId":2,
        "agentLoginNums":0,
        "agentTalkingNums":0,
        "agentIdleNums":0,
        "agentAvailableNums":0,
        "agentSetbusyNums":0,
        "agentRestNums":0,
        "agentMaxIdleTimeIn5":0,
        "agentWorkNums":0,
        "agentStudyNums":0,
        "agentOccupyNums":0,
        "agentPreOccupyNums":0,
        "totalCallNums":0,
        "processingCallNums":0,
        "maxCallWaitTimesIn5":0,
        "callWaitNums":0,
        "evenCallTimeIn5":0,
        "evenWaitTimeIn5":0}
    ] 
}

Table 3 describes the parameters in the response message body of this interface.

Table 3 Parameters in the response message body

Parameter

Type

Description

result

String

Query result. The options are as follows:

  • 0: success
  • Other values: failure

For details about the failure causes, see Error Code Reference.

resultDatas

Array

Object array in the returned result after a successful query.

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

Table 4 Parameters of resultDatas

Parameter

Type

Description

skillId

Integer

Skill queue ID.

agentLoginNums

Integer

Number of sign-in agents.

agentTalkingNums

Integer

Number of agents in talking state.

agentIdleNums

Integer

Number of idle agents.

agentAvailableNums

Integer

Number of available agents. The value may be different from the number of idle agents when an agent can have one-to-many conversations.

agentSetbusyNums

Integer

Number of agents in busy state.

agentRestNums

Integer

Number of agents in rest state.

agentMaxIdleTimeIn5

Integer

Maximum idle duration of agents in 5 minutes.

agentWorkNums

Integer

Number of agents in wrap-up state.

agentStudyNums

Integer

Number of agents in learning state.

agentOccupyNums

Integer

Number of agents in occupied state.

agentPreOccupyNums

Integer

Number of preoccupied agents.

totalCallNums

Integer

Total number of processed calls, including the calls that are being processed.

processingCallNums

Integer

Number of calls that are being processed.

maxCallWaitTimesIn5

Integer

Maximum time that a call can wait in 5 minutes.

callWaitNums

Integer

Number of queuing calls (number of calls that are waiting).

evenCallTimeIn5

Integer

Average call duration in 5 minutes.

evenWaitTimeIn5

Integer

Average call waiting duration in 5 minutes.