Messenger Module Reference

Applies to

Bridge by Smartsheet

Button Template

This module adds a messenger button to the conversation.

Button Template fields

  • Return Media As: Determine how the buttons will be displayed in regards to the conversation.
    • Next Question: This will replace the question for the next state with the attachment.
    • New Comment: This will add a new comment without affecting any of the other conversation states.
    • Current Answer: This will replace the current state's answer with the attachment.
  • Title Text: Message text that is displayed before the buttons
  • Buttons: An array of one to three buttons that will be displayed in messenger.

Button Template for Messenger

  • Button Title: The text displayed on the button.
  • Button Type: The type of button to be displayed. 
    • Postback: Button that will send the button value back to converse as a new comment.
    • Link: Button that will open a new browser window/tab to the URL defined as the button value. It is also possible to define different behaviour for link buttons using the webview object that is currently supported for the IOS and Android versions of Messenger.
    • Call: Button that will prompt your device to call the number defined as the button value. The phone number must be international format, starting with a + symbol and including all required country and area codes for that country.
  • Button Value: The value of the button. The format of the button value is defined by the button type.

Button Template Fields

  • Webview: Additional display options for a link button. If enabled the button value URL will be displayed in a Messenger webview.
    • Display in Webview: State if you want the link displayed in Messenger webview where supported.
    • Webview Height: The height of the webview to be displayed. The available options are Full, Tall, and Compact.
    • Fallback URL: An alternative URL to be displayed if the webview is not supported. If not specified the button value URL will be used instead.

Button Fields Continued Webview


Carousel

A carousel is a list of up to ten items displayed in Messenger that you scroll through and can have various button actions associated with each element.

Carousel fields

  • Return Media As: Determine how the carousel will be displayed in regards to the conversation.
  • Next Question: This will replace the question for the next state with the attachment.
  • New Comment: This will add a new comment without affecting any of the other conversation states.
  • Current Answer: This will replace the current state's answer with the attachment.
  • Elements: An array of one to ten elements to be displayed in the carousel

Carousel template

  • Title: Text to display on the carousel element.
  • Subtitle: Subtitle text to display on the carousel element.
  • Image URL: The URL to an image to display with the carousel element.

Carousel Template set up continued

  • Buttons: An array of up to three buttons that are displayed with the carousel element.

    This follows the same style and rules as the Button Template module with an additional button type, Share, that allows you to share the current carousel element with another Messenger user, page, or group.

Dynamic Carousel

The dynamic carousel is displayed the same as the Carousel but is generated from an array of objects that has been retrieved or generated from another module.

Dynamic Carousel fields

  • Return Media As: Determine how the carousel will be displayed in regards to the conversation.
    • Next Question: This will replace the question for the next state with the attachment.
    • New Comment: This will add a new comment without affecting any of the other conversation states.
    • Current Answer: This will replace the current state's answer with the attachment.
  • Reference To The Object Array: A data reference to the location of the array of object to use as the carousel elements.

Dynamic Carousel template

  • Elements: An object defining the relationship between the carousel elements and the array of objects you have supplied.
  • Title: The name of the field on the retrieved objects that match the title of the carousel element. If no field matches the given value, the given value will be used instead.
  • Subtitle: The name of the field on the retrieved objects that match the subtitle of the carousel element. If no field matches the given value, the given value will be used instead.
  • Image URL: The name of the field on the retrieved objects that match the image url of the carousel element. If no field matches the given value, the given value will be used instead.

Dynamic Carousel Element fields

  • Buttons: An array of up to three buttons that will be displayed on the carousel element. This follows the same style and rules as the Button Template module with an additional button type, Share, that allows you to share the current carousel element with another Messenger user, page, or group.

It is possible for the button title, button value, and the webview fallback URL to be defined by values from the carousel element object in the same way as the element title, element subtitle, and element image URL are defined from the array object.

Dynamic Carousel Button fields


List

