0

I am semi-new to Dialogflow, so sorry if this is really simple, but I can't seem to find an answer anywhere. Here's my problem:

I am trying to make a chatbot where if the user says something like "speak to a human", the chatbot just stops talking all together. I know the easiest way to do this is through a server but as I don't have access to one, I am trying to use a workaround where it uses a follow-up intent to catch anything the user says afterward (using @sys.any) and have no response. This works fine if it doesn't understand what I say next, but if I say something that has a specific intent after that (like "hello"), it uses the hello intent instead of the follow-up.

I am looking for a way to prioritize the follow-up intent so that it will catch anything the user says instead of looking for other intents that also match, until the user says something like "speak to the bot".

Is this possible without a server? Please help!

NyW
  • 107
  • 8

2 Answers2

1

Answering in case someone stumbles upon it. This would work well with simple bots, but when you have hundreds of intent you might not want to do this.

  1. Add an outgoing context to the welcome intent with a lifespan of 100. Eg. convo_started.
  2. Add the convo_started intent as incoming context to all the intents.
  3. When your agent intent is hit, reset the context to lifespan 0, so now only your followup intent an be triggered.
Adi.P
  • 370
  • 1
  • 12
0

No, there isn't a way to achieve this.

As you mention, the correct way to implement the behavior you're looking for is by intercepting user requests through your own server.

The server can be very simple; you can see the official Agent Human Handoff sample for a possible implementation.

Daniel Situnayake
  • 2,874
  • 2
  • 30
  • 38