Discover each dynamic message template
Last updated: 03 April 2024
You can use templating to dynamically create any of our message types. In this doc, we cover the values each of our button and message types needs to contain to work appropriately.
type
always takes the value of the template you are building. For example, to build a standard message, you will enter "Type": "Standard"
, for a carousel, "Type": "Carousel"
, etc.
Message types
Now, explore each message type and the value they take (including buttons).
Message type | Template | Values |
---|---|---|
Standard |
CODE
|
|
Action |
CODE
|
|
Carousel |
CODE
|
|
Content |
CODE
|
|
Embed |
CODE
|
|
Event |
CODE
|
|
General |
CODE
|
|
Image |
NONE
|
|
Payment |
CODE
|
|
Progress |
CODE
|
|
Quick replies |
CODE
|
|
Video |
CODE
|
|
Send multiple dynamic messages in one step
To send multiple dynamic messages in one step, separate the templates with a simple comma like so:
[
{
"type": "action",
"content": {
"text": "How are you doing?",
"responses": [
{"type": "postback", "label": "BBBBBB", "action": "BBBBBB"}
]
}
},
{
"type": "quick-reply",
"content": {
"text": "Something else?",
"responses": [
{"label": "AAAAAA", "postback": "AAAAAA"}
]
}
}
]
Notice you can send multiple message types in one template using this approach!
Button types
To start, familiarise yourself with the different types of buttons you can append to various message types.
Button type | Template | Values |
Postback |
CODE
|
|
Mailto |
CODE
|
|
Callto |
CODE
|
|
URL |
CODE
|
|
File |
CODE
|
|
Content |
CODE
|
|