ВОЙТИ

Queues

Methods

AddQueue

Adds a new ACD queue.

Parameters

  • Follow link for authentication parameter names and details.

  • application_id:

    number

    The application ID.

  • application_name:

    string

    The application name that can be used instead of application_id.

  • acd_queue_name:

    string

    The queue name. The length must be less than 100.

  • acd_queue_priority:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  100

    The integer queue priority. The highest priority is 0.

  • auto_binding:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  true

    Set false to disable the auto binding of operators to a queue by skills comparing.

  • service_probability:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  1.0

    The value in the range of 0.5 ... 1.0. The value 1.0 means the service probability 100% in challenge with a lower priority queue.

  • max_queue_size:

    number
    OPTIONAL

    The max queue size.

  • max_waiting_time:

    number
    OPTIONAL

    The max predicted waiting time in minutes. The client is rejected if the predicted waiting time is greater than the max predicted waiting time.

  • average_service_time:

    number
    OPTIONAL

    The average service time in seconds. Specify the parameter to correct or initialize the waiting time prediction.

Returns

  • result:

    number

    1

  • acd_queue_id:

    number

    The ACD queue ID.

Примеры

запрос:

Add a new ACD queue for the application 1.

https://api.voximplant.com/platform_api/AddQueue/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&application_id=1&acd_queue_name=myqueue

ответ:

Add a new ACD queue for the application 1.

{
    "result": 1,
    "acd_queue_id": 1
}

BindUserToQueue

Bind/unbind users to/from the specified ACD queues. Note that users and queues should be already bound to the same application.

Parameters

  • bind:

    boolean
    ЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  true

    Bind or unbind users.

  • Follow link for authentication parameter names and details.

  • application_id:

    number

    The application ID.

  • application_name:

    string

    The application name that can be used instead of application_id.

  • user_id:

    intlist

    The user ID list separated by the ';' symbol or the 'all' value to specify all users bound to the application.

  • user_name:

    stringlist

    The user name that can be used instead of user_id. The user name list separated by the ';' symbol.

  • acd_queue_id:

    intlist

    The ACD queue ID list separated by the ';' symbol or the 'all' value to specify all queues bound to the application.

  • acd_queue_name:

    stringlist

    The queue name that can be used instead of acd_queue_id. The queue name list separated by the ';' symbol.

Returns

  • result:

    number

    1

Примеры

запрос:

Bind three users to one queue.

https://api.voximplant.com/platform_api/BindUserToQueue/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&application_id=1&user_id=12%3B987%3B456&acd_queue_name=myqueue&bind=true

ответ:

Bind three users to one queue.

{
    "result": 1
}

DelQueue

Deletes the ACD queue.

Parameters

  • Follow link for authentication parameter names and details.

  • acd_queue_id:

    intlist

    The ACD queue ID list separated by the ';' symbol.

  • acd_queue_name:

    stringlist

    The ACD queue name that can be used instead of acd_queue_id. The ACD queue name list separated by the ';' symbol.

Returns

  • result:

    number

    1

Примеры

запрос:

Delete the ACD queue 1.

https://api.voximplant.com/platform_api/DelQueue/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&acd_queue_id=1

ответ:

Delete the ACD queue 1.

{
    "result": 1
}

GetACDOperatorStatistics

Get statistics for calls distributed to users (referred as 'operators') via the 'ACD' module. This method can filter statistic based on operator ids, queue ids and date-time interval. It can also group results by day or hour.

Parameters

  • Follow link for authentication parameter names and details.

  • from_date:

    timestamp

    Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss'

  • to_date:

    timestamp
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  current date and time

    Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss'

  • acd_queue_id:

    intlist
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  all

    The ACD queue ID list separated by the ';' symbol or the 'all' value.

  • user_id:

    intlist

    The user ID list separated by the ';' symbol or the 'all' value.

  • abbreviation:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  true

    If set to true, key names in returned JSON will be abbreviated to reduce response byte size. The abbreviations are: 'SA' for 'SpeedOfAnswer', 'HT' for 'HandlingTime', 'TT' for 'TalkTime', 'ACW' for 'AfterCallWork', 'TDT' for 'TotalDialingTime', 'THT' for 'TotalHandlingTime', 'TTT' for 'TotalTalkTime', 'TACW' for 'TotalAfterCallWork', 'AC' for 'AnsweredCalls', 'UAC' for 'UnansweredCalls'

  • report:

    stringlist
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  SA;HT;TT;ACW;AC

    List of item names abbreviations separated by the ';' symbol. Returned JSON will include keys only for the selected items. Special 'all' value defines all possible items, see ACDOperatorStatisticsType for a complete list. See 'abbreviation' description for complete abbreviation list

  • aggregation:

    string
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  none

    Specifies how records are grouped by date and time. If set to 'day', the criteria is a day number. If set to 'hour_of_day', the criteria is a 60-minute interval within a day. If set to 'hour', the criteria is both day number and 60-minute interval within that day. If set to 'none', records are not grouped by date and time

  • group:

    string
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  user

    If set to 'user', first-level array in the resulting JSON will group records by the user ID, and second-level array will group them by date according to the 'aggregation' parameter. If set to 'aggregation', first-level array in the resulting JSON will group records according to the 'aggregation' parameter, and second-level array will group them by the user ID

