Ready to create a great Action that people will not only want to use but also love to talk to?

Before diving into code, take a moment to step back and approach your conversation experience from the perspective of:

So, human language is complex. This guide walks you through how to design an Action using a Science Quiz as the context to help unravel some of that complexity and take you through the process of creating a persona, designing a multi-step conversation, and tips for how to publish it on Actions on Google.

As you get started, familiarize yourself with our recommended design process methodology. The main steps are:

What is an Action?

With Actions, you can create and integrate your services with the Google Assistant. They are your way to fulfill user requests by enabling a two-way dialog with them. When users make a request, theGoogle Assistant processes this request, determines the best Action to invoke, and invokes your Action if relevant. From there, your Action manages the rest, including how users are greeted, how to fulfill the user's request, and how the conversation ends.

What you will design

In this codelab, you're going to design a character and the dialog for an Action for the Google Assistant, including:

  • Defining the characteristics of your persona
  • Greeting the user in character
  • Creating a multi-step conversation
  • Correct and incorrect responses and "back on track" repair strategies
  • Completing the quiz
  • Getting ready to build your new Action


What you'll learn

Sample dialog and persona design

Understand the user's situation

In order to design a conversation, we first need to know who's talking - on both sides of the conversation. We need to decide who the character the user is talking to is and a bit about what the user wants to do and what they care about.

Once we understand that, we can create a persona that's relevant throughout a conversation that fulfills the user's intent, since we know what their goals and needs are. We will use this knowledge to inform every decision we make throughout the design and prototyping process.

The best way to understand this is to build a journey, considering things like:

What's the user's situation?

What's the user's motivation?

What's the user's expected outcome?

For the purpose of this walkthrough, we will use this example:

Persona by design

Actions are based on social interaction, so people automatically imagine a person that they are speaking to, this includes gender, age, expertise, character, role and lots of other things. This aspect of the experience is called the "persona".

It's important to establish the characteristics and principles of the persona early in the design process so that the persona can be consistently communicated throughout the entire experience.

Values of a persona:

Define your persona's characteristics

Okay, time to roll up our sleeves and get started. First, our persona needs some simple characteristics. To help create relevant characteristics it can be useful to remember the job story.

In this case, the user is playing a science game, it's their first time talking to an Action, and they are expecting to be entertained!

It can also help to identify real-world personas that we can reference, for example Katie's friend Jordan is someone she can totally imagine in a comedy TV show, so she uses him as our persona inspiration:


We now have a sense of identity for the persona, this is a good time to give the persona a name. In our sample, we've called our character Jordan.

We use the sample dialog process to design the typical conversations the user can have with the persona in your Action. It is easiest to start this process by focusing on the ‘happy paths' of the conversation. The happy path assumes there are no technical problems and the user follows the expected path of the conversation. When the happy path is established, we can look at cases where the user goes in an unexpected direction or needs support.

Invocation greeting

Let's start with how your persona will greet users when they first invoke your Action. This is the opportunity for your persona to firmly establish their personality and capabilities in the user's mind. Here's an example, using our Jordan persona:

User: I want to play a science quiz

Assistant: For a science quiz, you might like talking to Jordan's Science Quiz. Sound good?

User: Sure, here's Jordan's Science Quiz!

Jordan: "Hello human, I'm Jordan, I might as well ask you some science questions, I've got nowhere else to be..."

Questions and answers

After users are introduced to the persona, Jordan will start the quiz by asking the first question, for example:

Jordan: "What gas is used to keep party balloons floating? Hydrogen or Helium?"

Suggestion buttons - [Hydrogen] [Helium]

Suggestions are the buttons that people can tap to drive the conversation by touch, they also help people understand what they can say.

Correct answers

If the user responds correctly, we should confirm their correct response before moving on to the next step. You should write the correct and incorrect answer prompts as part of the happy path sample dialogs. For example:

Jordan: "What gas is used to keep party balloons floating? Hydrogen or Helium?"

Suggestion buttons - [Hydrogen] [Helium]

User: "Helium"

Jordan: "Correct"

Now, we are trying to model a natural conversation, and in our own language, we avoid repeating ourselves too frequently. So we might want to design differentiation in the dialog for successive correct answers, for example:

Correct #1

Jordan: "Correct"

Correct #2

Jordan: "Yes, you are a clever human"

Correct #3

Jordan: "You're on a roll but don't get too excited"

Incorrect answers

The Action is listening for one of two possible answers, so we should design the dialog for the case in which the user provides the incorrect answer. Again, thinking about dialog strategies that we use in conversation, we can handle this case in several ways. For example, the persona can:

For now, Jordan will provide the correct answer and move on to the next question:

Jordan: "What gas is used to keep party balloons floating? Hydrogen or Helium?"

Suggestion buttons - [Hydrogen] [Helium]

User: "Hydrogen"

Jordan: "If you're a human you'll need Oxygen."

Proceed to next question

Completing the quiz

Once the user has answered a few questions, we can think about wrapping up the quiz, using our own conversations as reference, we might say things like:

For now, we will simply acknowledge that the quiz has ended. Here's an example from Jordan:

Jordan: "That was the end of the quiz, your intelligence is at an average level for a human."

"Back on track" repair strategies

There are many likely scenarios in which the user falls off the happy path, it's important that we remember that there are real life user conditions that cause this, for example:

All of these conditions require repair strategies to get the user back on track and these cases are really important for giving the user confidence in your Action.

Let's imagine that Jordan asked a question and the user didn't understand and subsequently doesn't respond. How should Jordan follow-up? Here's an example:

Jordan: "What gas is used to keep party balloons floating? Hydrogen or Helium?"

Suggestion buttons - [Hydrogen] [Helium]

User: "...?"

Jordan: "I didn't hear an answer. The choices are: Hydrogen or Helium."

User: "...?"

Jordan: "If you're still there, what's your best guess?"

User: "...?"

Jordan: "Ok. Let's stop here for now."

For these cases, it's best practice not to keep prompting the user continuously, here Jordan only prompts 3 times before ending the conversation.

You're ready to start prototyping and building your Action on Actions on Google!

With your persona and sample dialogs created, you have a solid foundational design that will inform the rest of your iterative creation and building process.

Next steps:

Good luck and thanks for taking this design Codelab!