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

Querying Queuing Information (queryQueueInfo)

Scenario

This interface is invoked to query queuing information for queuing notification on the customer side.

Queuing information can be used only after a connection is successfully established through the send interface.

Method

POST

URI

https://Domain name/apiaccess/ccmessaging/queryQueueInfo (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

ccmessaging-token

String

No

  • Value of token returned by the applyToken interface
  • Value of ccmessaging-token returned in the interface response header during a session

2

x-app-key

String

No

App key, which is the user ID and is configured on the API Fabric

3

Authorization

String

No

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

Table 2 Request body parameter

No.

Parameter

Type

Mandatory or Not

Description

1

reqBody

ReqBody

Yes

Request body

Table 3 ReqBody parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

userId

String

Yes

Unique customer ID. The value is a string of 1 to 32 characters.

1.2

channelConfigId

String

Yes

Channel configuration ID

1.3

channel

String

Yes

Channel type

Response Description

  • Status code: 200
    Table 4 RspMsg parameters

    No.

    Parameter

    Type

    Mandatory or Not

    Description

    1.1

    position

    Integer

    No

    Position of the current call in a queue

    1.2

    totalWaitTime

    Integer

    No

    Accumulated queuing duration of the current call, in seconds

    1.3

    currentDeviceWaitTime

    Integer

    No

    Actual waiting duration in the current queue, in seconds

    1.4

    configMaxcWaitTime

    Integer

    No

    Maximum waiting duration, in seconds

    1.5

    longestWaitTime

    Integer

    No

    Maximum queuing duration of a call in a queue, in seconds

    1.6

    estimateWaitTime

    Integer

    No

    Estimated waiting duration in the current queue, in seconds

    1.7

    resultCode

    String

    Yes

    Return code for the queuing information query. The options are as follows:

    0: The session is queuing. The query is successful.

    1: Incorrect parameters.

    2: The CCUCS request fails.

    3: Incorrect token.

    4: Unknown error.

    5: The session has ended.

    6: The CCUCS session has expired.

    160001: The CCUCS communication fails.

    160004: The session does not exist or has ended.

    160021: The session has been transferred to another agent and is not queuing.

    160022: The session has been transferred to an IVR and is not queuing.

    160023: The session has been transferred to the private queue and is not queuing.

    160024: The agent does not answer the session.

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

  • Scenario: Query queuing information.

    Request header:

    ccmessaging-token: xxxx
    x-app-key: xxxx
    Authorization: Bearer xxxx
    Content-Type: application/json

    Request parameters:

    {
        "userId": "xxxx",
        "channelConfigId": "xxxxx",
        "channel": "WEB"
    }

    Response parameters:

    {
        "totalWaitTime": 3,
        "resultCode": "0",
        "longestWaitTime": 3,
        "position": 1,
        "currentDeviceWaitTime": 3,
        "configMaxcWaitTime": 60,
        "estimateWaitTime": 60
    }