Returns

Примеры

запрос:

Get statistics for all operators and all queues from the specified date

https://api.voximplant.com/platform_api/GetACDOperatorStatistics/?account_id=1&api_key=foo&from_date=2017-01-01%2000:00:00&user_id=all

GetACDOperatorStatusStatistics

Get statistics for the specified operators and ACD statuses. This method can filter statistics by operator ids and statuses. It can also group results by day/hour or users.

Parameters

  • Follow link for authentication parameter names and details.

  • from_date:

    timestamp

    Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss'

  • to_date:

    timestamp
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  current date and time

    Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss'

  • acd_status:

    stringlist
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  all

    The ACD status list separated by the ';' symbol. The following values are possible: OFFLINE, ONLINE, READY, BANNED, IN_SERVICE, AFTER_SERVICE, TIMEOUT, DND.

  • user_id:

    stringlist

    The user ID list separated by the ';' symbol or the 'all' value.

  • aggregation:

    string
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  none

    Specifies how records are grouped by date and time. If set to 'day', the criteria is a day number. If set to 'hour_of_day', the criteria is a 60-minute interval within a day. If set to 'hour', the criteria is both day number and 60-minute interval within that day. If set to 'none', records are not grouped by date and time

  • group:

    string
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  user

    If set to 'user', first-level array in the resulting JSON will group records by the user ID, and second-level array will group them by date according to the 'aggregation' parameter. If set to 'aggregation', first-level array in the resulting JSON will group records according to the 'aggregation' parameter, and second-level array will group them by the user ID

Returns

Примеры

запрос:

Get statistics for the 'READY' and 'ONLINE' statuses of all operators; grouped by operators.

https://api.voximplant.com/platform_api/GetACDOperatorStatusStatistics/?account_id=1&api_key=foo&from_date=2019-05-20%2011%3A00%3A00&to_date=2019-05-20%2013%3A00%3A00&acd_status=READY%3BONLINE&user_id=all&aggregation=hour&group=user

ответ:

Get statistics for the 'READY' and 'ONLINE' statuses of all operators; grouped by operators.

{
    "result": [
        {
            "user_id": 487576,
            "statistics": [
                {
                    "date": "2019-05-20",
                    "hour": 11,
                    "acd_status": {
                        "READY": {
                            "avg": 1323,
                            "max": 2496,
                            "min": 151,
                            "sum": 2647,
                            "count": 2
                        },
                        "ONLINE": {
                            "avg": 101,
                            "max": 267,
                            "min": 14,
                            "sum": 303,
                            "count": 3
                        }
                    }
                },
                {
                    "date": "2019-05-20",
                    "hour": 12,
                    "acd_status": {
                        "READY": {
                            "avg": 1169,
                            "max": 1169,
                            "min": 1169,
                            "sum": 1169,
                            "count": 1
                        },
                        "ONLINE": {
                            "avg": 1139,
                            "max": 2252,
                            "min": 27,
                            "sum": 2279,
                            "count": 2
                        }
                    }
                }
            ]
        },
        {
            "user_id": 487578,
            "statistics": [
                {
                    "date": "2019-05-20",
                    "hour": 11,
                    "acd_status": {
                        "READY": {
                            "avg": 234,
                            "max": 472,
                            "min": 42,
                            "sum": 939,
                            "count": 4
                        },
                        "ONLINE": {
                            "avg": 955,
                            "max": 1886,
                            "min": 24,
                            "sum": 1911,
                            "count": 2
                        }
                    }
                },
                {
                    "date": "2019-05-20",
                    "hour": 12,
                    "acd_status": {
                        "ONLINE": {
                            "avg": 2350,
                            "max": 2350,
                            "min": 2350,
                            "sum": 2350,
                            "count": 1
                        }
                    }
                }
            ]
        }
    ]
}

GetACDQueueStatistics

Get statistics for calls distributed to users (referred as 'operators') via the 'queue' distribution system. This method can filter statistic based on operator ids, queue ids and date-time interval. It can also group results by day or hour.

