Integrating Dialogflow with Google Assistant

58 views
Skip to first unread message

Mohamad Hossein Miraftabi

unread,
Mar 19, 2021, 7:54:31 AM3/19/21
to Dialogflow Essentials Edition users
Hi,

I have created a food related application using Dialogflow in which a user says the name of a food (like Oreo Cheesecake Pops) and then my application gives him/her the step-by-step instruction for preparing that food. 
When I test my application on Dialogflow console it works fine - receives the user input, passes it to my webhook, gets the instruction, and then displays it to the user. However, when I test my app on Google Assistant, it does not work the way it should work. When the user says the name of the food (like Oreo Cheesecake Pops), Google Assistant leaves my application and uses Google Search Engine to find the recipe for that food and then displays it to the user. 
My question is, how can I prevent Google Assistant to leave my application, and instead sends the query to my webhook to get a response from there.

Regards,
Hossein

Allen Firstenberg

unread,
Mar 19, 2021, 8:39:19 AM3/19/21
to Mohamad Hossein Miraftabi, Dialogflow Essentials Edition users
This is likely because you are handling those questions using a Fallback Intent. A recent change with how Actions on Google works means that the Assistant will close your Action and handle the user statement itself under these conditions:

* You are handling it through a Fallback Intent in Dialogflow or through a No Match Intent in Action Builder *and*
* The phrase is one that the Assistant can handle itself

You don't get any indication that it is doing so.

To work around this problem, you should use an Intent that matches a phrase with the the `@sys.any` type in Dialogflow or an intent that accepts "free form text" using Action Builder.


--
© 2020 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Dialogflow Essentials (f.k.a. Enterprise) Edition Discussion Google Group (dialogflow-essent...@googlegroups.com; former email: dialogflow-enterp...@googlegroups.com) to participate in discussions with other members of the Dialogflow community and the Dialogflow Team.
---
You received this message because you are subscribed to the Google Groups "Dialogflow Essentials Edition users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dialogflow-essentials-e...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dialogflow-essentials-edition-users/4d57217a-976f-4d92-9458-98bfc81c7bc7n%40googlegroups.com.

Mohamad Hossein Miraftabi

unread,
Mar 20, 2021, 1:00:51 PM3/20/21
to Dialogflow Essentials Edition users
Thank you so much for your reply.

The problem with using '@sys.any' is that regardless of what the user says, Google Assistant matches it to the intent having '@sys.any'. In other words, Google Assistant completely ignores other intents and all user inputs are matched to the '@sys.any' intent. It seems that the intent having '@sys.any' has the highest priority, so all queries are end up using this intent.

Do you have any workaround for that?

Regards,
Hossein

Allen Firstenberg

unread,
Mar 20, 2021, 2:09:04 PM3/20/21
to Mohamad Hossein Miraftabi, Dialogflow Essentials Edition users
You have a few options.

The first is that you can lower the priority of the Intent. The blue dot next to the Intent name towards the upper left indicates this is "Normal" priority. You can click on the dot and change it to "Low".

Dialogflow.png

Alternately (or additionally) you might want to set an Input Context for the Intent with @sys.any and make sure you set that context as an active context when you're looking to get the undefined input.


Reply all
Reply to author
Forward
0 new messages