Quasipickle
Quasipickle

Reputation: 4498

How to make a Dialogflow fallback for specific intents

I'm trying to make a chatbot to allow users to book items. I have 2 departments with items, so I have made 1 intent for each department. Department A has boardgames, Department B has computer equipment.

I've set up my intents so a user can ask "I want to book Monopoly" or "I want to book a laptop" - those queries work.

Now, I want to be able to handle the user asking "I want to book a room". That query won't match any of the training phrases for either of the departments, but I do want to give the user a context-specific answer of "We don't have that item available".

How to I configure an intent to match "I want to book [noun]", where [noun] is an unknown thing?

Upvotes: 0

Views: 246

Answers (1)

Quasipickle
Quasipickle

Reputation: 4498

We solved this by creating a Book "anything" intent. It uses the built-in @sys.any parameter. So we defined phrases like "I want to book @sys.any". This intent seems to be matched only if the intents for department A and B do not match. In this way, it is a fallback of sorts that matches for all booking questions for unknown "things"

Upvotes: 1

Related Questions