How to build the Decision Tree Bot

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

aogbot.YES.EOC

The EOC indicates end of conversation.

If the user answers Yes to the previous question, we will end the conversation.

aogbot.NO

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.

learnbasics.NO.EOC

nodejs.NO

nodejs.YES.EOC

programmer.NO

programmer.YES

python.NO.EOC

python.YES.EOC

technical.NO.EOC

technical.YES

Download agent ZIP file

You can get the agent ZIP file from my Dialogflow Messenger Example Bots course.

>