List fields

  • Return Media As: Determine how the buttons will be displayed in regards to the conversation.
    • Next Question: This will replace the question for the next state with the attachment.
    • New Comment: This will add a new comment without affecting any of the other conversation states.
    • Current Answer: This will replace the current state's answer with the attachment.
  • Top Element Style: State the style of the top element in the list. The options for this field are:
    • Large: The top element will be larger than the remaining elements.
    • Compact: The top element will be displayed the same as the remaining elements.

List Fields

  • Elements: An array of between two and four elements to be displayed in the list.
  • Title: The title of the list element.
  • Subtitle: The subtitle of the list element.
  • Image URL: The URL to an image that will be displayed with the list element.
  • Default Action: A link button action that will be invoked if the user clicks on the list item. This behaves the same as Button Template buttons of link type, including webview support but you do not need to specify a button title.

List Element Fields

  • Buttons: A button element that will be added to the list element. This behaves the same as the Button Template buttons.

List Button Fields


Dynamic List

The dynamic list is displayed the same as the list but is generated from an array of objects that has been retrieved or generated from another module.

Dynamic List fields

  • Return Media As: Determine how the buttons will be displayed in regards to the conversation.
    The options for this field are:

    • Next Question: This will replace the question for the next state with the attachment.

    • New Comment:This will add a new comment without affecting any of the other conversation states.

    • Current Answer: This will replace the current state's answer with the attachment.

  • Top Element Style: State the style of the top element in the list. The options for this field are:

    • Large: The top element will be larger than the remaining elements.

    • Compact: The top element will be displayed the same as the remaining elements.

  • Reference To The Object Array: A Data Reference to the location of the array of object to use as the list elements.

Dynamic List fields

  • Elements: An object defining the relationship between the list elements and the array of objects you have supplied.

  • Title: The name of the field on the retrieved objects that match the title of the carousel element. If no field matches the given value, the given value will be used instead.

  • Subtitle: The name of the field on the retrieved objects that match the subtitle of the carousel element. If no field matches the given value, the given value will be used instead.

  • Image URL: The name of the field on the retrieved objects that match the image url of the carousel element. If no field matches the given value, the given value will be used instead.

Dynamic List Element fields

  • Default Action: A link button action that will be invoked if the user clicks on the list item. This behaves the same as Button Template buttons of link type, including webview support but you do not need to specify a button title.

It is possible for the button value, and the webview fallback URL, to be defined by values from the list element object in the same way as the element title, element subtitle, and element image URL are defined from the array object.

  • Buttons: A button element that will be added to the list element. This behaves the same as the Button Template ) buttons.

Dynamic List Default Action fields


Send Audio

Send a message with an audio file attachment. This will allow the user to play the audio file from messenger without having to download it first.

The URL to the audio file must be for a valid mp3 or mp4 audio file under 10 MB.

Send Audio fields

  • Return Media As: Determine how the attachment will be displayed in regards to the conversation.
    The options for this field are:

    • Next Question: This will replace the question for the next state with the attachment.

    • New Comment: This will add a new comment without affecting any of the other conversation states.

    • Current Answer: This will replace the current state's answer with the attachment.

  • URL: The URL to the audio file that is to be attached to the message.

  • Quick Replies: An array of up to ten optional quick replies that behave as with the Quick Selection module.

Send Audio fields


Send File

Send a message with a file attachment.

Send File fields

  • Return Media As: Determine how the attachment will be displayed in regards to the conversation.
    The options for this field are:

    • Next Question: This will replace the question for the next state with the attachment.

    • New Comment: This will add a new comment without affecting any of the other conversation states.

    • Current Answer: This will replace the current state's answer with the attachment.

  • URL: The URL to the file that is to be attached to the message.

  • Quick Replies: An array of up to ten optional quick replies that behave as with the Quick Selection module.

Send File fields


Send Image

Send a message with an image file attachment. This will display the image in messenger without having to download it first.

The URL to the image file must be for a valid jpg, png, or gif file.

