Messaging applications
- Olga Zaritska
menu
The application allows generating a navigation menu where the selection will be saved into a variable.
{ "menu": { "text": "Select a menu item", "set": "${onClick.Menu}", "variable": "${response}", "buttons": [ [ { "text": "💰 Credits", "type": "reply" }, { "text": "⚙️ Main menu", "type": "reply" } ], [ { "text": "💰 Deposits", "type": "reply" }, { "text": "🧙♂️ Operator assistance", "type": "reply" } ] ] } }
broadcastChatMessage
Provides the ability to send a message through the Chat Gateway.
{ "broadcastChatMessage": { "peer": [ "${destination}" ], "profile": { "id": "13" }, "text": "${SMS}", "type": "text" } }
recvMessage
Save the text message received from the user within the active dialogue into a variable.
{ "recvMessage": { "set": "response", "timeout": 60 } }
sendMessage
- Sending a button with text and an image from the Media Files section:
{ "sendMessage": { "type": "file", "text": "TEXT BLA BLA TEXT ", "file": { "id": "377", "server": "https://dev.webitel.com" }, "buttons": [ [ { "text": "cancel", "type": "reply", "code": "cancel" }, { "text": "ok", "type": "reply", "code": "ok" } ] ] }, "break": false, "tag": "87-menu-custom-tag" }
- Sending a button with text and an image via URL:
{ "sendMessage": { "type": "file", "text": "TEXT BLA BLA TEXT ", "file": { "name": "code.png", "url": "${barcode_link}&text=${start_message}&alttext=${start_message}&w=425" }, "buttons": [ [ { "text": "cancel", "type": "reply", "code": "cancel" }, { "text": "ok", "type": "reply", "code": "ok" } ] ] }, "break": false, "tag": "87-menu-custom-tag" }
sendText
The application allows sending a text message within the active dialogue.
{ "sendText": "Приветствую, ${Name}!" }
sendFile
The application allows sending a link to a file within the active dialogue.
{ "sendFile": { "url": "${file_link}" } }
sendEmail
Sending an email message{ "sendEmail": { "cc": [ "office@mail.com" ], "attachment": { "files": [ 69317, 69314 ] }, "from": "\"Bot Name\" <bot@mail.com>", "message": "<H3>Turn on SMS</h3>\n<b>Creditcard</b>: ${Creditcard[0]} <i>***</i> ${Creditcard[1]}", "smtp": { "auth": { "password": "pass", "user": "bot@mail.com" }, "port": "587", "server": "smtp.mail.com", "tls": true }, "subject": "[webitel](${caller_id_name}) Email notification", "to": [ "${customer_email}" ] } }
sendTTS
The ability to invoke Text-to-Speech (TTS) in the chat – a file is generated tied to the dialogue and sent in the chat. This way, voice messages can be generated for the user.
{ "sendTTS": { "profileId": "28", // TTS profile ID "server": "https://dn.webitel.com", // domain name "textType": "ssml", // tex type ssml or text "message": "dsadsa", // message text "language": "en-US", // language "voice": "Male", // voice "region": "brazilsouth", // region "fileName": "voice_message" // the file name under which our user wants to send this file. } }
STT
The ability to transcribe speech to text.
{ "STT": { "profileId": "28", // profile ID "fileId": "${response.file.id}", // file ID (In this case, file.id is taken from the file sent to the chat.) "language": "en-US", // Recognition language "setVar": "transcription" // The name of the variable to which the transcription of the file is passed. } }
getEmail
{ "getEmail": { "email": { "id": "420", "message_id": "or message_id" }, "set": { "vbody": "body", "vcc": "cc", "vfrom": "from", "vhtml": "html", "vin_reply_to": "in_reply_to", "vreply_to": "reply_to", "vsender": "sender", "vsubject": "subject", "vto": "to", "files": "attachments" } } }
classifier
Customer response type classifier
{ "classifier": { "cluster": { "my": [ "good value" ] }, "input": "my good value", "set": "my_var", "phraseSearch": "true", "matchType": "part" }, "break": false, "tag": "39-classifier-custom-tag" }
chat history
Allows sending dialogue histories to email.
{ "chatHistory": { "conversationId": "${id}", "variable": "my_var", "format": "html", "timeout": "3000", "limit": "150" } }
sendAction
Allows sending messages to third-party chat providers about actions of our bot (schemas).
{ "sendAction": { "action": "typing" } }