Search code examples
google-cloud-platformdialogflow-esactions-on-googlegoogle-assistant

Google Action showing Invocation Error instead of triggering Fallback intent


The scenario:

I have a google action that is used to deliver voice surveys. It is controlled by dialogflow ES and has two main intents. A welcome intent and a fallback intent. The welcome intent is used to detect the name of the survey that user would like to open and this is stored in a parameter called "surveyname". "Surveyname" is then passed to our webhook where the survey is opened, the user is welcomed, and initial question is asked. All other subsequent interactions are picked up by the fallback intent, which calls our webhook which controls the flow of the survey and provides the google action with the subsequent questions. The subsequent interactions could include any phrase as I could have a survey asking any question on any topic.

The problem:

Up until extremely recently, my google action worked perfectly fine. But I have encountered a problem where the Google Assistant App will on occasion forcefully leave the action and exit the conversation. For example a user may input "yoga", and Google Assistant will leave the conversation and do a google search for yoga. When I test this phrase in the "Test" page of the action console I can see no request or response body, only "Invocation Error". Along with the message "You cannot use standard Google Assistant features in the Simulator. If you want to try them, use Google Assistant on your phone or other compatible devices." When I test in the "Try it now" box in Dialogflow ES itself, I can see the correct fallback intent, webhook request, and response. But I cannot see the phrase that was said in the Google Assistant app in the "History" tab of Dialogflow ES; it looks like it never made it that far. This suggests to me the problem is with either Google Assistant or the action itself, rather than Dialogflow.

Invocation Error

The current (less than ideal) work around:

I understand that fallback intents have a lower priority that regular intents. I believe there is an internal tussle going on between the fallback intent and Google's implicit invocation. My current temporary solution is to create a new intent called ActiveSurvey, and with this custom intent hope to capture some of the input phrases that are being missed by the fallback intent. This appears to work somewhat, but I can't ever hope to capture all input this way, as the user could quite literally say absolutely anything. Considering it used to work, in my mind this shouldn't be necessary.

The questions:

Why has this happened now?

Is there some setting I'm missing that has caused this to happen?

Or is the design of the action incorrect?

Any help much appreciated thank you.


Solution

  • Starting in October 2020, and expanding further in January 2021, Google began implementing a feature called no-match yielding, although this was not listed in the documentation until February 2021.

    Under no-match yielding, Google will close the Action and handle it itself if both of these conditions are true:

    • 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

    The workaround for this under Dialogflow is to have an Intent with a single phrase with a parameter that matches the @sys.any System Entity type and to use this Intent (and the parameter) for your processing instead of a Fallback Intent.

    Fallback Intents should only be used in cases where the user input cannot be routinely handled (ie - you want to say that you didn't understand, or it is an error).