Get queue statistics

get

/engagement/api/consumer/{fqSiteName}/v1/getQueueStats

This operation is used to retrieve the statistics of the engagement queue. A URL encoded JSON object must be passed in the 'request' query parameter for this request. This JSON object can contain the following fields:

  • chatProactiveAvailableType(string): The proactive available type for the specified queue. If the value is set to 'AGENTS', the response will include the number of agents who are available, have requested a chat engagement, and have connectivity status as active when servicing the specified queue. If the value is set to 'SESSIONS', the response will include the number of available agents who have connectivity status as active when servicing the specified queue but who may or may not have requested a chat engagement.
  • queueId(integer): The unique identifier of the queue.

An example of the JSON object before encoding is as follows:

{
"queueId":1,
"chatProactiveAvailableType":"AGENTS"
}

The URL encoded value for the JSON object is as follows:

%7B%0D%0A%09%22queueId%22%3A+1%2C%0D%0A%09%22chatProactiveAvailableType%22%3A+%22AGENTS%22%0D%0A%7D

Note: This operation is intended to retrieve statistics for a queue so that it can be used as a decision point for adding the user into the queue. Unlike many other Consumer Interactions operations, this operation does not require 'SessionId' to be specified as a header parameter in the request.

Request

Supported Media Types
Path Parameters
Query Parameters
  • The pool ID specified in the Establish Sessions response or provided in an RNEngagementConfigurationChangedMessage system message.
  • The URL encoded JSON object.
Back to Top

Response

Supported Media Types

200 Response

The request completed successfully.
Body ()
Root Schema : com.rightnow.chat.rest.consumer_api.model.responses.v1.GetQueueStatisticsResponse
Type: object
Show Source

400 Response

The validation of the request URL query parameter failed.
Body ()
Root Schema : schema
Type: object

404 Response

The resource was not found.
Body ()
Root Schema : schema
Type: object

500 Response

An error occurred in the chat server while processing the request.
Body ()
Root Schema : schema
Type: object
Back to Top

Examples

The following example shows how to retrieve engagement queue statistics by submitting a GET request using cURL:

cURL Command Example

curl -X GET https://chat_rest_server_domain.com/engagement/api/consumer/day119_181100_sql_238h/v1/getQueueStats?request=%7B%0D%0A%09%22queueId%22%3A+1%2C%0D%0A%09%22chatProactiveAvailableType%22%3A+%22AGENTS%22%0D%0A%7D -H 'Content-Type: application/json; charset=UTF-8'

Response Header Example

The following shows an example of the response header.

Status: 200 OK
Content-Type: application/json;charset=utf-8

Response Body Example

The following shows an example of the response body in JSON format.

{
    "queueId": 1,
    "queueIdString": "1",
    "expectedWaitSeconds": 0,
    "expectedWaitSecondsString": "0",
    "availableAgentSessions": 5,
    "serviceStartTime": "2019-01-30T07:19:14.453Z",
    "serviceFinishTime": "2019-01-30T07:19:14.455Z"
}
Back to Top