Working with messages

Use messages to provide information and feedback for the user. This is an example of message:

Once the bot sends the message to the user, the bot waits for the user to respond with another message. The bot will wait until the session times out.

If there is a lot of information then you can create a series of messages with a configurable delay between each message which give the user time to read the text. When the bot reaches the last message in the series, it waits for the user to respond. At any point the user can interrupt the messages by sending a message of their own.

This example showing a series of messages – the icon tells the user there's more to come:

Including data in messages

Messages can be made more relevant and engaging by including user data. For example the first message in the above example (Hi, Demo) uses a variable to show the user's name. For details of how to include data in messages, see Using variables in Converse.

Including images in messages

A message can include a single image with an optional subtitle by way of explanation. For example, this is a series of 3 messages:

The image is defined as a card on the message interaction's Buttons tab. If you had a series of messages each with an image then you might consider using a Card interaction instead. The Card interaction allows the user to scroll horizontally rather than vertically.
Note: When used on the Apple Business Chat channel, a card is shown as a list picker on the Apple device.

Anticipating the next step

Messages can include optional buttons that anticipate what the user might want to do next. For example:
  • Rather than show a URL, provide a button that goes to the URL.
  • Rather than show a phone number, provide a button that on a Smart phone takes them to the call screen ready to call.
This example starts with a question and the following message offers two contact options:

See also

Choosing the type of interaction to use

Creating a bot

Buttons for messages