Оператор if управляет условным ветвлением.
{ "if": { "expression": "${myVar} == '1'", "then": [], "else": [] } } |
Операторы switch и case помогают управлять сложными условными операциями и операциями ветвления.
{ "switch": { "variable": "${getIvrDigit}", "case": { "1": [], "2": [], "3": [], "default": [] } } } |
Выполняет набор приложений после завершение основного скрипта. Объявляется единожды вначале скрипта.
{ "trigger": { "disconnected": [] } } |
Объединить набор приложений в именную функцию. Объявляется вначале скрипта.
{ "function": { "name": "myFunction", "actions": [] } } |
Выполнение предварительно объявленной функции по имени.
{ "execute": { "name": "myFunction" } } |
Назначение переменных на канал.
{ "set": { "hangup_after_bridge": "true", "ivrLang": "en" } } |
Экспорт переменных на сторону оператора, а так же, в статистику.
{ "export": [ "reverted_caller_id_number" ] }, |
Разустанавливает переменную.
{ "unSet": [ "reverted_caller_id_number" ] } |
Приложение позволяет проверить текущее время с рабочем календарем. Значение сохраняется в переменную.
{ "calendar": { "extended": false, "name": "WorkDay", "setVar": "isWorkDay" } } |
Выполнение HTTP REST запроса и обработка результата (get JSON)
{ "httpRequest": { "url": "https://sales.bpmonline.com/${id}/dataservice/json/reply/SelectQuery", "method": "POST", "timeout": 1000, "insecureSkipVerify": false, "parser": "application/json", "responseCode": "http_response_code", "headers": { "Content-Type":"application/json", "Cookie": "${my_cookie}" }, "path": { "id": 0 }, "data": { "Name": "Supervisor", "UserID": "Supervisor" }, "exportVariables": { "effective_caller_id_name": "callerIdName", "owner_caller_id_number": "callerIdOwner" } } } |
Выполнение произвольного JavaScript кода с возвращением результата в переменную
{ "js": { "data": "var time = LocalDate(); time.setDate(time.getDate() + (+${dpd}*-1)); return time.getMonth() + '-' + time.getDate() + '-' + time.getFullYear()", "setVar": "myVar" } } |
Приложение для работы с математическими функциями
{ "math": { "data": "${caller_id_array}", "setVar": "new_random_caller_id", "fn": "random" } } |
fn
random
: returns a random number from arraymin
and max
: can be used to find the lowest or highest value in a list of argumentsround
: rounds a number to the nearest integerceil
: rounds a number up to the nearest integerfloor
: rounds a number down to the nearest integerПриложение для работы со строкой.
{ "string": { "data": "${caller_id_number}", "fn": "reverse", "setVar": "reverted_caller_id_number" } } |
fn
length
: returns the length of a stringindexOf
and lastIndexOf
: returns the index of (the position of) the first or last occurrence of a specified text in a stringsearch
: searches a string for a specified value and returns the position of the matchslice
: extracts a part of a string and returns the extracted part in a new stringsubstring
: is similar to slice. The difference is that substring
cannot accept negative indexes.substr
: is similar to slice. The difference is that the second parameter specifies the length of the extracted part.replace
: replaces a specified value with another value in a stringtoUpperCase
or toLowerCase
: A string is converted to upper case or to lower casecharAt
: returns the character at a specified index (position) in a stringcharCodeAt
: returns the unicode of the character at a specified index in a stringsplit
: A string can be converted to an array with the split
functionreverse
: Reverse the provided stringbase64
: base64 encoder / decoderMD5
: Computes a digest from a string using MD5
algorithmSHA-256
: Computes a digest from a string using SHA-256
algorithmSHA-512
: Computes a digest from a string using SHA-512
algorithmПозволяет сохранить массив значений в переменную, которая будет доступна в истории
{ "markIVR": { "name": "Log", "value": "Входящий звонок" } } |
Приложение позволяет получить значение из объекта пользователя по номеру телефона
{ "userInfo": { "set": { "usrId": "id", "mob": "variables.fwd_mob", "out": "variables.out_cid" }, "user": { "extension": "${ext}" } } } |
Передать права на канал пользователю с идентификатором указанным в id
{ "setGrantee": { "id": 10 } } |
Выполнить внешнюю схему по идентификатору
{ "schema": { "id": 1 } } |
Пауза выполнения скрипта в миллисекундах
{ "softSleep": 1000 } |
Вывод дополнительной информации в лог файл приложений
{ "log": " >> ${Hold} <<<" } |
Перейти к именной метке
{ "goto": "tagName" } |
Данные приложения могут вызываться как самостоятельно, так и как параметр другого приложения.
Установить именную метку в скрипте
{ "tag": "tagName" } |
Выполнение приложения без блокировки
{ "async": true } |
Прерывает выполнение скрипта
{ "break": true } |
Позволяет прерывать цикл после прохождения количества указанного в атрибуте max. Выход осуществляется в именную метку указанною в атрибуте failover.
{ "limit": { "max": 5, "failover": "anotherTag" } } |