Redirecting from one intent to another in dialogflow

Viewed 839

I am trying to transition between intents. I have welcome intent and based on user response, I want to either redirect to Search intent or to CheckInternet intent.

I have given output context as search and interconnection in Welcome intent and then given them as input context in relevant intents. But still not able to chain them together. Unfortunately, I don't have knowledge of Dialogflow yet, as using this for hackathon first time to check its capabilities. Any help would be great

2 Answers

Intents in Dialogflow aren't nodes in a state machine. You don't "transition" between them. Intents reflect what the user says or does.

So, to give your example:

  • When they start the agent, the welcome Intent is triggered based on the welcome event.
  • If, at any point, they say "search", then the training phrases in the Search Intent might match, so the webhook or responses for it would be triggered.
  • Or, if they said "check", then the training phrases in the CheckIntent Intent might match, so the webhook or responses for it would be triggered instead.

If you need to limit under what circumstances these phrases would be accepted by an Intent, you can add a Context and make sure that Context is valid. But you usually only want to add that once you get it responding in the more general case.

You would have to add both Search and CheckInternet as "Follow-up Intents". To do so, create two new Intents and assign the contexts search and interconnection to them respectively as Input Context.

When the user says something that should lead to Search, set search as output context and for the next utterance Search Intent will be considered (if sample utterance match).

I hope that's clear enough, I'm happy to explain that in detail, too. This way I configured a nicely working Chatbot with 20+ Intents once :)

Related