Parameters

  • Follow link for authentication parameter names and details.

  • from_date:

    timestamp

    Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss'

  • to_date:

    timestamp
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  current date and time

    Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss'

  • abbreviation:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  true

    If set to true, key names in returned JSON will be abbreviated to reduce response byte size. The abbreviations are: 'WT' for 'WaitingTime', 'SA' for 'SpeedOfAnswer', 'AT' is for 'AbandonmentTime', 'HT' is for 'HandlingTime', 'TT' is for 'TalkTime', 'ACW' is for 'AfterCallWork', 'QL' is for 'QueueLength', 'TC' is for 'TotalCalls', 'AC' is for 'AnsweredCalls', 'UAC' is for 'UnansweredCalls', 'RC' is for 'RejectedCalls', 'SL' is for 'ServiceLevel', 'TWT' is for 'TotalWaitingTime', 'TST' is for 'TotalSubmissionTime', 'TAT' is for 'TotalAbandonmentTime', 'THT' is for 'TotalHandlingTime', 'TTT' is for 'TotalTalkTime', 'TACW' is for 'TotalAfterCallWork'

  • acd_queue_id:

    intlist
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  all

    The ACD queue ID list separated by the ';' symbol or the 'all' value.

  • report:

    stringlist
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  WT;SA;AT;HT;TT;ACW;TC;AC;UAC;RC;SL

    List of item names abbreviations separated by the ';' symbol. Returned JSON will include keys only for the selected items. Special 'all' value defines all possible items, see ACDQueueStatisticsType for a complete list. See 'abbreviation' description for complete abbreviation list

  • aggregation:

    string
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  none

    Specifies how records are grouped by date and time. If set to 'day', the criteria is a day number. If set to 'hour_of_day', the criteria is a 60-minute interval within a day. If set to 'hour', the criteria is both day number and 60-minute interval within that day. If set to 'none', records are not grouped by date and time

Returns

  • List of records grouped grouped by date according to the 'aggregation' method call argument

Примеры

запрос:

Get statistics for all queues from the specified date

https://api.voximplant.com/platform_api/GetACDQueueStatistics/?account_id=1&api_key=foo&from_date=2017-01-01%2000:00:00

GetACDState

Gets the current ACD queue state.

Parameters

  • Follow link for authentication parameter names and details.

  • acd_queue_id:

    intlist
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  all

    The ACD queue ID list separated by the ';' symbol or the 'all' value.

Returns

Примеры

запрос:

Get the state of the queue 1.

https://api.voximplant.com/platform_api/GetACDState/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&acd_queue_id=1

ответ:

Get the state of the queue 1.

{
    "result": {
        "acd_queues": [
            {
                "acd_queue_id": 1,
                "waiting_calls": [
                    {
                        "user_id": 661866,
                        "callerid": "79267774411",
                        "priority": 100,
                        "user_name": "op6",
                        "begin_time": "2014-03-26 08:07:12",
                        "waiting_time": 146,
                        "minutes_to_submit": 0,
                        "user_display_name": "op 6",
                        "acd_session_history_id": 192
                    }
                ],
                "acd_queue_name": "myqueue",
                "ready_operators": [
                    {
                        "user_id": 661885,
                        "user_name": "op5",
                        "idle_duration": 212,
                        "user_display_name": "op 5"
                    }
                ],
                "servicing_calls": [],
                "locked_operators": [
                    {
                        "user_id": 661884,
                        "unreached": "2014-03-26 08:09:36",
                        "user_name": "op4",
                        "user_display_name": "op 4"
                    },
                    {
                        "locks": [
                            {
                                "id": "577b77c8565040c5bd322af65e787302",
                                "created": "2014-03-26 07:59:58"
                            }
                        ],
                        "user_id": 661863,
                        "user_name": "op3",
                        "user_display_name": "op 3"
                    },
                    {
                        "locks": [
                            {
                                "id": "3f2d7f188c4211e58994feff819cdc9f",
                                "created": "2014-03-26 08:07:14"
                            }
                        ],
                        "user_id": 661866,
                        "acd_calls": [
                            {
                                "callerid": "79267774411",
                                "begin_time": "2014-03-26 08:07:12",
                                "acd_queue_id": 1,
                                "acd_queue_name": "myqueue",
                                "acd_request_id": "95d9eddf040348f3b79454bb5379f604",
                                "acd_session_history_id": 192
                            }
                        ],
                        "user_name": "op6",
                        "user_display_name": "op 6"
                    },
                    {
                        "locks": [
                            {
                                "id": "b1f1809996974a0ba2cb660c730ae5c0",
                                "created": "2014-03-26 08:08:17"
                            }
                        ],
                        "user_id": 661867,
                        "acd_calls": [
                            {
                                "callerid": "79297704410",
                                "submitted": "2014-03-26 08:08:25",
                                "begin_time": "2014-03-26 08:08:15",
                                "acd_queue_id": 3,
                                "acd_queue_name": "support",
                                "acd_request_id": "edd39d292e414ecebbfd237d8ba2d7f1",
                                "acd_session_history_id": 195
                            }
                        ],
                        "user_name": "op7",
                        "user_display_name": "op 7"
                    }
                ],
                "ready_operator_count": 1,
                "locked_operator_count": 4,
                "after_service_operators": [],
                "after_service_operator_count": 0
            }
        ]
    }
}

