На платформе TWIN есть встроенные переменные, которые можно использовать в различных сценариях: К сожалению, невозможно использовать собственные переменные со знаком точка: {ваша.переменная}такая конструкция работать не будет. Это единственное ограничение в переменных, так как знак "." указывает на системную переменную. {системные.переменная}Системные переменные используемые на платформе. {детектор.эмоции}Определение эмоциональной окраски ответа человека. Бывает 3-х типов:
{детектор.пол}Определение пола по голосу. Доступно только в звонках. Для работы данной переменной требуется в задании на обзвон установить галочку "Определение гендерного признака". Возможные значения Для определения пола системе необходимо не менее 1 секунды чистого голоса клиента, в противном случае система ничего не распознает.
{переменная|падеж:имя_падежа}Склонение переменных для правильного произношение синтезом согласно падежу. Пример: {m_0|падеж:родительный} - где m_0, например: Иван Иванович. И согласно сценарию "могу я услышать m_0 ?", задача использовать переменную в родительном падеже. Поддерживаются все падежи: именительный (кто? что?) пример: -это кто? -Иван Иванович родительный (кого? чего?) пример: -нет кого? - Анны Андреевны или Ивана Ивановича дательный (кому? чему?) пример: чему вы рады? -Анне Андреевне и Ивану Ивановичу винительный (кого? что?) пример: кого/что вы видите? -Ивана Ивановича или Анну Андреевну творительный (кем? чем?) пример: кем восхищаетесь? -Иваном Ивановичем и Анной Андреевной предложный (о ком? о чем?) пример: о ком думаете? - об Иване Ивановиче и Анне Андреевне Переменные значения которых не меняются и которые нельзя изменить в процессе диалога{companyId} - строка, идентификатор компании которой принадлежит бот. Информация о клиенте (конечный пользователь Twin, участник диалога)информация может быть изменена в процессе диалога с помощью ендпойнта идентификации клиента (он есть как в чатах, так и в сервисе бота). {clientId} - uuid, внутренний идентификатор клиента в системе Twin. Данные, которые можно изменить только в процессе переключения со звонка на чат, либо наоборот(Пока данный функционал не доступен в полном объеме, т.к. не запущен CIS. В данный момент можно использовать, например для определения в каком мессенджере ведется диалог): {communicationType} - строка, тип коммуникации с клиентом. Допустимые значения: TEXT, VOICE. Данные, меняющиеся при каждом обращении к боту, автоматически{percept} - строка, хранит фразу которую сказал пользователь и на которую в данный момент отвечает бот. Переменные будут пополняться в этой статье по мере их появления на нашей платформе |
There are built-in variables on the TWIN platform that can be used in various scenarios: Unfortunately, it is not possible to use your own dot variables: {your.variable}this construction will not work. This is the only limitation in variables, since "." points to a system variable. {system.variable}System variables used on the platform. {system.now}, the analogue is a variable {now} - Date with time (for example 2019-11-22 04:06:58). The current date is used when the script was used. {system.today}, the analogue is a variable {today} - Date without time (for example, 2019-11-22). The current date is used when the script was used. {system.time}, the analogue is a variable {time} Time without date (for example 04:06:58). The current time is used at the moment of using the script. {system.telephone} Subscriber’s number used in the script when making a call via phone. {system.previous} Script number. You can use such conditions during the transition between scripts to know where the transition was made from. {system.dial} Counter of successful calls to the candidate within the call task. {system.record} Sends a link to a sound recording of the current conversation via phone (Now only on the TWIN platform, the recording format is .mp3). {detector.emotions}Determination of the emotional coloring of a person's answer. There are 3 types:
{detector.gender}Determination of gender by voice. Only available in calls. For this variable to work, it is required to check "Determination of gender characteristic" in the call task. Possible values To determine the gender, the system needs at least 1 second of the client's clear voice, otherwise the system will not recognize anything.
Variable values of which do not change and which cannot be changed during the dialogue{companyId} is a string, company ID which the bot belongs to. {botId} is a string, bot ID. {dialogId} is a string, current dialog ID. {dialog} is an object, when inserting into a line, is automatically transformed into the dialog text. {referer} is a string, URL where the user came from (used for chats) Client information (Twin end user, dialogue participant)information can be changed during the dialogue using the client identification endpoint (it is available both in chats and in the bot service). {clientId} is a string, client ID in Twin system. {clientPhone} is a string, client phone number. {clientEmail} is a string, client email address. {clientName} is a string, client name. {clientNickname} is a string, client nickname. {clientExternalId} is a string, user ID in the Twin client system, must be unique within the company. {clientMetadata} is an array, any data about the client. Data that can be changed only when switching from a call to a chat, or vice versa(So far, this functionality is not available in full, because CIS has not been launched. At the moment, you can use it, for example, to determine in which messenger the dialogue is being conducted): {communicationType} is a string, client communication type. Valid values: TEXT, VOICE. Data that changes automatically with each addressing to the bot{percept} is a string that stores a phrase said by the user and which the bot is currently responding to. Variables will be updated in this article as they appear on our platform. |