How to Use Rich Messages in Chat
Overview
Kommunicate provides the way to implement the rich messages using Dialogflow custom payload, Google Assistant and Amazon lex custom mark up feature.
Check out the following sections to continue further with the implementations:
- Dialogflow rich messages using Google Assistant
- Dialogflow rich messages using Fulfillment
- Amazon Lex rich messages using Custom Markup
- Rich messages using Custom Payload - supported in all bot platforms
Custom bots
If you are using custom bots, pass the Rich Message template as metadata in the message. Learn more about using Rich Message in custom bots here.
Kommunicate renders a valid JSON into Rich Message. Pass the JSON described below as metadata to utilize Rich Messages. This example renders Suggested Replies along with the message:
{
"message":"Do you want more updates?",
"ignoreTextResponse": false,
"platform":"kommunicate",
"metadata": {
"contentType": "300",
"templateId": "6",
"payload": [{
"title": "Yes",
"message": "Cool! send me more."
}, {
"title": "No ",
"message": "Don't send it to me again"
}]
}
}
If you're passing both the text response and custom payload in intent and want to hide the text response you can pass ignoreTextResponse: true
.