How to build better Dialogflow Messenger bots using these four obscure features
Dialogflow Messenger How To
In this article, I will show you 4 features in Dialogflow Messenger which are somewhat obscure – in the sense that many people use the Dialogflow Messenger integration without really learning about them.
And in my experience, almost no one knows ALL four of them.
1 Clicked suggestion chips are recognized as normal text message
Recently, I was on a live chat with someone who was interested in the BotFlo app.
And I pointed out that instead of using the List response, he could just use the suggestion chips. At which point he said “Hm, clicked suggestion chips will be recognized as normal text message?”
Yes they are.
Here is an example from my CX bot which helps you choose between ES, CX and Actions Builder.
2 Use the button type for clickable hyperlinks
The Dialogflow Messenger button type includes an EventEvents are used in both Dialogflow ES and Dialogflow CX as t... More in the custom payload. Unfortunately, this is quite misleading.
If you remove the Event field, it behaves just like a regular clickable hyperlink and can be used for that purpose if you are building an FAQ bot which responds with hyperlink answers.
3 Use the df-response-received event for conversation logs
There are enough “hooks” in Dialogflow Messenger to extend its functionality in some important ways.
A perfect example of this is to create logs of your conversations. You can use the df-response-received event, which contains the full JSON payload of both request and response, and can be used to create fairly comprehensive conversation logs.
4 Get a quick preview using renderCustomCard function
Typing out the rich response JSON can be quite tedious in the Dialogflow Messenger.
In my BotFlo app, you can actually get an instant preview of rich response types such as suggestion chips, clickable hyperlinks, cards and list using this feature.
When the user clicks on the Preview button, you see that the JSON is instantly rendered in the chat widget on the same page. I do this by using the renderCustomCard function.
Note: This is my old website and is in maintenance mode. I am publishing new articles only on my new website.
If you are not sure where to start on my new website, I recommend the following article:
Is Dialogflow still relevant in the era of Large Language Models?