Home / DialogFlow ES / How to collect user input without follow up intents in Dialogflow ES
DialogFlow ES

How to collect user input without follow up intents in Dialogflow ES

First published: Nov 2017 | Last updated: May 2022

Sometimes I see questions like these in the Dialogflow forum.

So, I got one intent working. How can I now “move” the conversation to the next intent?

Answer

In Intent1, declare an output context called contextA. In the next intent you want to fire, use contextA as the input context. You have now chained Intent1 and Intent2 using contextA.

Is that all?

There is quite a bit more. But that’s the basic idea for every intent you are trying to chain into the conversation.

An example

Let us take the example of the follow up intent tutorial, and use it as an example.

You cannot use follow up intents in all scenarios. Learning this technique will help you in such situations. Under the hood, what I am describing here uses the same idea. Also, this technique usually makes it easier to maintain your chatbot.

Add a new intent called addwebsitechatbot and add the following details. Set the output context as await_name and change the lifespan to 1

Now add another intent called userprovidesname and add await_name as the input context and await_email as the output context. The training phrase will be an example name, such as John Smith. You have now “chained” the two intents together as I have described.

Now create another intent called userprovidesemail and add the details below. You have now chained userprovidesemail intent to userprovidesname intent – meaning you can move from the latter to the former in your conversation flow.

To complete the steps, add another intent called userprovidesurl and add the following details. Notice that this has no output context, because we do not wish to chain an intent after this one. That is, we reach the end of the conversation when this intent fires.

Now test the bot using the Dialogflow Messenger integration

<— End of article —>


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
"Much clearer than the official documentation to be honest"

Thanks a lot for the advice (of buying and following your videos)! They helped a lot indeed. Everything is very clear when you explain, much clearer than the official documentation to be honest 🙂

Neuraz T
Review for Learn Dialogflow CX
"I will strongly recommend this course because even I can learn how to design chatbot (no programming background)"

I think Aravind really did a great job to introduce dialogflow to people like me, without programming background. He organizes his course in very clear manner since I have been a college professor for 20 years. It is very easy for me to recognize how great Aravind’s course is! Very use-friend and very easy to follow. He doesn’t have any strong accent when he gives the lectures. It is so easy for me to understand. Really appreciate it.

Yes, I will strongly recommend this course because even I can learn how to design chatbot (no programming background) after studying Avarind’s course, you definitely can!

Ann Cai
Review for Learn Dialogflow ES

Similar Posts

  • Thanks, how could we got entity “name” from the first intent and use it in response in last intent? in other words, how to move entity values from one intent to another?
    Best Regards.

  • Hi,

    I have 2 intents. “Category” and “Licensing”. In the first intent Category, it will prompt enter “Licensing”, “Sales”, “Tech-Support”. I entered “Licensing”. User prompted saying, “you will be redirected to Licensing soon..” . How I can redirect to “Licensing” intent without user intervention?

    Thanks,
    Anil

  • Great! Thanks for sharing knowledge. What about if my first intent it is using the main console and my second intent it is working with fullfilment, how can I jump in to that?