Google Assistant

Learn more about Google Assistant specific features that can be used with the Jovo Framework.

Introduction to Google Assistant Specific Features

You can access the googleAction object like this:

Output

This section provides an overview of Google Assistant specific features for output. For the basic concept, take a look here: Basic Concepts > Output.

Multiple Reprompts

Google Assistant allows to add multiple reprompts that are spoken out in order if there is no response by the user. Here is the official reference by Google: Static Reprompts.

The reprompts can be added to the ask method adding more parameters (Version < 2.2 was using an array https://www.jovo.tech/news/2019-04-04-jovo-v2-2-typescript#breaking-changes).

The first two messages are usually reprompt messages, the third one is used to say goodbye to the user.

Screen Surfaces

You can find out more about visual output here.

Media Response

You can find out more about media responses here.

Data

You can find out more about your Google Action user's data here.

User ID

In previous versions of Jovo, the userId for Google Actions was taken from the request's user ID. In 2018, Google deprecated this element of the request JSON and recommended webhook generated user IDs as an alternative way to store user data.

Since Jovo 2.0, a Google Action userId is created in the following process:

  • If there is a userId defined in the userStorage, take this
  • If not, use the userId from the request (if there is one) and then save it in userStorage
  • If there is no userId in the request, generate one using uuidv4, and then save it to userStorage

Note: userStorage only works for Google Assistant users who have voice match enabled. Learn more in the official Google Docs.

Push Notifications

Find out how to send push notifications to your Google Action's users here

Daily Update

You can find out more about Google Action routine suggestions here

Routine Suggestion

Find out how to send routine suggestions to your Google Action's users here

Confirmation

You can ask your user to confirm something using the following method:

The question should be one which can be answered with yes or no.

The user's response will be mapped to the ON_CONFIRMATION intent, where you can check wether they confirmed or not using this.$googleAction.isConfirmed():

Comments and Questions

Any specific questions? Just drop them below or join the Jovo Community Forum.

Join Our Newsletter

Be the first to get our free tutorials, courses, and other resources for voice app developers.