Send Message Process
  • 13 May 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Send Message Process

  • Dark
    Light
  • PDF

Article summary

The Send Message 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 and does message localization.

send_message

Outcoming message parameters of the Process

ParameterTypeRequiredDescription
channelstring+Name of a messenger from which a user wrote.
chat_idstring+Unique identifier of a user in a messenger.
text_idstring+Name of a text object to be sent to a user. The Localization state diagram stores the texts.
attachment_idstring+Name of an object which describes an attachment to a text message. The Attachments state diagram stores the attachments
itemsarrayOnly for Dynamic attachmentArray of objects for dynamic attachment. The objects are inserted as parameter arguments into a message attachment to be shown as a carousel or keyboard to a user.
currentPageintegerOnly for Dynamic attachmentEach 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
    }

Was this article helpful?

What's Next