How to customize Fallback Intents for Interactive Canvas Actions

AoGProTips: How to customize Fallback Intents for Interactive Canvas ActionsMissed our weekly video? Don’t worry, watch this week of #AoGProTips ????https://medium.com/media/207f31d9bf4d8dc72c4448927b396c0b/hrefOne of my favorite moments when building a conversational Action for the Google Assistant is discovering unexpected user input. Like any daily conversation, the path of Assistant dialogs can be unpredictable. They are often based on each individual’s experience and cultural background. Each user may have a different answer to the same Assistant question. So why is this so exciting?Turn the unexpected into a delightful experience for your usersWhen the Google Assistant receives an unexpected or no match input from the user, the fallback intent gets triggered, allowing the Assistant to get the user back on track by letting them know what they can do at that point in the conversation.Imagine reaching into a big prize bowl and getting the same prize every time. That doesn’t sound li

How to customize Fallback Intents for Interactive Canvas Actions

AoGProTips: How to customize Fallback Intents for Interactive Canvas Actions

Missed our weekly video? Don’t worry, watch this week of #AoGProTips ????

https://medium.com/media/207f31d9bf4d8dc72c4448927b396c0b/href

One of my favorite moments when building a conversational Action for the Google Assistant is discovering unexpected user input. Like any daily conversation, the path of Assistant dialogs can be unpredictable. They are often based on each individual’s experience and cultural background. Each user may have a different answer to the same Assistant question. So why is this so exciting?

Turn the unexpected into a delightful experience for your users

When the Google Assistant receives an unexpected or no match input from the user, the fallback intent gets triggered, allowing the Assistant to get the user back on track by letting them know what they can do at that point in the conversation.

Imagine reaching into a big prize bowl and getting the same prize every time. That doesn’t sound like fun, does it? Now imagine having that same experience in a conversation. It would be a much better experience if we provided a variety of responses to nudge users back to the topic. In this blog post, we will look at how to customize the fallback intent and take advantage of the full screen experience for the Google Assistant Smart Displays.

Default set up of a Fallback Intent

When you create a Dialogflow agent, your project automatically contains a fallback intent, which is called the “Default Fallback Intent”. This fallback intent includes a list of pre-populated responses, which may not be suitable for your Action. To create a more relevant dialog, you can customize these responses.

The standard behavior of a fallback intent is a spoken prompt. In the case below, the phrase “ What was that? “ neither helps users get back to the conversation, nor drives it forward.

In one of our experimental, open-sourced Actions called Virtual Pet, assuming the user wants to feed their pet, we expect the user to choose a food type at this point of the conversation. However, the user replies with a food type that the action doesn’t support, such as “ banana.” With a customized fallback intent for this particular scenario, you can drive the conversation forward by using a question, for example: “ Sorry, I didn’t get that. But you can feed Larry broccoli, seeds or carrots. Which one do you want to feed Larry? “. By providing the user with supported input options, the conversation won’t stall out waiting for them to guess an option that the Assistant will accept, and makes the conversation flow more naturally.

Engaging with the user through the screen

Since we are using the Interactive Canvas API, we can take advantage of the full screen to give visual cues of objects that the user can interact with. As you can see in the image below, we highlight the food options such as broccoli, seeds and carrots.

Telling the client what to do visually with HtmlResponse

Now let’s take a look at the code. You can implement a custom fallback intent with Interactive Canvas. The first thing you can do is to send back a Simple Response, which verbally tells the user what they can do. Next, sending back an HtmlResponse to tell the client app on the Smart Display what to do visually. In this particular scenario, the client will highlight the options of the food type, i.e broccoli, seeds and carrots. To do that, the server needs to send back some information to the client in order to know what options to highlight. We send the information over by using the data property within the HtmlResponse.

When building an Action with Interactive Canvas, remember to customize your fallback intent audibly by crafting the best fallback response and visually to drive the conversation forward so that your user will have a more interactive and engaging experience. You can learn more about how to craft the best fallback response from our conversation design guidelines

Learn more

Watch the companion AoGProTips video of this blog post to learn more about the interactive canvas API. You can also read the documentation. Find a sample game that uses Interactive Canvas on actions-on-google-labs repository.

Join us on Reddit at /r/GoogleAssistantDev and follow @ActionsOnGoogle on Twitter for more of our team’s updates. Tweet at us using #AoGDevs to share what you’re working on. Can’t wait to see what you build!

Originally published at https://medium.com on February 26, 2020.


How to customize Fallback Intents for Interactive Canvas Actions was originally published in Google Developers on Medium, where people are continuing the conversation by highlighting and responding to this story.

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow