- JSON representation
- ConfigFiles
- ConfigFile
- Manifest
- Actions
- CustomAction
- Engagement
- PushNotification
- DailyUpdate
- ActionLink
- AssistantLink
- Settings
- Category
- SurfaceRequirements
- CapabilityRequirement
- SurfaceCapability
- LocalizedSettings
- ThemeCustomization
- ImageCornerStyle
- AccountLinking
- LinkingType
- AuthGrantType
- Webhook
- Handler
- HttpsEndpoint
- InlineCloudFunction
- Intent
- IntentParameter
- ClassReference
- EntitySetReferences
- EntitySetReference
- Type
- SynonymType
- MatchType
- Entity
- EntityDisplay
- RegularExpressionType
- Entity
- FreeTextType
- EntitySet
- Entity
- GlobalIntentEvent
- EventHandler
- StaticPrompt
- StaticPromptCandidate
- Selector
- SurfaceCapabilities
- Capability
- StaticPromptResponse
- StaticSimplePrompt
- Variant
- StaticContentPrompt
- StaticCardPrompt
- StaticImagePrompt
- ImageFill
- StaticLinkPrompt
- OpenUrl
- UrlHint
- StaticTablePrompt
- TableColumn
- HorizontalAlignment
- TableRow
- TableCell
- StaticMediaPrompt
- MediaType
- OptionalMediaControls
- MediaObject
- MediaImage
- RepeatMode
- StaticListPrompt
- ListItem
- StaticCollectionPrompt
- CollectionItem
- StaticCollectionBrowsePrompt
- CollectionBrowseItem
- Suggestion
- StaticCanvasPrompt
- Scene
- IntentEvent
- ConditionalEvent
- Slot
- PromptSettings
- CommitBehavior
- DefaultValue
- DataFiles
- DataFile
Wrapper for a list of files.
JSON representation | |
---|---|
{ // Union field |
Fields | ||
---|---|---|
Union field file_type . Only one type of files can be sent to the server at a time, config files or data files. file_type can be only one of the following: |
||
configFiles |
List of config files. This includes manifest, settings, interaction model resource bundles and more. |
|
dataFiles |
List of data files. This includes image, audio file, cloud function source code. |
ConfigFiles
Wrapper for repeated config files. Repeated fields cannot exist in a oneof.
JSON representation | |
---|---|
{
"configFiles": [
{
object ( |
Fields | |
---|---|
configFiles[] |
Multiple config files. |
ConfigFile
Represents a single file which contains structured data. Developers can define most of their project using structured config including Actions, Settings, Fulfillment.
JSON representation | |
---|---|
{ "filePath": string, // Union field |
Fields | ||
---|---|---|
filePath |
Relative path of the config file from the project root in the SDK file structure. Each file types below have an allowed file path. Eg: settings/settings.yaml |
|
Union field file . Each type of config file should have a corresponding field in the oneof. file can be only one of the following: |
||
manifest |
Single manifest file. Allowed file path: |
|
actions |
Single actions file with all the actions defined. Allowed file paths: |
|
settings |
Single settings config which includes non-localizable settings and settings for the project's default locale (if specified). For a locale override file, only localizedSettings field will be populated. Allowed file paths: |
|
webhook |
Single webhook definition. Allowed file path: |
|
intent |
Single intent definition. Allowed file paths: |
|
type |
Single type definition. Allowed file paths: |
|
entitySet |
Single entity set definition. Allowed file paths: |
|
globalIntentEvent |
Single global intent event definition. Allowed file paths: |
|
scene |
Single scene definition. Allowed file paths: |
|
staticPrompt |
Single static prompt definition. Allowed file paths: |
|
accountLinkingSecret |
Metadata corresponding to the client secret used in account linking. Allowed file path: |
|
resourceBundle |
Single resource bundle, which is a map from a string to a string or list of strings. Resource bundles could be used for localizing strings in static prompts. Allowed file paths: |
Manifest
Contains information that's "transportable" i.e. not specific to any given project and can be moved between projects.
JSON representation | |
---|---|
{ "version": string } |
Fields | |
---|---|
version |
Version of the file format. The current file format version is 1.0 Example: "1.0" |
Actions
Represents the list of Actions defined in a project.
JSON representation | |
---|---|
{
"custom": {
string: {
object ( |
Fields | |
---|---|
custom |
Map from intents to custom Actions to configure invocation for the project. The invocation intents could either be system or custom intents defined in the "custom/intents/" package. All intents defined here (system intents & custom intents) must have a corresponding intent file in the "custom/global/" package. An object containing a list of |
CustomAction
Details regarding a custom action.
JSON representation | |
---|---|
{
"engagement": {
object ( |
Fields | |
---|---|
engagement |
Engagement mechanisms associated with the action to help end users subscribe to push notifications and daily updates. Note that the intent name specified in daily updates/push notifications slot config needs to match the intent corresponding to this action for end users to subscribe to these updates. |
Engagement
Defines the engagement mechanisms associated with this action. This allows end users to subscribe to push notification and daily update.
JSON representation | |
---|---|
{ "title": string, "pushNotification": { object ( |
Fields | |
---|---|
title |
The title of the engagement that will be sent to end users asking for their permission to receive updates. The prompt sent to end users for daily updates will look like "What time would you like me to send your daily {title}" and for push notifications will look like "Is it ok if I send push notifications for {title}". This field is localizable. |
pushNotification |
Push notification settings that this engagement supports. |
actionLink |
Link config for an action which determines whether sharing links is enabled for the action and if so, contains the user friendly display name for the link. ActionLink is deprecated. Use AssistantLink instead. |
assistantLink |
Link config for an action which determines whether sharing links is enabled for the action and if so, contains the user friendly display name for the link. |
dailyUpdate |
Daily update settings that this engagement supports. |
PushNotification
Defines push notification settings that this engagement supports.
DailyUpdate
Defines daily update settings that this engagement supports.
ActionLink
Indicates whether sharing links is enabled for this action and the corresponding settings. Action links are used to deep link a user into a specific action. ActionLink is deprecated. Use AssistantLink instead.
JSON representation | |
---|---|
{ "title": string } |
Fields | |
---|---|
title |
User friendly display title for the link. |
AssistantLink
Indicates whether sharing links is enabled for this action and the corresponding settings. Assistant links are used to deep link a user into a specific action.
JSON representation | |
---|---|
{ "title": string } |
Fields | |
---|---|
title |
User friendly display title for the link. |
Settings
Represents settings of an Actions project that are not locale specific. Next tag: 22
JSON representation | |
---|---|
{ "projectId": string, "defaultLocale": string, "enabledRegions": [ string ], "disabledRegions": [ string ], "category": enum ( |
Fields | |
---|---|
projectId |
Actions project id. |
defaultLocale |
Locale which is default for the project. For all files except under |
enabledRegions[] |
Represents the regions where users can invoke your Actions, which is based on the user's location of presence. Cannot be set if |
disabledRegions[] |
Represents the regions where your Actions are blocked, based on the user's location of presence. Cannot be set if |
category |
The category for this Actions project. |
usesTransactionsApi |
Whether Actions can use transactions (for example, making reservations, taking orders, etc.). If false, then attempts to use the Transactions APIs fail. |
usesDigitalPurchaseApi |
Whether Actions can perform transactions for digital goods. |
usesInteractiveCanvas |
Whether Actions use Interactive Canvas. |
usesHomeStorage |
Whether Actions use the home storage feature. |
designedForFamily |
Whether Actions content is designed for family (DFF). |
containsAlcoholOrTobaccoContent |
Whether Actions contains alcohol or tobacco related content. |
keepsMicOpen |
Whether Actions may leave mic open without an explicit prompt during conversation. |
surfaceRequirements |
The surface requirements that a client surface must support to invoke Actions in this project. |
testingInstructions |
Free-form testing instructions for Actions reviewer (for example, account linking instructions). |
localizedSettings |
Localized settings for the project's default locale. Every additional locale should have its own settings file in its own directory. |
accountLinking |
Allow users to create or link accounts through Google sign-in and/or your own OAuth service. |
selectedAndroidApps[] |
Android apps selected to acccess Google Play purchases for transactions. This is a selection from the Android apps connected to the actions project to verify brand ownership and enable additional features. See https://developers.google.com/assistant/console/brand-verification for more information. |
Category
The category choices for an Actions project.
Enums | |
---|---|
CATEGORY_UNSPECIFIED |
Unknown / Unspecified. |
BUSINESS_AND_FINANCE |
Business and Finance category. |
EDUCATION_AND_REFERENCE |
Education and Reference category. |
FOOD_AND_DRINK |
Food and Drink category. |
GAMES_AND_TRIVIA |
Games and Trivia category. |
HEALTH_AND_FITNESS |
Health and Fitness category. |
KIDS_AND_FAMILY |
Kids and Family category. |
LIFESTYLE |
Lifestyle category. |
LOCAL |
Local category. |
MOVIES_AND_TV |
Movies and TV category. |
MUSIC_AND_AUDIO |
Music and Audio category. |
NEWS |
News category, |
NOVELTY_AND_HUMOR |
Novelty and Humor category. |
PRODUCTIVITY |
Productivity category. |
SHOPPING |
Shopping category. |
SOCIAL |
Social category. |
SPORTS |
Sports category. |
TRAVEL_AND_TRANSPORTATION |
Travel and Transportation category. |
UTILITIES |
Utilities category. |
WEATHER |
Weather category. |
HOME_CONTROL |
Home Control category. |
SurfaceRequirements
Contains a set of requirements that the client surface must support to invoke Actions in your project.
JSON representation | |
---|---|
{
"minimumRequirements": [
{
object ( |
Fields | |
---|---|
minimumRequirements[] |
The minimum set of capabilities needed to invoke the Actions in your project. If the surface is missing any of these, the Action will not be triggered. |
CapabilityRequirement
Represents a requirement about the availability of a given capability.
JSON representation | |
---|---|
{
"capability": enum ( |
Fields | |
---|---|
capability |
The type of capability. |
SurfaceCapability
Possible set of surface capabilities.
Enums | |
---|---|
SURFACE_CAPABILITY_UNSPECIFIED |
Unknown / Unspecified. |
AUDIO_OUTPUT |
Surface supports audio output. |
SCREEN_OUTPUT |
Surface supports screen/visual output. |
MEDIA_RESPONSE_AUDIO |
Surface supports media response audio. |
WEB_BROWSER |
Surface supports web browsers. |
ACCOUNT_LINKING |
Surface supports account linking. |
INTERACTIVE_CANVAS |
Surface supports Interactive Canvas. |
HOME_STORAGE |
Surface supports home storage. |
LocalizedSettings
Represents settings of an Actions project that are specific to a user locale. In this instance, user means the end user who invokes your Actions. This message is localizable.
JSON representation | |
---|---|
{
"displayName": string,
"pronunciation": string,
"shortDescription": string,
"fullDescription": string,
"smallLogoImage": string,
"largeBannerImage": string,
"developerName": string,
"developerEmail": string,
"termsOfServiceUrl": string,
"voice": string,
"voiceLocale": string,
"privacyPolicyUrl": string,
"sampleInvocations": [
string
],
"themeCustomization": {
object ( |
Fields | |
---|---|
displayName |
Required. The default display name for this Actions project (if there is no translation available) |
pronunciation |
Required. The pronunciation of the display name to invoke it within a voice (spoken) context. |
shortDescription |
Required. The default short description for the Actions project (if there is no translation available). 80 character limit. |
fullDescription |
Required. The default long description for the Actions project (if there is no translation available). 4000 character limit. |
smallLogoImage |
Required. Small square image, 192 x 192 px. This should be specified as a reference to the corresponding image in the |
largeBannerImage |
Optional. Large landscape image, 1920 x 1080 px. This should be specified as a reference to the corresponding image in the |
developerName |
Required. The name of the developer to be displayed to users. |
developerEmail |
Required. The contact email address for the developer. |
termsOfServiceUrl |
Optional. The terms of service URL. |
voice |
Required. The Google Assistant voice type that users hear when they interact with your Actions. The supported values are "male_1", "male_2", "female_1", and "female_2". |
voiceLocale |
Optional. The locale for the specified voice. If not specified, this resolves to the user's Assistant locale. If specified, the voice locale must have the same root language as the locale specified in LocalizedSettings. |
privacyPolicyUrl |
Required. The privacy policy URL. |
sampleInvocations[] |
Optional. Sample invocation phrases displayed as part of your Actions project's description in the Assistant directory. This will help users learn how to use it. |
themeCustomization |
Optional. Theme customizations for visual components of your Actions. |
ThemeCustomization
Styles applied to cards that are presented to users
JSON representation | |
---|---|
{
"backgroundColor": string,
"primaryColor": string,
"fontFamily": string,
"imageCornerStyle": enum ( |
Fields | |
---|---|
backgroundColor |
Background color of cards. Acts as a fallback if |
primaryColor |
Primary theme color of the Action will be used to set text color of title, action item background color for Actions on Google cards. Example usage: #FAFAFA |
fontFamily |
The font family that will be used for title of cards. Supported fonts: - Sans Serif - Sans Serif Medium - Sans Serif Bold - Sans Serif Black - Sans Serif Condensed - Sans Serif Condensed Medium - Serif - Serif Bold - Monospace - Cursive - Sans Serif Smallcaps |
imageCornerStyle |
Border style of foreground image of cards. For example, can be applied on the foreground image of a basic card or carousel card. |
landscapeBackgroundImage |
Landscape mode (minimum 1920x1200 pixels). This should be specified as a reference to the corresponding image in the |
portraitBackgroundImage |
Portrait mode (minimum 1200x1920 pixels). This should be specified as a reference to the corresponding image in the |
ImageCornerStyle
Describes how the borders of images should be rendered.
Enums | |
---|---|
IMAGE_CORNER_STYLE_UNSPECIFIED |
Undefined / Unspecified. |
CURVED |
Round corner for image. |
ANGLED |
Rectangular corner for image. |
AccountLinking
AccountLinking allows Google to guide the user to sign-in to the App's web services.
For Google Sign In and OAuth + Google Sign In linking types, Google generates a client ID identifying your App to Google ("Client ID issued by Google to your Actions" on Console UI). This field is read-only and can be checked by navigating to the Console UI's Account Linking page. See: https://developers.google.com/assistant/identity/google-sign-in
Note: For all account linking setting types (except for Google Sign In), you must provide a username and password for a test account in Settings.testing_instructions for the review team to review the app (they will not be visible to users).
JSON representation | |
---|---|
{ "enableAccountCreation": boolean, "linkingType": enum ( |
Fields | |
---|---|
enableAccountCreation |
Required. If |
linkingType |
Required. The linking type to use. See https://developers.google.com/assistant/identity for further details on the linking types. |
authGrantType |
Optional. Indicates the type of authentication for OAUTH linkingType. |
appClientId |
Optional. Client ID issued by your App to Google. This is the OAuth2 Client ID identifying Google to your service. Only set when using OAuth. |
authorizationUrl |
Optional. Endpoint for your sign-in web page that supports OAuth2 code or implicit flows. URL must use HTTPS. Only set when using OAuth. |
tokenUrl |
Optional. OAuth2 endpoint for token exchange. URL must use HTTPS. This is not set when only using OAuth with IMPLICIT grant as the linking type. Only set when using OAuth. |
scopes[] |
Optional. List of permissions the user must consent to in order to use your service. Only set when using OAuth. Make sure to provide a Terms of Service in the directory information in LocalizedSettings.terms_of_service_url section if specifying this field. |
learnMoreUrl |
Optional. This is the web page on your service which describes the permissions the user is granting to Google. Only set if using OAuth and Google Sign In. Make sure to provide a Terms of Service in the directory information in LocalizedSettings.terms_of_service_url section if specifying this field. |
useBasicAuthHeader |
Optional. If true, allow Google to transmit client ID and secret via HTTP basic auth header. Otherwise, Google uses the client ID and secret inside the post body. Only set when using OAuth. Make sure to provide a Terms of Service in the directory information in LocalizedSettings.terms_of_service_url section if specifying this field. |
LinkingType
The type of Account Linking to perform.
Enums | |
---|---|
LINKING_TYPE_UNSPECIFIED |
Unspecified. |
GOOGLE_SIGN_IN |
Google Sign In linking type. If using this linking type, no OAuth-related fields need to be set below. |
OAUTH_AND_GOOGLE_SIGN_IN |
OAuth and Google Sign In linking type. |
OAUTH |
OAuth linking type. |
AuthGrantType
The OAuth2 grant type Google uses to guide the user to sign in to your App's web service.
Enums | |
---|---|
AUTH_GRANT_TYPE_UNSPECIFIED |
Unspecified. |
AUTH_CODE |
Authorization code grant. Requires you to provide both authentication URL and access token URL. |
IMPLICIT |
Implicit code grant. Only requires you to provide authentication URL. |
Webhook
Metadata for different types of webhooks. If you're using inlineCloudFunction
, your source code must be in a directory with the same name as the value for the executeFunction
key. For example, a value of my_webhook
for theexecuteFunction
key would have a code structure like this: - /webhooks/my_webhook.yaml
- /webhooks/my_webhook/index.js
- /webhooks/my_webhook/package.json
JSON representation | |
---|---|
{ "handlers": [ { object ( |
Fields | ||
---|---|---|
handlers[] |
List of handlers for this webhook. |
|
Union field webhook_type . Only one webhook type is supported. webhook_type can be only one of the following: |
||
httpsEndpoint |
Custom webhook HTTPS endpoint. |
|
inlineCloudFunction |
Metadata for cloud function deployed from code in the webhooks folder. |
Handler
Declares the name of the webhoook handler. A webhook can have multiple handlers registered. These handlers can be called from multiple places in your Actions project.
JSON representation | |
---|---|
{ "name": string } |
Fields | |
---|---|
name |
Required. Name of the handler. Must be unique across all handlers the Actions project. You can check the name of this handler to invoke the correct function in your fulfillment source code. |
HttpsEndpoint
REST endpoint to notify if you're not using the inline editor.
JSON representation | |
---|---|
{ "baseUrl": string, "httpHeaders": { string: string, ... }, "endpointApiVersion": integer } |
Fields | |
---|---|
baseUrl |
The HTTPS base URL for your fulfillment endpoint (HTTP is not supported). Handler names are appended to the base URL path after a colon (following the style guide in https://cloud.google.com/apis/design/custom_methods). For example a base URL of 'https://gactions.service.com/api' would receive requests with URL 'https://gactions.service.com/api:{method}'. |
httpHeaders |
Map of HTTP parameters to be included in the POST request. An object containing a list of |
endpointApiVersion |
Version of the protocol used by the endpoint. This is the protocol shared by all fulfillment types and not specific to Google fulfillment type. |
InlineCloudFunction
Holds the metadata of an inline Cloud Function deployed from the webhooks folder.
JSON representation | |
---|---|
{ "executeFunction": string } |
Fields | |
---|---|
executeFunction |
The name of the Cloud Function entry point. The value of this field should match the name of the method exported from the source code. |
Intent
Intents map open-ended user input to structured objects. Spoken phrases are matched to intents with Google's Natural Language Understanding (NLU). Intent matches can trigger events in your conversation design to progress the user's conversation. The intent name is specified in the name of the file.
JSON representation | |
---|---|
{
"parameters": [
{
object ( |
Fields | |
---|---|
parameters[] |
The list of parameters within the training phrases. All parameters must be defined here to be used in the training phrase. |
trainingPhrases[] |
Training phrases allow Google’s NLU to automatically match intents with user input. The more unique phrases that are provided, the better chance this intent will be matched. The following is the format of training phrase part which are annotated. Note that |
IntentParameter
Definition of a parameter which can be used inside training phrases.
JSON representation | |
---|---|
{ "name": string, // Union field |
Fields | ||
---|---|---|
name |
Required. Unique name of the intent parameter. Can be used in conditions and responses to reference intent parameters extracted by NLU with $intent.params.[name].resolved |
|
Union field parameter_type . The type of the intent parameter. parameter_type can be only one of the following: |
||
type |
Optional. Declares the data type of this parameter. This should not be set for built-in intents. |
|
entitySetReferences |
Optional. References to the sets of allowed entities for this intent parameter. Only valid for parameters of a built-in intent. These references point to entity sets in the 'custom/entitySets' directory. |
ClassReference
A reference to a class which is used to declare the type of a field or return value. Enums are also a type of class that can be referenced using ClassReference.
JSON representation | |
---|---|
{ "name": string, "list": boolean } |
Fields | |
---|---|
name |
Required. Name of a built-in type or custom type of the parameter. Examples: |
list |
Optional. Indicates whether the data type represents a list of values. |
EntitySetReferences
Entity set references for an intent parameter.
JSON representation | |
---|---|
{
"entitySetReferences": [
{
object ( |
Fields | |
---|---|
entitySetReferences[] |
Required. Entity set references for an intent parameter. |
EntitySetReference
A reference to the set of allowed entities for this intent parameter.
JSON representation | |
---|---|
{ "entitySet": string } |
Fields | |
---|---|
entitySet |
Required. Identifies the specific collection of entities to be considered for a given parameter. The corresponding entity set definition should be present in the custom/entitySets/ directory. |
Type
Declaration of a custom type, as opposed to built-in types. Types can be assigned to slots in a scene or parameters of an intent's training phrases. Practically, Types can be thought of as enums. Note, type name is specified in the name of the file.
JSON representation | |
---|---|
{ "exclusions": [ string ], // Union field |
Fields | ||
---|---|---|
exclusions[] |
Set of exceptional words/phrases that shouldn't be matched by type. Note: If word/phrase is matched by the type but listed as an exclusion it won't be returned in parameter extraction result. This field is localizable. |
|
Union field sub_type . Selection of sub type based on the type of matching to be done. sub_type can be only one of the following: |
||
synonym |
Synonyms type, which is essentially an enum. |
|
regularExpression |
Regex type, allows regular expression matching. |
|
freeText |
FreeText type. |
SynonymType
Type that matches text by set of synonyms.
JSON representation | |
---|---|
{ "matchType": enum ( |
Fields | |
---|---|
matchType |
Optional. The match type for the synonym. |
acceptUnknownValues |
Optional. When set to true this will match unknown words or phrases based on surrounding input and intent training data, such as items that might be added to a grocery list. |
entities |
Required. Named map of synonym entities. An object containing a list of |
MatchType
The type of matching that entries in this type will use. This will ensure all of the types use the same matching method and allow variation of matching for synonym matching (i.e. fuzzy versus exact). If the value is UNSPECIFIED
it will be defaulted to EXACT_MATCH
.
Enums | |
---|---|
UNSPECIFIED |
Defaults to EXACT_MATCH . |
EXACT_MATCH |
Looks for an exact match of the synonym or name. |
FUZZY_MATCH |
Looser than EXACT_MATCH . Looks for similar matches as well as exact matches. |
Entity
Represents a synonym entity field that contains the details of a single entry inside the type.
JSON representation | |
---|---|
{
"display": {
object ( |
Fields | |
---|---|
display |
Optional. The entity display details. |
synonyms[] |
Optional. The list of synonyms for the entity. This field is localizable. |
EntityDisplay
Elements that will be displayed on the canvas once a particular type's entity is extracted from a query. Only relevant for canvas enabled apps. This message is localizable.
JSON representation | |
---|---|
{ "iconTitle": string, "iconUrl": string } |
Fields | |
---|---|
iconTitle |
Optional. Title of the icon. |
iconUrl |
Required. Url of the icon. |
RegularExpressionType
Type that matches text by regular expressions. This message is localizable.
JSON representation | |
---|---|
{
"entities": {
string: {
object ( |
Fields | |
---|---|
entities |
Required. Named map of entities which each contain Regex strings. An object containing a list of |
Entity
Represents an entity object that contains the regular expression that is used for comparison.
JSON representation | |
---|---|
{
"display": {
object ( |
Fields | |
---|---|
display |
Optional. Elements that will be displayed on the canvas once an entity is extracted from a query. Only relevant for canvas enabled apps. |
regularExpressions[] |
Required. Uses RE2 regex syntax (See https://github.com/google/re2/wiki/Syntax for more details) |
FreeTextType
Type that matches any text if surrounding words context is close to provided training examples.
JSON representation | |
---|---|
{
"display": {
object ( |
Fields | |
---|---|
display |
Optional. Elements that will be displayed on the canvas once an entity is extracted from a query. Only relevant for canvas enabled apps. |
EntitySet
Entity sets describe the pre-defined set of entities that the values of built-in intent parameters can come from. Entity sets can be referenced from entitySet in built-in intent parameters.
JSON representation | |
---|---|
{
"entities": [
{
object ( |
Fields | |
---|---|
entities[] |
Required. The list of entities this entity set supports. |
Entity
An entity a built-in intent parameter value can come from.
JSON representation | |
---|---|
{ "id": string } |
Fields | |
---|---|
id |
Required. The ID of the entity. For a list of built-in-intent parameters and their supported entities, see https://developers.google.com/assistant/conversational/build/built-in-intents |
GlobalIntentEvent
Defines a global intent handler. Global intent events are scoped to the entire Actions project and may be overridden by intent handlers in a scene. Intent names must be unique within an Actions project.
Global intents can be matched anytime during a session, allowing users to access common flows like "get help" or "go back home." They can also be used to deep link users into specific flows when they invoke an Action.
Note, the intent name is specified in the name of the file.
JSON representation | |
---|---|
{
"transitionToScene": string,
"handler": {
object ( |
Fields | |
---|---|
transitionToScene |
Optional. Destination scene which the conversation should jump to. The state of the current scene is destroyed on the transition. |
handler |
Optional. Event handler which is triggered when the intent is matched. Should execute before transitioning to the destination scene. Useful to generate Prompts in response to events. |
EventHandler
Defines a handler to be executed after an event. Examples of events are intent and condition based events in a scene.
JSON representation | |
---|---|
{ "webhookHandler": string, // Union field |
Fields | ||
---|---|---|
webhookHandler |
Name of the webhook handler to call. |
|
Union field prompt . Prompts can either be inlined or referenced by name. prompt can be only one of the following: |
||
staticPrompt |
Inlined static prompt. Can contain references to string resources in bundles. |
|
staticPromptName |
Name of the static prompt to invoke. |
StaticPrompt
Represents a list of prompt candidates, one of which will be selected as the prompt to be shown in the response to the user. This message is localizable.
JSON representation | |
---|---|
{
"candidates": [
{
object ( |
Fields | |
---|---|
candidates[] |
The list of candidate prompts to be sent to the client. Each prompt has a selector to determine when it can be used. The first selector that matches a request will be sent and the rest will be ignored. |
StaticPromptCandidate
Represents a static prompt candidate.
JSON representation | |
---|---|
{ "selector": { object ( |
Fields | |
---|---|
selector |
Optional. The criteria for whether this prompt matches a request. If the selector is empty, this prompt will always be triggered. |
promptResponse |
The prompt response associated with the selector. |
Selector
Defines the criteria for whether a prompt matches a request.
JSON representation | |
---|---|
{
"surfaceCapabilities": {
object ( |
Fields | |
---|---|
surfaceCapabilities |
The set of required surface capabilities. |
SurfaceCapabilities
Represents the surface the user is using to make a request to the Action.
JSON representation | |
---|---|
{
"capabilities": [
enum ( |
Fields | |
---|---|
capabilities[] |
Required. The capabilities of the surface making a request to the Action. |
Capability
Capabilities the device surface supports at the time of the request.
Enums | |
---|---|
UNSPECIFIED |
Unspecified surface capability. |
SPEECH |
Device can speak to the user via text-to-speech or SSML. |
RICH_RESPONSE |
Device can display rich responses like cards, lists and tables. |
LONG_FORM_AUDIO |
Device can play long form audio media like music and podcasts. |
INTERACTIVE_CANVAS |
Device can display a interactive canvas response. |
WEB_LINK |
Device can use web links in rich responses to open a web browser. |
HOME_STORAGE |
Device can support saving and fetching home storage. |
StaticPromptResponse
Represents structured responses to send to the user, such as text, speech, cards, canvas data, suggestion chips, etc.
JSON representation | |
---|---|
{ "firstSimple": { object ( |
Fields | |
---|---|
firstSimple |
Optional. The first voice and text-only response. |
content |
Optional. A content like a card, list or media to display to the user. |
lastSimple |
Optional. The last voice and text-only response. |
suggestions[] |
Optional. Suggestions to be displayed to the user which will always appear at the end of the response. If the |
link |
Optional. An additional suggestion chip that can link out to the associated app or site. The chip will be rendered with the title "Open |
override |
Optional. Mode for how this messages should be merged with previously defined messages. |
canvas |
A response to be used for interactive canvas experience. |
StaticSimplePrompt
Represents a simple prompt to be send to a user.
JSON representation | |
---|---|
{
"variants": [
{
object ( |
Fields | |
---|---|
variants[] |
List of possible variants. |
Variant
Represents a variant which is part of the simple prompt.
JSON representation | |
---|---|
{ "speech": string, "text": string } |
Fields | |
---|---|
speech |
Optional. Represents the speech to be spoken to the user. Can be SSML or text to speech. By default, speech will be appended to previous Simple prompt's speech. If the |
text |
Optional. Text to display in the chat bubble. If not given, a display rendering of the speech field above will be used. Limited to 640 chars. By default, text will be appended to previous Simple prompt's text. If the |
StaticContentPrompt
A placeholder for the Content part of a StaticPrompt.
JSON representation | |
---|---|
{ // Union field |
Fields | ||
---|---|---|
Union field content . Only one type of content can be present in a Prompt. content can be only one of the following: |
||
card |
A basic card. |
|
image |
An image. |
|
table |
Table card. |
|
media |
Response indicating a set of media to be played. |
|
list |
A card for presenting a list of options to select from. |
|
collection |
A card presenting a list of options to select from. |
|
collectionBrowse |
A card presenting a collection of web pages to open. |
StaticCardPrompt
A basic card for displaying some information, e.g. an image and/or text.
JSON representation | |
---|---|
{ "title": string, "subtitle": string, "text": string, "image": { object ( |
Fields | |
---|---|
title |
Optional. Overall title of the card. |
subtitle |
Optional. Subtitle of the card. |
text |
Required. Body text of the card which is needed unless image is present. Supports a limited set of markdown syntax for formatting. |
image |
Optional. A hero image for the card. The height is fixed to 192dp. |
imageFill |
Optional. How the image background will be filled. |
button |
Optional. A clickable button to be shown in the Card. |
StaticImagePrompt
An image displayed in the card.
JSON representation | |
---|---|
{ "url": string, "alt": string, "height": integer, "width": integer } |
Fields | |
---|---|
url |
Required. The source url of the image. Images can be JPG, PNG and GIF (animated and non-animated). For example, |
alt |
Required. A text description of the image to be used for accessibility, e.g. screen readers. |
height |
Optional. The height of the image in pixels. |
width |
Optional. The width of the image in pixels. |
ImageFill
Possible image display options for affecting the presentation of the image. This should be used for when the image's aspect ratio does not match the image container's aspect ratio.
Enums | |
---|---|
UNSPECIFIED |
ImageFill unspecified. |
GRAY |
Fill the gaps between the image and the image container with gray bars. |
WHITE |
Fill the gaps between the image and the image container with white bars. |
CROPPED |
Image is scaled such that the image width and height match or exceed the container dimensions. This may crop the top and bottom of the image if the scaled image height is greater than the container height, or crop the left and right of the image if the scaled image width is greater than the container width. This is similar to "Zoom Mode" on a widescreen TV when playing a 4:3 video. |
StaticLinkPrompt
Defines a link which will be displayed as a suggestion chip and can be opened by the user.
JSON representation | |
---|---|
{
"name": string,
"open": {
object ( |
Fields | |
---|---|
name |
Name of the link |
open |
Defines behavior when the user opens the link. |
OpenUrl
Defines behavior when the user opens the link.
JSON representation | |
---|---|
{
"url": string,
"hint": enum ( |
Fields | |
---|---|
url |
The url field which could be any of: - http/https urls for opening an App-linked App or a webpage |
hint |
Indicates a hint for the url type. |
UrlHint
Different types of url hints.
Enums | |
---|---|
HINT_UNSPECIFIED |
Unspecified |
AMP |
URL that points directly to AMP content, or to a canonical URL which refers to AMP content via <link rel="amphtml"> . |
StaticTablePrompt
A table card for displaying a table of text.
JSON representation | |
---|---|
{ "title": string, "subtitle": string, "image": { object ( |
Fields | |
---|---|
title |
Optional. Overall title of the table. Must be set if subtitle is set. |
subtitle |
Optional. Subtitle for the table. |
image |
Optional. Image associated with the table. |
columns[] |
Optional. Headers and alignment of columns. |
rows[] |
Optional. Row data of the table. The first 3 rows are guaranteed to be shown but others might be cut on certain surfaces. Please test with the simulator to see which rows will be shown for a given surface. On surfaces that support the |
button |
Optional. Button. |
TableColumn
Describes a column in the table.
JSON representation | |
---|---|
{
"header": string,
"align": enum ( |
Fields | |
---|---|
header |
Header text for the column. |
align |
Horizontal alignment of content w.r.t column. If unspecified, content will be aligned to the leading edge. |
HorizontalAlignment
The alignment of the content within the cell.
Enums | |
---|---|
UNSPECIFIED |
HorizontalAlignment unspecified. |
LEADING |
Leading edge of the cell. This is the default. |
CENTER |
Content is aligned to the center of the column. |
TRAILING |
Content is aligned to the trailing edge of the column. |
TableRow
Describes a row in the table.
JSON representation | |
---|---|
{
"cells": [
{
object ( |
Fields | |
---|---|
cells[] |
Cells in this row. The first 3 cells are guaranteed to be shown but others might be cut on certain surfaces. Please test with the simulator to see which cells will be shown for a given surface. |
divider |
Indicates whether there should be a divider after each row. |
TableCell
Describes a cell in a row.
JSON representation | |
---|---|
{ "text": string } |
Fields | |
---|---|
text |
Text content of the cell. |
StaticMediaPrompt
Contains information about the media, such as name, description, url, etc. Next id: 11
JSON representation | |
---|---|
{ "mediaType": enum ( |
Fields | |
---|---|
mediaType |
Media type of this response. |
startOffset |
Start offset of the first media object. A duration in seconds with up to nine fractional digits, terminated by ' |
optionalMediaControls[] |
Optional media control types this media response session can support. If set, request will be made to 3p when a certain media event happens. If not set, 3p must still handle two default control type, FINISHED and FAILED. |
mediaObjects[] |
List of media objects. |
repeatMode |
Repeat mode for the list of Media Objects. |
MediaType
Media type of this response.
Enums | |
---|---|
MEDIA_TYPE_UNSPECIFIED |
UNSPECIFIED value |
AUDIO |
Audio file. |
MEDIA_STATUS_ACK |
Response to acknowledge a media status report. |
OptionalMediaControls
Media control types the media response can supported optionally
Enums | |
---|---|
OPTIONAL_MEDIA_CONTROLS_UNSPECIFIED |
Unspecified value |
PAUSED |
Paused event. Triggered when user pauses the media. |
STOPPED |
Stopped event. Triggered when user exit out 3p session during media play. |
MediaObject
Represents a single media object.
JSON representation | |
---|---|
{
"name": string,
"description": string,
"url": string,
"image": {
object ( |
Fields | |
---|---|
name |
Name of this media object. |
description |
Description of this media object. |
url |
The url pointing to the media content. |
image |
Image to show with the media card. |
MediaImage
Image to be shown inside a MediaPrompt.
JSON representation | |
---|---|
{ // Union field |
Fields | ||
---|---|---|
Union field image . Only one type of MediaImage is allowed. image can be only one of the following: |
||
large |
A large image, such as the cover of the album, etc. |
|
icon |
A small image icon displayed on the right from the title. It's resized to 36x36 dp. |
RepeatMode
The types of repeat mode for a list of media objects.
Enums | |
---|---|
REPEAT_MODE_UNSPECIFIED |
Equivalent to OFF. |
OFF |
End media session at the end of the last media object. |
ALL |
Loop to the beginning of the first media object when the end of the last media object is reached. |
StaticListPrompt
A card for presenting a list of options to select from.
JSON representation | |
---|---|
{
"title": string,
"subtitle": string,
"items": [
{
object ( |
Fields | |
---|---|
title |
Optional. Title of the list. |
subtitle |
Optional. Subtitle of the list. |
items[] |
Required. List items. |
ListItem
An item in the list.
JSON representation | |
---|---|
{
"key": string,
"title": string,
"description": string,
"image": {
object ( |
Fields | |
---|---|
key |
Required. The NLU key that matches the entry key name in the associated type. When item tapped, this key will be posted back as a select option parameter. |
title |
Required. Title of the item. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of items. |
description |
Optional. Body text of the item. |
image |
Optional. Item image. |
StaticCollectionPrompt
A card for presenting a collection of options to select from.
JSON representation | |
---|---|
{ "title": string, "subtitle": string, "items": [ { object ( |
Fields | |
---|---|
title |
Optional. Title of the collection. |
subtitle |
Optional. Subtitle of the collection. |
items[] |
Required. Collection items. |
imageFill |
Optional. Type of image display option. |
CollectionItem
An item in the collection.
JSON representation | |
---|---|
{
"key": string,
"title": string,
"description": string,
"image": {
object ( |
Fields | |
---|---|
key |
Required. The NLU key that matches the entry key name in the associated Type. When item tapped, this key will be posted back as a select option parameter. |
title |
Required. Title of the item. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of items. |
description |
Optional. Body text of the item. |
image |
Optional. Item image. |
StaticCollectionBrowsePrompt
Presents a set of web documents as a collection of large-tile items. Items may be selected to launch their associated web document in a web viewer.
JSON representation | |
---|---|
{ "items": [ { object ( |
Fields | |
---|---|
items[] |
Items in the browse collection. The list size should be in the range [2, 10]. |
imageFill |
Image display option for images in the collection. |
CollectionBrowseItem
Item in the collection.
JSON representation | |
---|---|
{ "title": string, "description": string, "footer": string, "image": { object ( |
Fields | |
---|---|
title |
Required. Title of the collection item. |
description |
Description of the collection item. |
footer |
Footer text for the collection item, displayed below the description. Single line of text, truncated with an ellipsis. |
image |
Image for the collection item. |
openUriAction |
Required. URI to open if the item selected. |
Suggestion
Represents a suggestion chip, a UI element shown to the user for convenience.
JSON representation | |
---|---|
{ "title": string } |
Fields | |
---|---|
title |
Required. The text shown in the suggestion chip. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of suggestion chips. Max 25 chars |
StaticCanvasPrompt
Represents a Interactive Canvas response to be sent to the user. This can be used in conjunction with the firstSimple
field in the containing prompt to speak to the user in addition to displaying a interactive canvas response.
JSON representation | |
---|---|
{ "url": string, "data": [ value ], "suppressMic": boolean, "sendStateDataToCanvasApp": boolean, "enableFullScreen": boolean } |
Fields | |
---|---|
url |
Required. URL of the web view to load. |
data[] |
Optional. JSON data to be passed through to the immersive experience web page as an event. If the |
suppressMic |
Optional. A true value means that the mic won't be opened for capturing input after this immersive response is presented to the user. |
sendStateDataToCanvasApp |
Optional. If |
enableFullScreen |
Optional. If |
Scene
Scene is the basic unit of control flow when designing a conversation. They can be chained together with other scenes, generate prompts for the end user, and define slots. The scene name is specified in the name of the file.
JSON representation | |
---|---|
{ "onEnter": { object ( |
Fields | |
---|---|
onEnter |
Handler to invoke when transitioning into this scene. |
intentEvents[] |
The list of events that trigger based on intents. These events can be triggered at any time after the on_load Handler has been called. Important - these events define the set of intents which are scoped to this scene and will take precedence over any globally defined events that have the same intents or their triggering phrases. Intent names must be unique within a scene. |
conditionalEvents[] |
The list of events to trigger based on conditional statements. These are evaluated after the form has been filled or immediately after on_load if this scene does not have a form (evaluation is only done once). Only the first matching event will be triggered. |
slots[] |
Ordered list of slots. Each slot defines the type of data that it will resolve and configuration to customize the experience of this resolution (e.g. prompts). |
onSlotUpdated |
Handler called when there is a change in state of a slot not caused by updates within another Handler. This allows slots to be invalidated, the scene invalidated or other changes to scene state. |
IntentEvent
Registers Events which trigger as the result of an intent match.
JSON representation | |
---|---|
{
"intent": string,
"transitionToScene": string,
"handler": {
object ( |
Fields | |
---|---|
intent |
Required. Intent triggering the event. |
transitionToScene |
Optional. Destination scene which the conversation should jump to. The state of the current scene is destroyed on the transition. |
handler |
Optional. Event handler which is triggered when the intent is matched. Should execute before transitioning to the destination scene. Useful to generate prompts in response to events. |
ConditionalEvent
Registers events that trigger as the result of a true condition.
JSON representation | |
---|---|
{
"condition": string,
"transitionToScene": string,
"handler": {
object ( |
Fields | |
---|---|
condition |
Required. Filter condition for this event to trigger. If condition is evaluated to true then the associated |
transitionToScene |
Optional. Destination scene which the conversation should jump to when the associated condition is evaluated to true. The state of the current scene is destroyed on the transition. |
handler |
Optional. Event handler which is triggered when the associated condition is evaluated to |
Slot
Configuration for a slot. Slots are single units of data that can be filled through natural language (ie. intent parameters), session parameters, and other sources.
JSON representation | |
---|---|
{ "name": string, "type": { object ( |
Fields | |
---|---|
name |
Required. Name of the slot. |
type |
Required. Declares the data type of this slot. |
required |
Optional. Indicates whether the slot is required to be filled before advancing. Required slots that are not filled will trigger a customizable prompt to the user. |
promptSettings |
Optional. Registers Prompts for different stages of slot filling. |
commitBehavior |
Optional. Commit behavior associated with the slot. |
config |
Optional. Additional configuration associated with the slot which is used for filling the slot. The format of the config is specific to the type of the slot. Resource references to user or session parameter can be added to this config. This config is needed for filling slots related to transactions and user engagement. Example: For a slot of type actions.type.CompletePurchaseValue, the following config proposes a digital good order with a reference to a client defined session parameter { "@type": "type.googleapis.com/ google.actions.transactions.v3.CompletePurchaseValueSpec", "skuId": { "skuType": "SKU_TYPE_IN_APP", "id": "$session.params.userSelectedSkuId", "packageName": "com.example.company" } } |
defaultValue |
Optional. Configuration to populate a default value for this slot. |
PromptSettings
A single place where slot prompts are defined.
JSON representation | |
---|---|
{ "initialPrompt": { object ( |
Fields | |
---|---|
initialPrompt |
Prompt for the slot value itself. Example: "What size did you want?" |
noMatchPrompt1 |
Prompt to give when the user's input does not match the expected value type for the slot for the first time. Example: "Sorry, I didn't get that." |
noMatchPrompt2 |
Prompt to give when the user's input does not match the expected value type for the slot for the second time. Example: "Sorry, I didn't get that." |
noMatchFinalPrompt |
Prompt to give when the user's input does not match the expected value type for the slot for the last time. Example: "Sorry, I didn't get that." |
noInputPrompt1 |
Prompt to give when the user does not provide an input for the first time. Example: "Sorry, I didn't get that." |
noInputPrompt2 |
Prompt to give when the user does not provide an input for the second time. Example: "Sorry, I didn't get that." |
noInputFinalPrompt |
Prompt to give when the user does not provide an input for the last time. Example: "Sorry, I didn't get that." |
CommitBehavior
Message describing the commit behavior associated with the slot after it has been successfully filled.
JSON representation | |
---|---|
{ "writeSessionParam": string } |
Fields | |
---|---|
writeSessionParam |
The session parameter to write the slot value after it is filled. Note that nested paths are not currently supported. "$$" is used to write the slot value to a session parameter with same name as the slot. Eg: writeSessionParam = "fruit" corresponds to "$session.params.fruit". writeSessionParam = "ticket" corresponds to "$session.params.ticket". |
DefaultValue
Configuration to populate a default value for this slot.
JSON representation | |
---|---|
{ "sessionParam": string, "constant": value } |
Fields | |
---|---|
sessionParam |
Optional. The session parameter to be used to initialize the slot value, if it has a non-empty value. The type of the value must match the type of the slot. Note that nested paths are not currently supported. Eg: |
constant |
Optional. Constant default value for the slot. This will only be used if a value for this slot was not populated through the |
DataFiles
Wrapper for repeated data file. Repeated fields cannot exist in a oneof.
JSON representation | |
---|---|
{
"dataFiles": [
{
object ( |
Fields | |
---|---|
dataFiles[] |
Multiple data files. |
DataFile
Represents a single file which contains unstructured data. Examples include image files, audio files, and cloud function source code.
JSON representation | |
---|---|
{ "filePath": string, "contentType": string, "payload": string } |
Fields | |
---|---|
filePath |
Relative path of the data file from the project root in the SDK file structure. Allowed file paths: - Images: |
contentType |
Required. The content type of this asset. Example: |
payload |
Content of the data file. Examples would be raw bytes of images, audio files, or cloud function zip format. There is 10 MB strict limit on the payload size. A base64-encoded string. |