Home / DialogFlow ES / Dialogflow Zobot: Selection Triggers the next intent
DialogFlow ES | Website Bots | Zobot

Dialogflow Zobot: Selection Triggers the next intent

Please note: this article refers to Zoho SalesIQ v1. The current version of Zoho SalesIQ (v2) now includes a code less bot builder, which means you don’t really need Dialogflow to build the bot shown in this article.

In this tutorial, I will explain how you can move to the next intent based on a button selection in a Dialogflow Zobot. [1]

What we are building

We will be creating a bot which provides coupons for courses on my course website (to begin with. More features will be added later).


Let us take a look at the flowchart for this chatbot. Please take some time to go through my article on Dialogflow flowcharts to get a background on the conventions I have used in this flowchart.

In addition to my usual conventions, I use two more conventions in this flowchart:

a) The triple slash (///) acts as a separator and indicates a new chat bubble will be used for the content after the three slashes

b) The options provided within parentheses such as (Individual Course) (Course Bundle) (Dialogflow Toolkit) are expected to be rendered as buttons in the actual Zobot

Welcome Message

I think the Zobot team should incorporate the use of the Dialogflow welcome event into their chatbots. For now, you can show a welcome message using the Trigger Response, which is configured when you create your bot.

By the way, if you haven’t already done so, make sure you use the Zobot 1-click Dialogflow integration to first connect your Dialogflow chatbot with Zobot. You can learn more about it here.

This is what I have for the CourseBot:

  "input": {
    "options": [
      "OK, show me the deals"
    "type": "select"
  "replies": [
      "text": "Would you like to see the current deals?"


Let us now take a look at the intents one by one.

Default Welcome Intent

Notice the following:

a) the intent can fire when the user says a greeting message such as Hi or Hello

b) it can also fire when the user says “start over”

c) The custom payload message is the same as the Trigger Response that you saw earlier

Default Fallback Intent

In the default fallback intent, we provide an option for the user to restart the conversation.


When the user clicks on the Show me the deals button, the intent below fires.

Notice the following:

a) the first message provides a link to the actual deal [by the way, yes, it is actually a real coupon and you do get a discount :-)]

b) the second message provides the option to choose a different course

c) we set an output context called await1_different_course


If the user clicks on the “Choose Different course” button, this is how we handle it.


a) the input context is set as await1_different_course

b) the output context is set as await1_course_type

c) the training phrase matches the button text

d) I use an output context lifespan of 1

The user has now been presented with three different options. Here is how we handle these three options.

You can see the basic pattern repeating – set the appropriate input and output contexts, and use the button text as the training phrase.


This is the intent which handles the user clicking on the Individual Course button


This intent handles the choice when user clicks on Course Bundle button.


The following intent handles the case when the user clicks on the Dialogflow Toolkit button.


Here is how we define the intent where the user provides the name for the individual course. Notice that we are using the wildcard entity to capture the whole input.


So this is the final intent we have defined, where the user provides the course bundle name. Once again, I use the wildcard entity to capture this input.

[1] By “Dialogflow Zobot”, I am referring to a chatbot integrated into Zoho’s SalesIQ live chat service using their Zobot integration. I will be referring to these types of chatbots as Dialogflow Zobots from here on.

This website contains affiliate links. See the disclosure page for more details. 
"The magic key I needed as a non-programmer"

The custom payload generator was the magic key I needed (as a non-programmer) to build a good demo with rich responses in DialogFlow Messenger. I've only used it for 30 minutes and am thrilled. I've spent hours trying to figure out some of the intricacies of DialogFlow on my own. Over and over, I kept coming back to Aravind's tutorials available on-line. I trust the other functionalities I learn to use in the app will save me additional time and heartburn.

- Kathleen R
Cofounder, gathrHealth
In this free course, I provide some tips for managing large Dialogflow ES bots without compromising on accuracy.

Similar Posts