Типы ответов для каналов
Платформа предоставляет слои адаптации к различным коммуникационным каналам и системам операторского чата. В таблице представлены типы поддерживаемых ответов и их параметры для каждого канала.
Алиса
Подробнее о подключении голосового помощника Алиса
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
"tts":"....",
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
inlineButtons |
{
"type":"inlineButtons"
"buttons":[
{
"text":"кнопка",
"url":"http://example.com"
}
]
}
|
raw |
{
"type":"raw",
"body":{ ... },
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
carousel |
{
"type": "carousel",
"text": "описание карусели"
"content": [
{
"title": "заголовок",
"description": "описание",
"image": "imageUrl",
"url": "appUrl",
"btnText": "текст кнопки"
}
]
}
|
Обратите внимание на несколько особенностей канала:
- При подключении аудио из библиотеки звуков Алисы в параметре
tts для типа ответа бота text, необходимо указать для этого аудио формат файла .opus.
- При использовании в сценарии типа ответа бота
carousel, ознакомьтесь с правилами его использования в документации Яндекса.
Битрикс24
Подробнее о подключении канала Битрикс24
| Тип |
Параметры |
text |
"type":"text",
"text":"....",
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
ВКонтакте
Подробнее о подключении входящего канала ВКонтакте
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
carousel |
{
"type": "carousel",
"text": "описание карусели"
"content": [
{
"title": "заголовок",
"description": "описание",
"image": "imageUrl",
"url": "appUrl",
"btnText": "текст кнопки"
}
]
}
|
Обратите внимание, перед тем как использовать в сценарии тип ответа бота carousel, ознакомьтесь с правилами его использования в документации ВКонтакте
Маруся
Подробнее о подключении голосового помощника Маруся
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
"tts":"....",
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
inlineButtons |
{
"type":"inlineButtons"
"buttons":[
{
"text":"кнопка",
"url":"http://example.com"
}
]
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
МФМС: WhatsApp
Подробнее о подключении бота в WhatsApp
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
}
|
video |
{
"type":"video",
"videoUrl":"http://..."
}
|
file |
{
"type":"file",
"fileUrl":"http://..."
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
}
|
location |
{
"type": "location",
"lat": 59.934280,
"lon": 30.335099
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
Салют
Подробнее о подключении канала Салют
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
inlineButtons |
{
"type":"inlineButtons"
"buttons":[
{
"text":"кнопка",
"url":"http://example.com"
}
]
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
}
|
Телеграм
Подробнее о подключении канала Телеграм
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
inlineButtons |
{
"type":"inlineButtons"
"buttons":[
{
"text":"кнопка",
"url":"http://example.com"
}
]
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
"audioName":"имя файла",
}
|
location |
{
"type": "location",
"lat": 59.934280,
"lon": 30.335099
}
|
raw |
{
"type":"raw",
"body":{ ... },
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
Телефония
Подробнее о подключении телефонного канала
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false,
"destination": catchAll.operatorGroup,
"phoneNumber": 88008000000,
"headers": {
"Remote-Party-ID": remotePartyId ,
testheader:"header"
},
"transferChannel": "237-test-237"
}
|
dtmf |
{
"type":"dtmf",
"max":"1",
"timeout": "15000"
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
}
|
hangup |
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
Чатвиджет
Подробнее о подключении бота в чатвиджет
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
"tts":"....",
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
"audioName":"имя файла",
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
inlineButtons |
{
"type":"inlineButtons"
"buttons":[
{
"text":"кнопка",
"url":"http://example.com"
}
]
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
carousel |
{
"type": "carousel",
"text": "описание карусели"
"content": [
{
"title": "заголовок",
"description": "описание",
"image": "imageUrl",
"url": "appUrl",
"btnText": "текст кнопки"
}
]
}
|
Azure Bot
Подробнее о подключении бота в Microsoft Teams к платформе JAICP
| Тип |
Параметры |
text |
"type":"text",
"text":"....",
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
"audioName":"имя файла",
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
inlineButtons |
{
"type":"inlineButtons"
"buttons":[
{
"text":"кнопка",
"url":"http://example.com"
}
]
}
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
Chat2Desk
Подробнее о подключении канала Chat2Desk
| Тип |
Параметры |
text |
"type":"text",
"text":"....",
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
Facebook
Подробнее о подключении канала Facebook
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
inlineButtons |
{
"type":"inlineButtons"
"buttons":[
{
"text":"кнопка",
"url":"http://example.com"
}
]
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
"audioName":"имя файла",
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
raw |
{
"type":"raw",
"body":{ ... },
}
|
location |
{
"type": "location",
"lat": 59.934280,
"lon": 30.335099
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
carousel |
{
"type": "carousel",
"text": "описание карусели"
"content": [
{
"title": "заголовок",
"description": "описание",
"image": "imageUrl",
"url": "appUrl",
"btnText": "текст кнопки"
}
]
}
|
Обратите внимание, перед тем как использовать в сценарии тип ответа бота carousel, ознакомьтесь с правилами его использования в документации Facebook
Google Assistant
Подробнее о подключении канала Google Assistant
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
"tts":"....",
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
inlineButtons |
{
"type":"inlineButtons"
"buttons":[
{
"text":"кнопка",
"url":"http://example.com"
}
]
}
|
htmlResponse |
{
"type":"htmlResponse",
"updatedState": "some",
"suppressMic":true|false,
"url": "appUrl"
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
i-Digital: WhatsApp
Подробнее о подключении бота в WhatsApp
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
JivoSite
Подробнее о подключении входящего канала JivoSite
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
Vonage
Подробнее о подключении канала Vonage
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
"audioName":"имя файла",
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
Slack
Подробнее о подключении канала Slack
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
edna.chatCenter
Подробнее о подключении канала edna.chatCenter
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
"audioName":"имя файла",
}
|
file |
{
"type":"file",
"fileUrl":"http://..."
"mimeType":"application/vnd.openxmlformats-officedocument.wordprocessingml"
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
inlineButtons |
{
"type":"inlineButtons"
"buttons":[
{
"text":"кнопка",
"url":"http://example.com"
}
]
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
Viber
Подробнее о подключении канала Viber
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
inlineButtons |
{
"type":"inlineButtons"
"buttons":[
{
"text":"кнопка",
"url":"http://example.com"
}
]
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
raw |
{
"type":"raw",
"body":{ ... },
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
location |
{
"type": "location",
"lat": 59.934280,
"lon": 30.335099
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
Webim
Подробнее о подключении входящего канала Webim
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
switch |
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
Webim v2
Подробнее о подключении входящего канала Webim v2
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
audio |
{
"type":"audio",
"audioUrl":"http://..."
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
}
|
file |
{
"type":"file",
"fileUrl":"http://..."
"mimeType":"application/vnd.openxmlformats-officedocument.wordprocessingml"
}
|
switch |
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
WeChat
Подробнее о подключении канала WeChat
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
switch |
{
"type":"switch",
"firstMessage":"..." ,
"closeChatPhrases": [".."],
"ignoreOffline":true|false,
"oneTimeMessage": true|false
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
Zendesk
Подробнее о подключении канала Zendesk
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
image |
{
"type":"image",
"imageUrl":"http://..."
"text":"описание",
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|
Zendesk Chat
Подробнее о подключении канала Zendesk Chat
| Тип |
Параметры |
text |
{
"type":"text",
"text":"....",
}
|
buttons |
{
"type":"buttons"
"buttons":[
{
"text":"кнопка",
}
]
}
|
crmIntegration |
script:
var reply = {type:"crmIntegration"};
reply.channelType = "BITRIX";
reply.task = "DEAL_UPDATE";
reply.parameters = {
"fields[TITLE]": "Название сделки"
};
|
timeout |
{
"type":"timeout",
"interval":10,
"targetState":"/timeout"
}
|