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
Default welcome intent (download)

aogbot.YES.EOC

The EOC indicates end of conversation.

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

If user says Yes for building an AoG app, the bot recommends NodeJS as the programming language, ends the conversation and provides an option to start over (download)

aogbot.NO

If the user says No to the first question, we will set another output context and proceed to ask the next question.

If user is not developing an Actions on Google app, we will move on to the next question (download)

We will follow the same pattern to fill out the rest of the intents.

learnbasics.NO.EOC

Download this intent

nodejs.NO

Download this intent

nodejs.YES.EOC

Download this intent

programmer.NO

Download this intent

programmer.YES

Download this intent

python.NO.EOC

Download this intent

python.YES.EOC

Download this intent

technical.NO.EOC

Download this intent

technical.YES

Download this intent

ℹ️ All Courses | ? How to unlock all lessons (free) | ? Live chat

>