Get the state of the queue 1.

{
    "result": {
        "acd_queues": [
            {
                "acd_queue_id": 1,
                "waiting_calls": [
                    {
                        "callerid": "79851113322",
                        "priority": 100,
                        "begin_time": "2014-03-26 08:14:14",
                        "waiting_time": 78,
                        "minutes_to_submit": 5,
                        "acd_session_history_id": 193
                    }
                ],
                "ready_operators": [],
                "servicing_calls": [
                    {
                        "user_id": 661866,
                        "callerid": "79267774411",
                        "priority": 100,
                        "user_name": "op6",
                        "begin_time": "2014-03-26 08:07:12",
                        "waiting_time": 45,
                        "user_display_name": "op 6",
                        "acd_session_history_id": 192
                    }
                ],
                "locked_operators": [],
                "ready_operator_count": 0,
                "locked_operator_count": 0,
                "after_service_operators": [],
                "after_service_operator_count": 0
            }
        ]
    }
}

GetQueues

Gets the ACD queues.

Parameters

  • Follow link for authentication parameter names and details.

  • acd_queue_id:

    number
    OPTIONAL

    The ACD queue ID to filter.

  • acd_queue_name:

    string
    OPTIONAL

    The ACD queue name part to filter.

  • application_id:

    number
    OPTIONAL

    The application ID to filter.

  • skill_id:

    number
    OPTIONAL

    The skill ID to filter.

  • excluded_skill_id:

    number
    OPTIONAL

    The excluded skill ID to filter.

  • with_skills:

    boolean
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  false

    Set true to get the bound skills.

  • showing_skill_id:

    number
    OPTIONAL

    The skill to show in the 'skills' field output.

  • count:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  20

    The max returning record count.

  • offset:

    number
    OPTIONALЗНАЧЕНИЕ ПО УМОЛЧАНИЮ:  0

    The first N records will be skipped in the output.

Returns

  • result:

    [ QueueInfoType ]
  • total_count:

    number

    The total found queue count.

  • count:

    number

    The returned queue count.

Примеры

запрос:

Get the two queues.

https://api.voximplant.com/platform_api/GetQueues/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&count=2

ответ:

Get the two queues.

{
    "count": 1,
    "result": [
        {
            "modified": "2014-01-19 14:12:46",
            "acd_queue_id": 1,
            "auto_binding": true,
            "acd_queue_name": "myqueue",
            "application_id": 1,
            "acd_queue_priority": 100,
            "service_probability": 1
        },
        {
            "modified": "2014-01-19 14:12:46",
            "acd_queue_id": 3,
            "auto_binding": true,
            "acd_queue_name": "support",
            "application_id": 1,
            "max_queue_size": 100,
            "max_waiting_time": 5,
            "acd_queue_priority": 1,
            "service_probability": 0.85,
            "average_service_time": 180
        }
    ],
    "total_count": 17
}

SetQueueInfo

Edits the ACD queue.

Parameters

  • Follow link for authentication parameter names and details.

  • acd_queue_id:

    number

    The ACD queue ID.

  • acd_queue_name:

    string

    The ACD queue name that can be used instead of acd_queue_id.

  • new_acd_queue_name:

    string
    OPTIONAL

    The new queue name. The length must be less than 100.

  • acd_queue_priority:

    number
    OPTIONAL

    The integer queue priority. The highest priority is 0.

  • auto_binding:

    boolean
    OPTIONAL

    Set false to disable the auto binding of operators to a queue by skills comparing.

  • service_probability:

    number
    OPTIONAL

    The value in the range of 0.5 ... 1.0. The value 1.0 means the service probability 100% in challenge with a lower priority queue.

  • max_queue_size:

    number
    OPTIONAL

    The max queue size.

  • max_waiting_time:

    number
    OPTIONAL

    The max predicted waiting time in minutes. The client is rejected if the predicted waiting time is greater than the max predicted waiting time.

  • average_service_time:

    number
    OPTIONAL

    The average service time in seconds. Specify the parameter to correct or initialize the waiting time prediction.

  • application_id:

    number
    OPTIONAL

    The new application ID.

Returns

  • result:

    number

    1

Примеры

запрос:

Change the queue name.

https://api.voximplant.com/platform_api/SetQueueInfo/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&acd_queue_id=1&new_acd_queue_name=support

ответ:

Change the queue name.

{
    "result": 1
}