10 tips for building better Actions (Google I/O ’18)
Articles Blog

10 tips for building better Actions (Google I/O ’18)

August 26, 2019


[MUSIC PLAYING] TORI BURMEISTER: I’m Tori. SUNIL VEMURI: And I’m Sunil. I’m a product manager
on Actions on Google. TORI BURMEISTER: I’m a
partner technology manager working on Actions on Google. SUNIL VEMURI: When we
first billed this session, we said it was 10 tips for
building better actions. Well, when we
previewed this talk, the feedback we universally
got was more tips. So we’re adding two more tips. TORI BURMEISTER: I’m really
excited to be working on actions in
Google, because I see this as a next step in
the evolution of computer interactions. I remember the first time
I typed in a web search and received the
list of blue links. It opened up a whole new
world of exploration. I also remember when I
became fully dependent on my mobile phone, checking
directions, the weather, finding friends in a crowd. It really changed
the way I lived. And now, with the assistant
and Actions on Google, I’m really excited to see how
conversational dialogues really change the way we
interact with computers. SUNIL VEMURI: And to
the techs in the back, we lost the monitors up here. So if you can fix that please. So we want to take us to this
next evolution in computing. We are offering the
Actions on Google Platform. And we’re here to
show you not only how to be part of the next
evolution but to excel at it. Actions on Google is
the developer platform for the Google Assistant. With it, you can provide
your products and services via the Assistant. With over 500 million devices
running the Assistant, there’s a great
opportunity for you. We’re not here how
to tell you how to build an Action for an
Assistant from scratch. There are other sessions
at I/O covering that. We’re here to give you the
top 12 tips that all of you can use to build great actions. And when you build
great actions, not only do you
delight your users, but it opens the doors to
get your actions noticed. Throughout this talk, we’re
going to mentioning two tools– first, the Actions on
Google Console, or sometimes affectionately known
as the Console. This is where you create
and administer your actions. Second, Dialogflow–
this is where you build your
conversational actions and it includes a lot
of the natural language capabilities that are essential
for making great actions. Let’s dive in. We’ve bucketed the tips
into three categories. First, design– this is
how you make a great action and avoid some of
the common mistakes. Second, enhance–
this is how you can make your action stand out. And third, grow–
this is how you can get your action to more users. TORI BURMEISTER: Having a good
design is what delights users. Let’s start with four common
mistakes and solutions to make a great design. Tip 1, make your conversation
as simple as possible, but no simpler. Do you know someone
who talks too much? Well, an action can too. When users interact,
keep it simple. Users don’t need
every option up front. Guide them to the
most used portion, and then make options
available if they asked. Now, we’re going to
act out a conversation. Sunil will be playing the
exciting role of an action, and I’ll be the user. SUNIL VEMURI: Welcome
to sounds of relaxation. Are you trying to sleep,
meditate, cool down, think, or reflect? TORI BURMEISTER: Reflect. SUNIL VEMURI: Great. We have something for that. Would you like to also include
ocean waves, crackling fire, wind blowing, or birds
chirping with that? TORI BURMEISTER: Sure, birds. SUNIL VEMURI: Do you want this
for 5 minutes, 30 minutes, or an hour? TORI BURMEISTER: 30 minutes. SUNIL VEMURI: Find a nice
place to sit or lie down. Are you ready? TORI BURMEISTER: Yes. SUNIL VEMURI: OK, here’s your
30-minute relaxation sounds with birds chirping. TORI BURMEISTER: Wow. That was tedious. I’m definitely not in a relaxed
state of mind after that. We recommend you keep
the conversation simple and get the users
quickly to the delight. Let’s take a look at
another example that keeps the conversation simple. [VIDEO PLAYBACK] – Hey Google, talk to Headspace. [BLEEP] – Great to hear from you again. Which session would
you like today? Wake up, take a
moment, or unwind? – Unwind. – So it’s the end of the
day and time to wind down. So just finding a
comfortable place– [END PLAYBACK] TORY: Much better. Let me go back. And don’t auto play it again. Thanks. [CHUCKLE] They get the user quickly
to where they want to go. In a conversational
dialogue, we know users drop off each time
another question is asked. So the fewer steps to
complete a task, the better. Keep your users engaged by
avoiding needless banter. Tip 2, add a persona. We want simple
conversations, but users also want to feel connected and
engaged with your action. Developing a persona
or a personality and incorporating
it into your action really brings it to life. Take, for example,
a pizza restaurant. There are many types
of pizza restaurants. There is that upscale brick
oven pizzeria, or that New York walk-up where you can
grab a quick slice, and the local
beach-side local spot. Each one is going to
communicate in a different way. And your action
can exemplify this. By defining a
thorough persona, you can draw users into your action. We’ll do some acting again. Sunil will play the pizza
action, and I’ll be the user. SUNIL VEMURI: Hello, what
would you like today? TORI BURMEISTER: Pizza. SUNIL VEMURI: OK, what
toppings would you like to add? TORI BURMEISTER:
Pretty bland, right? It’s fine. But I’m not sure we expressed
anything about our brand or who we are. Let’s try it again. SUNIL VEMURI: Cowabunga, dude. What can I getcha? TORI BURMEISTER: Pizza! SUNIL VEMURI: Great! What flavor do you crave? TORI BURMEISTER: Maybe we’ve
taken this one a little far, but you get the idea. Our persona is a local surfer. Personality can’t be avoided. It’s human nature to attach
personality to things. And we’re hardwired
to look for meaning in the things around us. People will attribute a
personality with your action regardless of whether you
think about it or not. It’s better to control the
perception and define it. Well-defined personas
also increase the emotional connection. This leads to increased usage,
retention, and brand loyalty. Things to think about when
you’re defining your persona is what state is the
user going to be in? Are they looking to relaxed? Are they excited? And based off of that, what
role should your agent play? Looking at these
attributes, these are a couple of
different options. The first might be
a teacher, someone who is patient and
helpful and encouraging. And then a friend might be
playful, casual, and silly. Whereas a helper,
you’re going to want to be attentive and
proactive and succinct. We recommend you define the
persona at the design phase and then shape your
conversation around it. It can make a big difference. SUNIL VEMURI: Tip number 3,
users can be unpredictable. They can use products in ways
that we don’t always expect. In the case of
conversational actions, they might say something
that you didn’t anticipate. Let’s try this dialogue. This time I’ll be the user
and Tori will be the action. I’d like an ice cream cone. TORI BURMEISTER: Yummy. What size do you want? SUNIL VEMURI: A double. TORI BURMEISTER: Sorry,
what size do you want? Small, medium, or large? SUNIL VEMURI: OK, the
grammar was not robust. The action didn’t understand
a common variation of medium, in this case, I said double. Now, I don’t know about you, but
I’ve been to ice cream shops. And you can ask for different
sizes in different ways. So you want your grammars
to be able to handle all of these different common
variations that might come up. Let me show you how
you can approach this. Using Dialogflow, there’s
a simple way to do this. First, training
phrases– this is where you can include some
of the common different ways somebody might say
the same phrase. So for example, can
I have a medium? I’ll have two scoops. A double, please. You can include all of
these different phrases in the training phrase
section so that the system will understand
that users might ask for things in different ways. The second is synonyms. Let’s take another
example, rain boots. So there are many different ways
somebody might say rain boots. It could be gumboots,
galoshes, wellies. You can include all of these
different kinds of synonyms and variations as part of
the interface and Dialogflow so that users will be able
to give their responses with these kind of variations. But there’s another part. The more examples you
give, the better Dialogflow can learn from those
examples because it does have learning capabilities. And then it can learn new
ways that the user has expressed these same concepts. So more examples, the better. Let’s take a look
at an action called Timeout that illustrates this. Timeout tells you about
events in the United Kingdom. On this first screen,
Timeout is asking for a day you like to go out. The user responds
with, I don’t know. Instead of asking
the user again, Timeout recognizes the
phrase “I don’t know” and gives a helpful response. In the second
screen, Timeout again asks if I want to go out
today, tomorrow, or Saturday. Excuse me, today,
tomorrow, or Sunday. The user responded
with Saturday. And again, Timeout handled it– common variations
and things outside of what the prompt asked for. And on the right, the user was
being a little clever here, and they asked for
something funny. Timeout responded with humor,
so kind of like an Easter egg. So these are some of the ways to
make your actions more robust. But there’s more to
conversational excellence. Users can still say
unexpected things. And when people
talk to each other, if the listener doesn’t
understand the speaker, they work cooperatively
to figure it out. They ask for corrections
or rewordings or try to give
some hints to help move the conversation forward. Let’s take a look
at an example here. TORI BURMEISTER:
When is the event? SUNIL VEMURI: Tomorrow. TORI BURMEISTER: I
don’t understand. When is the event? SUNIL VEMURI: Uh, Wednesday. TORI BURMEISTER: I
don’t understand. When is the event? SUNIL VEMURI: Wednesday! TORI BURMEISTER: I
don’t understand. When is the event? SUNIL VEMURI: Argh! Frustrating! But I’m sure you’ve
heard something like this before when
you’ve talk to a computer. This is hopefully not
something unfamiliar. The action is repetitive
and unhelpful. It gives the same response. It’s not noticing that
the user is earnestly trying to move the
conversation forward. So here’s what we recommend. For the initial prompt,
you can give that. Now, there’s two types of errors
that we recommend you handle. The first is called no match. This is when the
user says something, and the action didn’t handle it. When this happens you want to
get the user back on track. We recommend the first
reprompt to be what is called a rapid reprompt. You give essentially the
same response or maybe a slight variation but don’t
go too much further than that. And if the user still
doesn’t give something that you can’t
handle, here’s where we call escalating detail. Make it a little
bit more elaborate, perhaps even an
example of what’s something they can say to help
move the conversation forward. And after that,
stop reprompting. Don’t pester the user. We find the sequence
works very well. Now, there’s another type of
error that’s called no input. This means the user
didn’t say anything, or maybe the system didn’t
hear what the user said. Perhaps they were thinking
about what they wanted to say, or they got confused
by the prompt, weren’t sure how to respond. Like no match, we recommend
this three stage reprompting to help the user along. And with these six
reprompts, you’re well on your way to build a
helpful conversation experience that keeps the user on track. Let’s see how to code this. In Dialogflow you create what’s
called a fallback intent. Then, in your web code,
you simply create an array with the three reprompts,
add a counter and some logic, so you return the right prompt. And that’s it. Great design delights users
and keeps them coming back. Remember, keep your dialogue
short, include a persona, make robust grammars that handle
common variations and synonyms, handle errors like no
match and no input. TORI BURMEISTER: So now
you have the design basics. Let’s make it more
fun and personalized. Tip 5, evolve with your user. When you have a follow up
conversation with someone you know, do you
introduce yourself again? If you know their address,
do you ask it again? Same goes for actions. Be there with help and
options when the user needs it but default to the simplest and
most personalized conversation for your user. So here’s a horoscope
action, Tauro Horoscopo. It’s in Portuguese. And if you don’t
speak Portuguese, and you don’t happen to
have Google Translate handy, let me tell you
what’s happening. The first time the user
launches the action, it asks for the horoscope sign. On subsequent launches, it
doesn’t and simply reuses the previous answer. This is great. Something as simple
as that could create a much better
experience for your user. Another iteration
on this could be when the user
invokes the action, you just give them their
horoscope right away. There are plenty examples
of good personalization. If you’re a food action, you can
remember that I’m a vegetarian and focus on those choices. If you’re a fitness action,
you can remember workouts, sounds, durations
that the user likes and use those as the defaults. Now we’ll take a
look at the code. With a user info API, you
can get the user’s name, anonymize user ID, and more. You could use this
to know if it’s the same user on
subsequent invocations. There are also more robust
solutions using OAuth for logged in experiences. So here in the code you
can see we’re checking if we’ve seen the user before. If we haven’t, we
do the introduction. If we have, we attempt to
retrieve the horoscope sign and then continue on
with the conversation. What we want you to
remember from evolving with the users is, one,
get rid of the intro if the user is familiar
with it, and two, become more personalized
as you learn about them. Don’t keep asking for things
that you already know. SUNIL VEMURI: We’ve all
heard computer generated text to speech. It’s the technology that
takes text and converts it into speech. And Google offers some
really nice text to speech. But do you know
what’s even better? Media. Here’s two tips for
the price of one to make your actions
sound awesome. First, the media response API– this let’s you include
media clips in your action. Suppose I’m building an action
that plays famous speeches. I can call this API to include
the actual audio, some images, and with some controls. Let’s give it a listen. [VIDEO PLAYBACK] – Ask not what your
country can do for you. Ask what you can do
for your country. [END PLAYBACK] SUNIL VEMURI: Great. A great way to
include a little bit of media inside of your action. Using the API is
straightforward. Just give the URL to an audio
file, titles, some images, and then hand it to Actions
on Google to play the rest. It’s a great way to bring your
audio content to your users. The second way is through SSML. Let’s say I’m trying to
create a spooky atmosphere for my action. Let’s listen to what this sounds
like with plain text to speech. [AUDIO PLAYBACK] – Come in. Welcome to the terrifying
world of the imagination. [END PLAYBACK] SUNIL VEMURI: Tori,
did that sound creepy? TORI BURMEISTER: I’m
shaking in my boots. SUNIL VEMURI: OK. Didn’t convince her. All right, let’s try
to change it and see how the voice sounds
if I manipulate the voice a little bit. [AUDIO PLAYBACK] – Come in. Welcome to the terrifying
world of the imagination. [END PLAYBACK] SUNIL VEMURI: Spooky now? TORI BURMEISTER:
You’re getting there. SUNIL VEMURI: OK. All right, we slowed
the voice down. Kind of better, not there yet. Now let’s add some
sound effects. [AUDIO PLAYBACK] [THUNDER] [OMINOUS CREAKING] [RUNNING FOOTSTEPS] [DOOR SLAMMING] – Come in. Welcome to the terrifying
world of the imagination. [RUSH OF AIR] [END PLAYBACK] TORI BURMEISTER: I like it. SUNIL VEMURI: All
right, there we go. I got the thumbs up. What a difference. Now we’re talking. Now I’m going to play that
for you one more time, but this time I’m
going to show you the various tracks that were
used to compose this sound. Let’s take a look. [VIDEO PLAYBACK] [THUNDER] [OMINOUS CREAKING] [RUNNING FOOTSTEPS] [DOOR SLAMMING] – Come in. Welcome to the terrifying
world of the imagination. [RUSHING AIR] [END PLAYBACK] SUNIL VEMURI: All
right, what we did here is use two features
of SSML, par and prosody. Prosody lets you fine
tune how the computer speaks by changing the pitch,
speaking rate, and volume. Par is something unique
to Actions on Google. It lets you play multiple
sound layers, including sound effects, background audio,
and mix that with your text to speech. With that, you can
make great sounds in an atmosphere
for your action. To further help you make
a great audio environment for your sound, we have a sound
library with over 1,000 sounds, including ambient sounds,
sports, voices, Foley, and many more. We encourage you to include
sounds in your actions. Tip number 7, adjust
to your device. Earlier at I/O, we mentioned
that the Assistant is on over 500 million devices– smart speakers, phones, watches,
headphones, Chromebooks, cars, TVs. And with the Assistant
SDK, device makers are embedding the system in
more devices all the time. When designing for
multiple devices, there’s a spectrum of
capabilities to consider. Sometimes its voice
only, like a Google Home. And with new smart
screens, there’s a mix of visual and touch. Sometimes the same device
falls on different parts of the spectrum, depending
upon the user’s context, like they’re driving
or the volume is muted. So these are the things you need
to take into consideration when designing for these. Let’s take an example
of a surf report. On a smart speaker
like a Google Home, the report needs to be
presented with just speech. So in this example,
the whole interaction is verbal and through audio. Now, that same one on the
right is with a screen. Here, the audio or the verbal
presentation is abridged, but then now there’s
a visual presentation that goes along with it. And we encourage you to use
these rich visual presentations on devices with screens. And even on the bottom,
on the bottom right, you can see that the choices are
presented as suggestion chips. So the user can
tap on them instead of having to speak on a
device with the screen. And implementing such
logic is straightforward using surface capabilities APIs
and some conditional logic. Now, there is so much
more about this topic. Fortunately, there is a
whole talk about it Wednesday at 11:30 called Design Actions
for the Google Assistant, Beyond Smart Speakers to
Phones and Smart Displays. A great way to see if
your actions are working are putting them in
the hands of users. But you might want to try things
out with a smaller audience before you launch to
a bigger audience. Now, we just released
a new tool that lets you test with
smaller audiences, and there’s two options with it. You can do an alpha release. Your action goes through
a limited review. And this is great to get
early feedback on your action. Give it out to a
small test group. And one of the other
advantages of alpha releases is that the review process is
much shorter, within hours. So that way you can just make
a fix, test it with some users, and iterate very, very quickly
and get that feedback you need. So that when you’re releasing
to a larger audience, you’ve gotten through all the
bugs and all the design issues. The second option is
doing a beta release. This is intended when you’re
near feature complete, and you have a stable version
or a near stable version. Test this with a wider audience. Now, beta goes through the full
typical approval for actions, but there’s an additional
advantage with this. You can control when you take
an action from beta to public. So that way, if you’re
trying to time or release based on your marketing
considerations, you can keep it in beta. And then when you are ready for
it to go live, flip the switch and make it go
live to the public. Now, after you’ve
built your action and test it and launch it, it’s
great to see what happened. How many users are coming back? Or how many users are there? How many are coming back? What problems, if any,
are they encountering? For traditional metrics, like
traffic, errors and retention, there are existing analytics
you can use to see these. You can find the two on
the left on the Actions on Google Console. Retention, like a
cohort analysis, is available through another
tool called Chatbase. Chatbase is a tool that you
can integrate with your action where you can get deeper
conversational analytics. And speaking about
some things that are conversational
and analytic, let’s take a look at something that’s
particular to conversational analytics. And this is called
a session flow. Here, you can see the pathways
a user takes most often. The green paths are the ones
that your action handled. The red paths are not handled. So in this example,
book a hotel, when a user says book a
hotel, that was handled. But when a user says
feedback, it wasn’t handled. Now, when we talked
about no match errors before in the
robust grammars tip, here is where you can see how
often these no matches happen and where you can figure out how
to prioritize addressing these. Both Dialogflow and Chatbase
include a session flow view. And if you need
to drill down, you can see transcripts,
including the individual steps the user went. So you can see what led
up to a potential problem. So you can try to address that. To recap, enhance your actions
to take them to the next level and increase engagement,
personalize it to the user, add sounds, account
for actions running on different types of devices– for example, some with
screen, some not– test it with smaller audiences. And then when you launch,
use the analytics tools here to see what the users are doing. TORI BURMEISTER: So now
you built your awesome app. You want to engage your
users and reach many more. Tip 10, re-engage your users. During normal interactions
with your action, you can ask users to opt
in to receive updates using two subscription models. The first is daily
updates where Google pulls an update at a time
specified by the user. The second is push notifications
where the action can push updates when appropriate. These notifications
work on the phone even if you don’t have
an Android app installed. And now, with cross
surface notifications coming to the Google
Assistant, you’ll be able to reach your users
on speakers, smart displays, and other Google devices. Here’s an example
of tube status. This can keep you up to date
on your commute conditions. Here is an example of the user
configuring the daily update. Here’s what it looks
like when they’re getting the update, as
well as a notification when there are severe delays. Great way to re-engage. If you want the user
to get daily updates, you can actually set this up
using the Actions Console. The second way is in your
web hook in your code. Here, you create a new
register update object. You can put in arguments– here, horoscope sign,
and then the frequency. Other examples of
daily updates are a tip of the day or a surf report. Now, notifications and
updates can be a great way to re-engage with your
users, but they can also be really annoying. You have to be careful
to make it relevant. So use personalization– results
for the user’s favorite club instead of the whole league. Be descriptive–
users will receive the title and the
notification, so describe the content they are
receiving and don’t just list the name of the action. And third, don’t
spam your users– make sure the information
is relevant to them or don’t do it. Tip 11, make your
action easy to discover. We’re working hard to make
sure all great actions are discoverable. And there are three main
ways to get discovered– the first is the Assistant
Explore Directory. The second is when the user
is talking to the Assistant, make sure you come
up as an option. And the third is
action links, which are hyperlinks to
your action which you can add to any surface. The best way to ensure
you’re discovered? Make it good. We check each action, and the
higher the quality, the return rate, health, and
ratings, the more likely we’ll highlight your action. Follow the design principles
in the Developer docs to help guide you. We have some great
stuff out there. There are also several
talks at I/O that will help. Here’s the Assistant
Explore Directory. It’s available on the web at
assistant.Google.com/explore and in an app in
both Android and iOS. The directory is very
important because we see that 30% of our
third party actions are getting
discovered through it. So when a user is
browsing, you want to make sure you get discovered. The first browsing option
are contextual suggestions. These relevant suggestions are
based on the user’s contexts, such as the time
of day or location. The second is
dynamic categories. These are things like
what’s new, what’s trending, what’s popular. And now we have editorial picks. This is a new feature
highlighting high quality actions through
visual campaigns. You now know that
high quality is the key to being featured
in the Assistant Directory. To trigger more naturally
in conversation, use built-in intents. This is currently in preview. It allows actions to trigger
for relevant queries that are more general. These built-in intents provided
common taxonomy for actions across all Google surfaces. Google Assistant
parses the user query and passes it as structured data
so developers don’t have to. Using these general intents is
much more natural for users. In this way, users don’t
have to use your action name. A couple examples of built-in
intents are tell a joke or start a calming activity. In Dialogflow, you can
select the built-in intent you’d like to be associated with
and then add in parameters that can be passed into your action. Today, we’re making the
first set of these intents available so you can give
the Assistant a deeper understanding of what
your action can do. And we’ll be rolling
out hundreds more in the coming months. So the third way to get
discovered is action links. They’re hyperlinks that point
directly into your action. They make your
actions discoverable from any platform
or surface, and they allow users to engage
directly with your action irrespective of how
they found your link. The links can be
added anywhere– websites, social
campaigns, and more. It’s really simple to
set up action links. You need to go into the Actions
console, publish a URL link, and give it a title,
and then share away. A final tip, be helpful
everywhere your users are. We’re launched in more than
25 locales in 16 languages. We recommend engaging
with this global audience as soon as possible. Flicks Bus is a bus
company, and it’s available in multiple
countries and languages. Here, you can see
identical action screens in multiple languages– English, French, and German. And here, we’re
going to show you how to efficiently localize
your action using a third party localization library. The first thing to do is
create a locales directory and a resource file
or a translation file for each locale. In this example, it’s en-us. JSON. That stands for
English, United States. Then, within the file,
you create a constant for each string in your
action along with the string. Then, for each
additional language, you create a new JSON file
and use the same constants but have translated strings. There are many
translation services that can help with this. And then in your web hook, you
use the i18 and node library to do the hard work. Here, you’re going to
configure the i18n object. You’re going to set the
locales you want to support, where the translation
files are located, and your default locale. Then, when the
conversation starts, you’re going to set
that specific user’s locale in the i18n object. And finally, throughout
the conversation, you use these constants instead
of conditional statements. This greatly simplifies
the complexity of supporting
multiple languages. We want to ensure
that the work that you have put into designing and
enhancing your action pays off. These tips will help
ensure you acquire as many users as possible and
keep them coming back for more. SUNIL VEMURI: There are so
many more resources here at I/O to help you build great
actions and learn more about these tips. Look for sessions marked
for Assistant on the agenda. But let me highlight
a few for you. We have sessions
that talk about how to design for smart
displays, Android, and games. You can learn to
enhance your action with transactional capabilities,
a persona, and to personalize. And there’s sessions
on how to set up the alpha and beta releases
that we talked about, and then build and
grow your user base. Finally, we have office hours
and a sandbox where you can talk to members of the team. TORI BURMEISTER: My
team works with hundreds of partners globally, helping
them create better assistive experiences. We’ve seen a lot of
these challenges. And this list is created
from what we’ve learned. We hope that by
sharing these 12 tips, we have given you a head start
in creating great actions. I look forward to seeing how
you innovate in the space and create cool
assistive actions. [MUSIC PLAYING]

Only registered users can comment.

Leave a Reply

Your email address will not be published. Required fields are marked *