Skip to content

Template Payload

The generic template allows you to send a structured message that includes an image, text and buttons. A generic template with multiple templates described in the elements array will send a horizontally scrollable carousel of items, each composed of an image, text and buttons.

[source]

GenericTemplatePayload

fbotics.models.payloads.generic_template.GenericTemplatePayload(template_type=generic, sharable=False, elements=None)

The generic template is a simple structured message that includes a title, subtitle, image, and up to three buttons. You may also specify a default_action object that sets a URL that will be opened in the Messenger webview when the template is tapped.

Arguments

  • template_type: Value must be generic.
  • sharable: Optional. Set to true to enable the native share button in Messenger for the template message. Defaults to false.
  • elements: An array of element objects that describe instances of the generic template to be sent. Specifying multiple elements will send a horizontally scrollable carousel of templates. A maximum of 10 elements is supported.