- Print
- DarkLight
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
The Send Message Process
This process is responsible for sending messages to users. It receives text templates, attachments, and argument values to compose them together dynamically into a single ready-for-sending message. Also, it does message localization.
Description of outcoming message parameters of the Send Message process
Parameter | Type | Required | Description |
---|---|---|---|
channel | string | + | A name of a messenger from which a user wrote |
chat_id | string | + | A unique identifier of a user in a messenger |
text_id | string | + | A name of a text object to be sent to a user. The Localization state diagram stores the texts. |
attachment_id | string | + | A name of an object which describes an attachment to a text message. The Attachments state diagram stores the attachments |
items | array | Only for Dynamic attachment | An array of objects for dynamic attachment. The objects are inserted as parameters arguments into a message attachment to be shown as a carousel or keyboard to a user |
currentPage | integer | Only for Dynamic attachment | Each messenger limits the maximum quantity of items shown in a carousel or keyboard. If an items array has more objects than allowed, this array is divided into pages (pagination). By default, the initial page number equals 1 . |
Input JSON Example
{
"channel": "viber",
"chat_id": "12345...",
"text_id": "main_text",
"attachment_id": "main_keyboard"
}
Input JSON Example (Dynamic attachment)
{
"channel": "viber",
"chat_id": "12345...",
"text_id": "exchange_rates",
"attachment_id": "carousel_pattern",
"items": [{
"name": "AED",
"value": 4.283634
},
{
"name": "AFN",
"value": 85.711652
},
{
"name": "ALL",
"value": 126.118624
},
...
"currentPage": 1
}