In this tutorial, I explain how you can use the Dialogflow Messenger to create a decision tree chatbot.
As the name implies, a decision tree chatbot is a bot which asks a set of questions and helps the user make a decision.
What we are building
We will be building a bot which helps the user to decide the programming language to use for their Dialogflow chatbot.
You can interact with the bot here.
Here is what the flowchart for this bot looks like. If you would like to learn more about the conventions used below, check out my article about Dialogflow flowcharts.
Now let us go through the intent definitions.
Default Welcome intent
Notice the following:
- the intent contains the Welcome event
- it includes the training phrase "Start Over"
- the custom payload has the JSON required to render suggestion chips for Yes/No choices
The EOC indicates end of conversation.
If the user answers Yes to the previous question, we will end the conversation.
If the user says No to the first question, we will set another output context and proceed to ask the next question.
We will follow the same pattern to fill out the rest of the intents.
Download agent ZIP file
You can get the agent ZIP file from my Dialogflow Messenger Example Bots course.
- Dialogflow Messenger Quiz Bot
- Dialogflow Zobot: Selection Triggers the next intent
- Integrating Dialogflow with Zoho live chat
- 5 things you cannot do using the Dialogflow Messenger integration
- Dialogflow Architecture
- Dialogflow Python webhook tutorial
- Dialogflow training
- Dialogflow vs Lex vs LUIS vs Watson vs Chatfuel
- Convert your WordPress website into a Dialogflow FAQ chatbot
- Dialogflow Messenger Interactive Learning Bot