Send Image fields

  • Return Media As: Determine how the attachment will be displayed in regards to the conversation.
    The options for this field are:

    • Next Question: This will replace the question for the next state with the attachment.

    • New Comment: This will add a new comment without affecting any of the other conversation states.

    • Current Answer: This will replace the current state's answer with the attachment.

  • URL: The URL to the image file that is to be attached to the message.

  • Quick Replies: An array of up to ten optional quick replies that behave as with the Quick Selection module.

Send Image fields


Send Video

Send a message with a video file attachment. This will display the video in messenger which will allow it to be played without downloading it first.

The URL to the video file must be for a valid video file. Multiple file types are supported, mp4 and mov are recommended but a complete list of supported types is available here.

Send Video fields

  • Return Media As: Determine how the attachment will be displayed in regards to the conversation.
    The options for this field are:

    • Next Question: This will replace the question for the next state with the attachment.

    • New Comment: This will add a new comment without affecting any of the other conversation states.

    • Current Answer: This will replace the current state's answer with the attachment.

  • URL: The URL to the video file that is to be attached to the message.

  • Quick Replies: An array of up to ten optional quick replies that behave as with the Quick Selection module.

Send Video Fields


Send Receipt

Send a message displaying a receipt.

Receipts fields

  • Return Media As: Determine how the receipt will be displayed in regards to the conversation.
    • Next Question: This will replace the question for the next state with the attachment.
    • New Comment: This will add a new comment without affecting any of the other conversation states.
    • Current Answer: This will replace the current state's answer with the attachment.
  • Recipient Name: The name of the recipient.
  • Order Number: The order reference number.
  • Currency: The code of the currency being used in the invoice.
  • Payment Method: The name of the payment method used for the invoice.
  • Order URL: An optional URL link to the full order for the user to view.
  • Timestamp: A Unix timestamp value of when the order was made. Alternatively you can specify auto to use the current time.
  • Reference To The Object Array: A Handlebar reference to an object array used to dynamically generate receipt items.

If this is specified, the first object in the items array will be used to define which fields of the object array correspond to the receipt item similarly to the Dynamic Carousel.

Send Receipt Fields

  • Items: An array of receipt items to be displayed.

    • Title: The title of the receipt item.

    • Subtitle: The subtitle of the receipt item.

    • Quantity: The quantity of the receipt item.

    • Price: The unit price of the receipt item.

    • Currency: The currency of the price of the receipt item. If this is not supplied the Currency value from the parent receipt is used.

    • Image URL: An image URL to be displayed for the receipt item.

Items Fields

  • Order Summary
    • Subtotal: The total cost of all items
    • Shipping Cost: The cost of shipping the items if applicable.
    • Tax Total: The total amount of tax applied to the order if applicable
    • Total Cost: The total cost of the order.

Order Summary Fields


Quick Selection

Send a message to the user displaying quick reply items.

Quick Selection fields

  • Return Media As: Determine how the quick replies will be displayed in regards to the conversation.
    • Next Question: This will replace the question for the next state with the attachment.
    • New Comment: This will add a new comment without affecting any of the other conversation states.
    • Current Answer: This will replace the current state's answer with the attachment.
  • Message: A message that will be displayed along with the quick reply options

Quick Selection Fields

  • Quick Replies: An array of up to ten quick reply buttons that will be displayed.
    • Content Type: The type of quick reply that will be displayed. The options are:
      • Text: This is the default option and will display a postback button that you define with the other parameters.
      • Location: This will create a location request button. This will return a location value that can be parsed with the sys-location system context.
    • Title: The text displayed on the quick reply button. This is not used for location buttons.
    • Postback Value: The postback value returned to converse when the button is invoked. This is not used for location buttons.
    • Image URL: An optional image icon URL that is displayed alongside the button title. This is not used for location buttons.

Quick Replies fields


Sender Actions

You can use Sender Action modules to let the user know that you are processing their request without having to reply. This will also allow you to mimic the behaviour of chatting to another user instead of a bot.

These modules do not require any parameters defined when using them.

  • Mark Seen: Mark the last message as seen.
  • Typing Off: Turn the typing indicator off.
  • Typing On: Turn the typing indicator on. The typing indicator will automatically turn off after 20 seconds.