In the 21.10 release, a new API call was introduced for presenting the estimated wait time until a chat waiting in queue would be assigned to an agent and/or department.

Parameter

Type

Required

Description

DepartmentID

numeric - ID code

No

The identifier of the department.

When not set, all queue' data is returned. Estimated Wait Time is fix 0.

When null value set, department less queue (account level) data is returned.\

Request format

curl "https://api.boldchat.com/aid/$accountID/data/rest/json/v1/getEstimatedWaitTime?auth=$authHash&DepartmentID=$DepartmentID"

Return values

Parameters are provided in alphabetic order. See Sample code for probable output.

Parameter

Type

Description

EstimatedWaitTime

integer

Estimated wait time for the requested queue in milliseconds.

When null DepartmentID requested, department less queue (account level) estimated wait time returned.

Without DepartmentID parameter it will be always 0.

QueueDepth

integer

Queue size for the requested queue.

Cumulated queue size value when DepartmentID is not provided.

Status

codes - set values

"Success" when the call completes; "Error" when the call fails.

Truncated

Boolean

Whether or not the above JSON array is the complete result set, or if the server limited the returned results. For these methods, it is unlikely the limit will be hit, but if it is either filter down the results set or contact us to try to find a way to get at the data you are looking for.

Sample code

{

    "Status": "success",

    "Truncated": false,

    "Data": [

        {

            "EstimatedWaitTime": 65340,

            "QueueDepth": 3

        }

    ]

}