Message

The Message block displays text in basic form or with special components like buttons or carousels.

Add a Message block by dragging and dropping it to your flow.

The Message block.

Character limits

Chatlayer indicates how many characters are still allowed on the bottom-right corner of any text field.

The only exception is for Carousels, which show the number of characters that you already enter and not the character limit.

Write Message block by respecting the character limits indicaetd.

For all other channels, the character limit is based on best practices. We recommend using less characters than the limit, but it's not mandatory.

Message steps

Text message

Text messages are the most simple components. Most channels will show them as speech bubbles.

Text message step.

Buttons

Buttons are a useful way to guide the conversation by giving the user a limited set of options. You can add a maximum of three buttons to a message, with different button types.

Buttons step.
Button types

There are 4 different types of buttons:

  • Go to: When this button is clicked, the conversation goes to a new block. Optionally, you can add key-value combinations to a button. These will set variables depending on which button the user has clicked. These variables can then later be used to route blocks, do an API call or render specific text.

  • URL: you can link a button to an external URL.

  • Call: this button will initiate a call if the user is using a mobile device.

  • Webview: this button will open a webview (or a new browser window depending on the channel) with the configured URL as target. The parameters you configure for this button will be JSON stringified and appended to the URL as a Base64 encoded string. It is possible to decode this string using the atob JavaScript function.

Button types on Chatlayer

Media

With the Media step, you can enable the bot to send files to your users.

Media step.
Media types
  • Images: all typical image types, such as jpg, png and gif are supported on our platform.

  • Video: videos are available in the Emulator, Web and Facebook channel. Check this article to add videos to your bot. The following video formats are supported:

    • mp4

    • ogv

    • webm

  • Audio: the audio media is available in the Emulator, the Web channel and Facebook Messenger. Currently we only support MP3 as an audio format.

  • Files: file attachments are available in Facebook Messenger. Currently, only PDF is supported. If you upload the file directly in the platform, there is a file size limit of 10 MB. If you use a direct URL to the file, there is no file size limit.

We recommend media files shared on Facebook Messenger to be below 5 MB in size, as Facebook seems to have trouble in handling files larges with acceptable performance.

Quick replies

Quick replies behave similarly to buttons. They are shown horizontally next to each other in a scrollable container. This means that you can add as many quick replies as you think necessary.

Quick replies settings
  • Icon: optionally, you can add an icon to a quick reply by specifying its URL.

  • Go to: for each Quick reply, you need to define a next block to visit in the flow. In other words, you'll create a Go-to connection.

  • Variables: optionally, variables can be set depending on which button the user has clicked. These variables can then later be used to route blocks, make an API call or render specific text.

Note that Quick replies only link to another block. To link your button to anything else, use Buttons.

Carousels are a way to visualize options, with or without images and buttons.

Buttons in Carousels are the same as regular Buttons and use the same properties like payloads and URL, with the addition of an extra share button.

Carousel step.
Share button

The share button opens a sharing block in Facebook Messenger, enabling people to share message bubbles (aka carousel cards) with their friends.

When a new user receives a message bubble, he can share it with his friends by tapping the same share button. When tapping the postback button, the user is send to the start page of the bot.

You can only use share button in generic templates items (previously called carousels) and only items with maximum one url can be shared by Facebook. It is not possible to change the button title: Facebook Messenger will translate the button to the user's preferred language profile setting.

List

The List step is a step that allows you to present a list of items, shown vertically.

Each item may shown a button that can be used as a call-to-action (postback). You can also provide a URL that opens when an item is tapped.

Each list template message can also have up to one global button that will show below the item list.

List styles

Lists can be shown in 2 different syles:

  • Large lists show the first item with a cover image and text overlay. This is useful if you want to make the first item stand out over the other items.

  • Compact lists show each item in the same way. This is useful for presenting a list of items where no item is shown more prominently.

File upload

Use the file upload template to let users upload a file directly from their device to your bot.

This template only works on the web widget V1 channel. For any other channel, you can use the 'image' format type in the Collect input block.

File upload Message step.

Configuring the File Upload as shown above will show an Upload button in the conversation:

Notes on File upload
  • If the upload failed because there was a problem with the connection, or the file the user chose was bigger than 10 MB, the bot will go to the "failed upload" block.

  • The URL where the uploaded file is stored can be found under the {uploadedFileUrl} variable in the user's session. You can reuse this variable to show the file that the user uploaded by using the Media step. Alternatively, you can retrieve the URL with an API plugin to store the files on your servers.

  • Uploaded files are kept on Chatlayer servers for 30 days, after which they will automatically become unaccessible.

Rich text

Rich text allows you to go beyond text messages and style your text the way you want it. You can also add web links using the rich text editor.

Rich text Message step.
Rich text styles

The rich text editor allows you to use the following styles:

  • Paragraph

  • Heading 1

  • Heading 2

  • Heading 3

  • Heading 4

  • Bulleted list

  • Ordered list (= numbered list)

And format the text in the following ways:

  • Bold

  • Italic

  • Underline

You can also add hyperlinks (weblinks) that either go to an external page or to a specific place in your conversation.

To hyperlink a word or sentence, select it and then click the chain icon on the right below. A popup will appear where you can put in the link address. Then click 'save'.

Last updated

Was this helpful?