Wait time endpoints

Contact Center AI Platform (CCAI Platform) provides the Wait time endpoint to get the current wait times for queues of different channel types.

Wait time

Parameter Required Data Type Definition
lang TRUE String Language code of the queue. (e.g. 'en')
menu_id FALSE Integer Response will filter all menus in that menu's subtree, including that menu.
menu_type FALSE String Returns menus of specific types. Possible values: ivr_menu, mobile_menu, web_menu).
channel_type FALSE String Returns menus of a specific channel. Possible values: voice_call, chat).
wait[from] FALSE Integer Returns records if they have a wait greater than the value.
wait[to] FALSE Integer Returns records if they have a wait less than the value.

Endpoint:

Method: GET
Type: 
URL: https://{{subdomain}}.{{domain}}/apps/api/v1/wait_times

Headers:

Key Value Description
Content-Type application/json

Example request and responses

The following sections provide example requests to the endpoint.

Wait times for mobile queues

This example demonstrates how to retrieve the wait times for the mobile queues.

Request

Headers:

Key Value Description
Content-Type application/json

Query:

Key Value Description
lang en
menu_type mobile_menu

Body: None

Response: Wait times for Mobile queues
[
    {
        "menu_id": 29,
        "menu_type": "mobile_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Laptop"
    },
    {
        "menu_id": 42,
        "menu_type": "mobile_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Desktop"
    },
    {
        "menu_id": 43,
        "menu_type": "mobile_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Smart Phone"
    }
]

Status Code: 200

Wait times between wait[from] to wait[to]

This example demonstrates how to retrieve the calls that have wait times between the wait from and wait to values.

Request

Headers:

Key Value Description
Content-Type application/json

Query:

Key Value Description
lang en
wait[from] 5
wait[to] 15

Body: None

Response: Wait times between wait[from] to wait[to]
[
    {
        "menu_id": 3,
        "menu_type": "web_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Web App"
    },
    {
        "menu_id": 29,
        "menu_type": "mobile_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Laptop"
    },
    {
        "menu_id": 42,
        "menu_type": "mobile_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Desktop"
    },
    {
        "menu_id": 44,
        "menu_type": "web_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Mobile App"
    },
    {
        "menu_id": 43,
        "menu_type": "mobile_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Smart Phone"
    }
]

Status Code: 200

Wait times of the voice call for mobile queues greater than 5 seconds

This example demonstrates how to retrieve the mobile voice calls that have a wait time greater than 5 seconds.

Request

Headers:

Key Value Description
Content-Type application/json

Query:

Key Value Description
lang en
menu_type mobile_menu
channel_type voice_call
wait[from] 5

Body: None

Response: Wait times of the voice call for Mobile queues greater than 5 seconds
[
    {
        "menu_id": 29,
        "menu_type": "mobile_menu",
        "voice_call": 10,
        "materialized_path": "Laptop"
    },
    {
        "menu_id": 42,
        "menu_type": "mobile_menu",
        "voice_call": 10,
        "materialized_path": "Desktop"
    },
    {
        "menu_id": 43,
        "menu_type": "mobile_menu",
        "voice_call": 10,
        "materialized_path": "Smart Phone"
    }
]

Status Code: 200

Wait times for a specific menu

This example demonstrates how to retrieve the wait times for a specific menu ID.

Request

Headers:

Key Value Description
Content-Type application/json

Query:

Key Value Description
lang en
menu_id 9

Body: None

Response: Wait times for a specific menu
[
    {
        "menu_id": 9,
        "menu_type": "ivr_menu",
        "voice_call": 10,
        "materialized_path": "Death Star"
    }
]

Status Code: 200

Wait times for all voice calls

This example demonstrates how to retrieve the wait times for all current voice calls.

Request

Headers:

Key Value Description
Content-Type application/json

Query:

Key Value Description
lang en
channel_type voice_call

Body: None

Response: Wait times for all voice calls
[
    {
        "menu_id": 3,
        "menu_type": "web_menu",
        "voice_call": 10,
        "materialized_path": "Web App"
    },
    {
        "menu_id": 9,
        "menu_type": "ivr_menu",
        "voice_call": 10,
        "materialized_path": "Death Star"
    },
    {
        "menu_id": 29,
        "menu_type": "mobile_menu",
        "voice_call": 10,
        "materialized_path": "Laptop"
    },
    {
        "menu_id": 41,
        "menu_type": "ivr_menu",
        "voice_call": 10,
        "materialized_path": "Lock Star"
    },
    {
        "menu_id": 42,
        "menu_type": "mobile_menu",
        "voice_call": 10,
        "materialized_path": "Desktop"
    },
    {
        "menu_id": 44,
        "menu_type": "web_menu",
        "voice_call": 10,
        "materialized_path": "Mobile App"
    },
    {
        "menu_id": 43,
        "menu_type": "mobile_menu",
        "voice_call": 10,
        "materialized_path": "Smart Phone"
    }
]

Status Code: 200

Wait times for English queues

This example demonstrates how to retrieve all wait times for the queues that have language of English.

Request

Headers:

Key Value Description
Content-Type application/json

Query:

Key Value Description
lang en

Body: None

Response: Wait times for English queues
[
    {
        "menu_id": 3,
        "menu_type": "web_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Web App"
    },
    {
        "menu_id": 9,
        "menu_type": "ivr_menu",
        "voice_call": 10,
        "materialized_path": "Death Star"
    },
    {
        "menu_id": 29,
        "menu_type": "mobile_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Laptop"
    },
    {
        "menu_id": 41,
        "menu_type": "ivr_menu",
        "voice_call": 10,
        "materialized_path": "Lock Star"
    },
    {
        "menu_id": 42,
        "menu_type": "mobile_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Desktop"
    },
    {
        "menu_id": 44,
        "menu_type": "web_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Mobile App"
    },
    {
        "menu_id": 43,
        "menu_type": "mobile_menu",
        "chat": 10,
        "voice_call": 10,
        "materialized_path": "Smart Phone"
    }
]

Status Code: 200