Result Types

The Main Result from a Message or Responder can display several different types of content. Here is an example of each one.

For each example, the following details of the Message are the same:

Type
Bot Response
Content Type
Static

Text Result

Pattern
*demo text*
Result Type
Text
Text Tile
This is some text. It can include variables. For example, after “demo text” you said “{$botContext.starVar2}”.
../_images/demo-text-setup.png ../_images/demo-text.png

Image Results

Pattern
flamingo
Result Type
Image
Image Tile
https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Flamingos_Laguna_Colorada.jpg/640px-Flamingos_Laguna_Colorada.jpg

The contents of the image tile should be the URL of the audio file to to play. You can include curly-braced variables.

../_images/demo-image-setup.png ../_images/demo-image.png

Audio Results

Pattern
audio
Result Type
Audio
Audio Tile
http://cdn.music2ten.com/mp3/pd4u/GershwinWhiteman-RhapsodyInBluePart1.mp3

The contents of the audio tile should be the URL of the image to display. You can include curly-braced variables.

Facebook Messenger only provides audio support for MP3 files.

../_images/demo-audio-setup.png ../_images/demo-audio.png

Video Results

Pattern
video
Result Type
Video
Video Tile
http://docs.botcentral.ai/img/content/flamingo.mp4

The contents of the video tile should be the URL of the video to play. You can include curly-braced variables.

Facebook Messenger only provides video support for MP4 files.

../_images/demo-video-setup.png ../_images/demo-video.png

Note on Media

Many users will interact with your Bot through the Facebook Messenger Mobile App, which means they may not be using high-speed internet connections.

  • Audio and Video files are not downloaded to the mobile device until the user plays them — so the user has a choice whether or not to download.
  • Images (which includes animated gifs) are downloaded to the device when the message is sent, automatically. In this case the user is not making a choice about whether or not to download. You should think about the user’s experience (slow loading, and data-plan usage) when adding images as Message results.