To better customize a user's experience with your Action, you can save data between turns of a conversation or across multiple conversations with that user. Saved data can provide helpful reprompts in a single conversation, store game scores across sessions, or remember small pieces of information for a user.
Data can be stored in multiple ways during a conversation. In a single conversation, you can use types to annotate training phrases in intents or to store information from the user during slot filling.
You can also have your Action store values using your webhook with the following storage methods:
- Session storage
- User storage
- Home storage
Use these storage methods in combination with each other to best match how you want to persist information within or between invocations of your Action.
Session storage
Use session storage when you want to persist a value for a single conversation, but not from one conversation to another. During a conversation, any data collected using types is stored in session storage.
User storage
Use user storage when you want to persist a value across conversations for a single verified user. For example, a game can save a user's high score in user storage and present the high score in the welcome message each time the user starts a new conversation.
Home storage
Use home storage when you want to persist a value across conversations for devices in a single household (based on Home Graph). Home storage isn't specific to any particular user, so any user in the household can contribute towards it. When using home storage, Google additionally presents a notification once to verified users, and on each invocation by guest users (up to once per 10 minutes).