FaisalAhmed
FaisalAhmed

Reputation: 3651

Dialogflow followup intent creates new context for every new child intent

I am working on dialogflow follow up intent.And structure is something like this.

enter image description here

It create new context for every new intent.

enter image description here

for example see in repeat intent

enter image description here

when ever I create any new intent it create new context for it. As you can see in image. When I try to remove any one of those context it remove that intent as followup intent.

So my question is:

This is how dialog flow works or i am doing something wrong.

Upvotes: 2

Views: 1692

Answers (2)

Prisoner
Prisoner

Reputation: 50701

This is how Dialogflow works. You're not doing anything wrong. (Are the Contexts causing a problem of some sort?)

Followup Intents are just shortcuts for creating separate Intents and giving them an Incoming Context to make sure they can only be triggered after an Intent with the corresponding Outgoing Context. You don't need to use Followup Intents - they're just a convenient way to force that Intent to only be triggered after the parent Intent.

If you need an Intent to be triggered either after the initial Intent or at any time - you don't want this as a Followup Intent, just make it a regular Intent. It can still be triggered after the original Intent.

Followup Intents are useful for limited answer handling after a question, but they're not useful for everything, particularly if the user can make free-form comments at any time (which is common during a conversation!). Don't feel you have to be limited and use them.

Upvotes: 4

Tejas Bramhecha
Tejas Bramhecha

Reputation: 888

In Dialogflow, contexts are used to bind intents & direct a user to a certain direction. Output of one intent goes to input of another one so unless & until you call first intent, you won't be able to call second one.

Now coming to your question, with follow-up intents, you can design situations that may follow parent intent. What you're saying is correct, creating follow-up intents will automatically create new contexts. When you try & delete these auto-created contexts, it will remove intent as follow-up intent as well. This is how it has been designed, there's nothing you can do about it.

Although if you'd like to make existing intent as follow-up of another one, you can do this via REST API, you just have to update the “parentId” and “rootParentId” of your existing intents, the change will be reflected on the UI.

Upvotes: 2

Related Questions