Catch up on all the news, sessions, and announcements from Google I/O 2021. Watch now.

Files

Wrapper for a list of files.

JSON representation
{

  // Union field file_type can be only one of the following:
  "configFiles": {
    object (ConfigFiles)
  },
  "dataFiles": {
    object (DataFiles)
  }
  // End of list of possible types for union field file_type.
}
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

object (ConfigFiles)

List of config files. This includes manifest, settings, interaction model resource bundles and more.

dataFiles

object (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 (ConfigFile)
    }
  ]
}
Fields
configFiles[]

object (ConfigFile)

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 file can be only one of the following:
  "manifest": {
    object (Manifest)
  },
  "actions": {
    object (Actions)
  },
  "settings": {
    object (Settings)
  },
  "webhook": {
    object (Webhook)
  },
  "intent": {
    object (Intent)
  },
  "type": {
    object (Type)
  },
  "entitySet": {
    object (EntitySet)
  },
  "globalIntentEvent": {
    object (GlobalIntentEvent)
  },
  "scene": {
    object (Scene)
  },
  "staticPrompt": {
    object (StaticPrompt)
  },
  "accountLinkingSecret": {
    object (AccountLinkingSecret)
  },
  "resourceBundle": {
    object
  }
  // End of list of possible types for union field file.
}
Fields
filePath

string

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

object (Manifest)

Single manifest file. Allowed file path: manifest.yaml

actions

object (Actions)

Single actions file with all the actions defined. Allowed file paths: actions/{language}?/actions.yaml

settings

object (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: settings/{language}?/settings.yaml Note that the non-localized settings file settings/settings.yaml must be present in the write flow requests.

webhook

object (Webhook)

Single webhook definition. Allowed file path: webhooks/{WebhookName}.yaml

intent

object (Intent)

Single intent definition. Allowed file paths: custom/intents/{language}?/{IntentName}.yaml

type

object (Type)

Single type definition. Allowed file paths: custom/types/{language}?/{TypeName}.yaml

entitySet

object (EntitySet)

Single entity set definition. Allowed file paths: custom/entitySets/{language}?/{EntitySetName}.yaml

globalIntentEvent

object (GlobalIntentEvent)

Single global intent event definition. Allowed file paths: custom/global/{GlobalIntentEventName}.yaml The file name (GlobalIntentEventName) should be the name of the intent that this global intent event corresponds to.

scene

object (Scene)

Single scene definition. Allowed file paths: custom/scenes/{SceneName}.yaml

staticPrompt

object (StaticPrompt)

Single static prompt definition. Allowed file paths: custom/prompts/{language}?/{StaticPromptName}.yaml

accountLinkingSecret

object (AccountLinkingSecret)

Metadata corresponding to the client secret used in account linking. Allowed file path: settings/accountLinkingSecret.yaml

resourceBundle

object (Struct format)

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: resources/strings/{language}?/{multiple directories}?/{BundleName}.yaml

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

string

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 (CustomAction)
    },
    ...
  }
}
Fields
custom

map (key: string, value: object (CustomAction))

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 "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

CustomAction

Details regarding a custom action.

JSON representation
{
  "engagement": {
    object (Engagement)
  }
}
Fields
engagement

object (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 (PushNotification)
  },
  "actionLink": {
    object (ActionLink)
  },
  "assistantLink": {
    object (AssistantLink)
  },
  "dailyUpdate": {
    object (DailyUpdate)
  }
}
Fields
title

string

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

object (PushNotification)

Push notification settings that this engagement supports.

dailyUpdate

object (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.

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 (Category),
  "usesTransactionsApi": boolean,
  "usesDigitalPurchaseApi": boolean,
  "usesInteractiveCanvas": boolean,
  "usesHomeStorage": boolean,
  "designedForFamily": boolean,
  "containsAlcoholOrTobaccoContent": boolean,
  "keepsMicOpen": boolean,
  "surfaceRequirements": {
    object (SurfaceRequirements)
  },
  "testingInstructions": string,
  "localizedSettings": {
    object (LocalizedSettings)
  },
  "accountLinking": {
    object (AccountLinking)
  },
  "selectedAndroidApps": [
    string
  ]
}
Fields
projectId

string

Actions project id.

defaultLocale

string

Locale which is default for the project. For all files except under resources/ with no locale in the path, the localized data is attributed to this defaultLocale. For files under resources/ no locale means that the resource is applicable to all locales.

enabledRegions[]

string

Represents the regions where users can invoke your Actions, which is based on the user's location of presence. Cannot be set if disabledRegions is set. If both enabledRegions and disabledRegions are not specified, users can invoke your Actions in all regions. Each region is represented using the Canonical Name of Adwords geotargets. See https://developers.google.com/adwords/api/docs/appendix/geotargeting Examples include: - "Germany" - "Ghana" - "Greece" - "Grenada" - "United Kingdom" - "United States" - "United States Minor Outlying Islands" - "Uruguay"

disabledRegions[]

string

Represents the regions where your Actions are blocked, based on the user's location of presence. Cannot be set if enabledRegions is set. Each region is represented using the Canonical Name of Adwords geotargets. See https://developers.google.com/adwords/api/docs/appendix/geotargeting Examples include: - "Germany" - "Ghana" - "Greece" - "Grenada" - "United Kingdom" - "United States" - "United States Minor Outlying Islands" - "Uruguay"

category

enum (Category)

The category for this Actions project.

usesTransactionsApi

boolean

Whether Actions can use transactions (for example, making reservations, taking orders, etc.). If false, then attempts to use the Transactions APIs fail.

usesDigitalPurchaseApi

boolean

Whether Actions can perform transactions for digital goods.

usesInteractiveCanvas

boolean

Whether Actions use Interactive Canvas.

usesHomeStorage

boolean

Whether Actions use the home storage feature.

designedForFamily

boolean

Whether Actions content is designed for family (DFF).

containsAlcoholOrTobaccoContent

boolean

Whether Actions contains alcohol or tobacco related content.

keepsMicOpen

boolean

Whether Actions may leave mic open without an explicit prompt during conversation.

surfaceRequirements

object (SurfaceRequirements)

The surface requirements that a client surface must support to invoke Actions in this project.

testingInstructions

string

Free-form testing instructions for Actions reviewer (for example, account linking instructions).

localizedSettings

object (LocalizedSettings)

Localized settings for the project's default locale. Every additional locale should have its own settings file in its own directory.

accountLinking

object (AccountLinking)

Allow users to create or link accounts through Google sign-in and/or your own OAuth service.

selectedAndroidApps[]

string

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 (CapabilityRequirement)
    }
  ]
}
Fields
minimumRequirements[]

object (CapabilityRequirement)

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 (SurfaceCapability)
}
Fields
capability

enum (SurfaceCapability)

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 (ThemeCustomization)
  }
}
Fields
displayName

string

Required. The default display name for this Actions project (if there is no translation available)

pronunciation

string

Required. The pronunciation of the display name to invoke it within a voice (spoken) context.

shortDescription

string

Required. The default short description for the Actions project (if there is no translation available). 80 character limit.

fullDescription

string

Required. The default long description for the Actions project (if there is no translation available). 4000 character limit.

smallLogoImage

string

Required. Small square image, 192 x 192 px. This should be specified as a reference to the corresponding image in the resources/images/ directory. For example, $resources.images.foo (without the extension) for image in resources/images/foo.jpg When working on a project pulled from Console, the Google-managed URL pulled could be used. URLs from external sources are not allowed.

largeBannerImage

string

Optional. Large landscape image, 1920 x 1080 px. This should be specified as a reference to the corresponding image in the resources/images/ directory. For example, $resources.images.foo (without the extension) for image in resources/images/foo.jpg When working on a project pulled from Console, the Google-managed URL pulled could be used. URLs from external sources are not allowed.

developerName

string

Required. The name of the developer to be displayed to users.

developerEmail

string

Required. The contact email address for the developer.

termsOfServiceUrl

string

Optional. The terms of service URL.

voice

string

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

string

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

string

Required. The privacy policy URL.

sampleInvocations[]

string

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

object (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 (ImageCornerStyle),
  "landscapeBackgroundImage": string,
  "portraitBackgroundImage": string
}
Fields
backgroundColor

string

Background color of cards. Acts as a fallback if background_image is not provided by developers or background_image doesn't fit for certain surfaces. Example usage: #FAFAFA

primaryColor

string

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

string

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

enum (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

string

Landscape mode (minimum 1920x1200 pixels). This should be specified as a reference to the corresponding image in the resources/images/ directory. Eg: $resources.images.foo (without the extension) for image in resources/images/foo.jpg When working on a project pulled from Console the Google managed url pulled could be used.

portraitBackgroundImage

string

Portrait mode (minimum 1200x1920 pixels). This should be specified as a reference to the corresponding image in the resources/images/ directory. Eg: $resources.images.foo (without the extension) for image in resources/images/foo.jpg When working on a project pulled from Console the Google managed url pulled could be used.

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 (LinkingType),
  "authGrantType": enum (AuthGrantType),
  "appClientId": string,
  "authorizationUrl": string,
  "tokenUrl": string,
  "scopes": [
    string
  ],
  "learnMoreUrl": string,
  "useBasicAuthHeader": boolean
}
Fields
enableAccountCreation

boolean

Required. If true, users are allowed to sign up for new accounts via voice. If false, account creation is only allowed on your website. Select this option if you want to display your terms of service or obtain user consents during sign-up. linkingType cannot be GOOGLE_SIGN_IN when this is false. linkingType cannot be OAUTH when this is true.

linkingType

enum (LinkingType)

Required. The linking type to use. See https://developers.google.com/assistant/identity for further details on the linking types.

authGrantType

enum (AuthGrantType)

Optional. Indicates the type of authentication for OAUTH linkingType.

appClientId

string

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

string

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

string

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[]

string

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

string

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

boolean

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 (Handler)
    }
  ],

  // Union field webhook_type can be only one of the following:
  "httpsEndpoint": {
    object (HttpsEndpoint)
  },
  "inlineCloudFunction": {
    object (InlineCloudFunction)
  }
  // End of list of possible types for union field webhook_type.
}
Fields
handlers[]

object (Handler)

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

object (HttpsEndpoint)

Custom webhook HTTPS endpoint.

inlineCloudFunction

object (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

string

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

string

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 (key: string, value: string)

Map of HTTP parameters to be included in the POST request.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

endpointApiVersion

integer

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

string

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 (IntentParameter)
    }
  ],
  "trainingPhrases": [
    string
  ]
}
Fields
parameters[]

object (IntentParameter)

The list of parameters within the training phrases. All parameters must be defined here to be used in the training phrase.

trainingPhrases[]

string

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 auto field is optional and the default behavior when auto is not specified is equivalent to auto=false. ($<paramName> '<sample text>' auto=<true or false>) auto = true means the part was auto annotated by NLU. auto = false means the part was annotated by the user. This is the default when auto is not specified. Example: "Book a flight from ($source 'San Francisco' auto=false) to ($dest 'Vancouver')"

IntentParameter

Definition of a parameter which can be used inside training phrases.

JSON representation
{
  "name": string,

  // Union field parameter_type can be only one of the following:
  "type": {
    object (ClassReference)
  },
  "entitySetReferences": {
    object (EntitySetReferences)
  }
  // End of list of possible types for union field parameter_type.
}
Fields
name

string

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

object (ClassReference)

Optional. Declares the data type of this parameter. This should not be set for built-in intents.

entitySetReferences

object (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

string

Required. Name of a built-in type or custom type of the parameter. Examples: PizzaToppings, actions.type.Number

list

boolean

Optional. Indicates whether the data type represents a list of values.

EntitySetReferences

Entity set references for an intent parameter.

JSON representation
{
  "entitySetReferences": [
    {
      object (EntitySetReference)
    }
  ]
}
Fields
entitySetReferences[]

object (EntitySetReference)

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

string

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 sub_type can be only one of the following:
  "synonym": {
    object (SynonymType)
  },
  "regularExpression": {
    object (RegularExpressionType)
  },
  "freeText": {
    object (FreeTextType)
  }
  // End of list of possible types for union field sub_type.
}
Fields
exclusions[]

string

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

object (SynonymType)

Synonyms type, which is essentially an enum.

regularExpression

object (RegularExpressionType)

Regex type, allows regular expression matching.

freeText

object (FreeTextType)

FreeText type.

SynonymType

Type that matches text by set of synonyms.

JSON representation
{
  "matchType": enum (MatchType),
  "acceptUnknownValues": boolean,
  "entities": {
    string: {
      object (Entity)
    },
    ...
  }
}
Fields
matchType

enum (MatchType)

Optional. The match type for the synonym.

acceptUnknownValues

boolean

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

map (key: string, value: object (Entity))

Required. Named map of synonym entities.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

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 (EntityDisplay)
  },
  "synonyms": [
    string
  ]
}
Fields
display

object (EntityDisplay)

Optional. The entity display details.

synonyms[]

string

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

string

Optional. Title of the icon.

iconUrl

string

Required. Url of the icon.

RegularExpressionType

Type that matches text by regular expressions. This message is localizable.

JSON representation
{
  "entities": {
    string: {
      object (Entity)
    },
    ...
  }
}
Fields
entities

map (key: string, value: object (Entity))

Required. Named map of entities which each contain Regex strings.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Entity

Represents an entity object that contains the regular expression that is used for comparison.

JSON representation
{
  "display": {
    object (EntityDisplay)
  },
  "regularExpressions": [
    string
  ]
}
Fields
display

object (EntityDisplay)

Optional. Elements that will be displayed on the canvas once an entity is extracted from a query. Only relevant for canvas enabled apps.

regularExpressions[]

string

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 (EntityDisplay)
  }
}
Fields
display

object (EntityDisplay)

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 (Entity)
    }
  ]
}
Fields
entities[]

object (Entity)

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

string

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 (EventHandler)
  }
}
Fields
transitionToScene

string

Optional. Destination scene which the conversation should jump to. The state of the current scene is destroyed on the transition.

handler

object (EventHandler)

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 prompt can be only one of the following:
  "staticPrompt": {
    object (StaticPrompt)
  },
  "staticPromptName": string
  // End of list of possible types for union field prompt.
}
Fields
webhookHandler

string

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

object (StaticPrompt)

Inlined static prompt. Can contain references to string resources in bundles.

staticPromptName

string

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 (StaticPromptCandidate)
    }
  ]
}
Fields
candidates[]

object (StaticPromptCandidate)

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 (Selector)
  },
  "promptResponse": {
    object (StaticPromptResponse)
  }
}
Fields
selector

object (Selector)

Optional. The criteria for whether this prompt matches a request. If the selector is empty, this prompt will always be triggered.

promptResponse

object (StaticPromptResponse)

The prompt response associated with the selector.

Selector

Defines the criteria for whether a prompt matches a request.

JSON representation
{
  "surfaceCapabilities": {
    object (SurfaceCapabilities)
  }
}
Fields
surfaceCapabilities

object (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 (Capability)
  ]
}
Fields
capabilities[]

enum (Capability)

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.
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 (StaticSimplePrompt)
  },
  "content": {
    object (StaticContentPrompt)
  },
  "lastSimple": {
    object (StaticSimplePrompt)
  },
  "suggestions": [
    {
      object (Suggestion)
    }
  ],
  "link": {
    object (StaticLinkPrompt)
  },
  "override": boolean,
  "canvas": {
    object (StaticCanvasPrompt)
  }
}
Fields
firstSimple

object (StaticSimplePrompt)

Optional. The first voice and text-only response.

content

object (StaticContentPrompt)

Optional. A content like a card, list or media to display to the user.

lastSimple

object (StaticSimplePrompt)

Optional. The last voice and text-only response.

suggestions[]

object (Suggestion)

Optional. Suggestions to be displayed to the user which will always appear at the end of the response. If the append field in the containing prompt is true the titles defined in this field will be added to titles defined in any previously defined suggestions prompts and duplicate values will be removed.

override

boolean

Optional. Mode for how this messages should be merged with previously defined messages. true will clear all previously defined messages (first and last simple, content, suggestions link and canvas) and add messages defined in this prompt. false will add messages defined in this prompt to messages defined in previous responses. Setting this field to false will also enable appending to some fields inside Simple prompts, the Suggestions prompt and the Canvas prompt (part of the Content prompt). The Content and Link messages will always be overwritten if defined in the prompt. Default value is false.

canvas

object (StaticCanvasPrompt)

A response to be used for interactive canvas experience.

StaticSimplePrompt

Represents a simple prompt to be send to a user.

JSON representation
{
  "variants": [
    {
      object (Variant)
    }
  ]
}
Fields
variants[]

object (Variant)

List of possible variants.

Variant

Represents a variant which is part of the simple prompt.

JSON representation
{
  "speech": string,
  "text": string
}
Fields
speech

string

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 override field in the containing prompt is true the speech defined in this field will override previous Simple prompt's speech.

text

string

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 override field in the containing prompt is true the text defined in this field will override previous Simple prompt's text.

StaticContentPrompt

A placeholder for the Content part of a StaticPrompt.

JSON representation
{

  // Union field content can be only one of the following:
  "card": {
    object (StaticCardPrompt)
  },
  "image": {
    object (StaticImagePrompt)
  },
  "table": {
    object (StaticTablePrompt)
  },
  "media": {
    object (StaticMediaPrompt)
  },
  "list": {
    object (StaticListPrompt)
  },
  "collection": {
    object (StaticCollectionPrompt)
  },
  "collectionBrowse": {
    object (StaticCollectionBrowsePrompt)
  }
  // End of list of possible types for union field content.
}
Fields
Union field content. Only one type of content can be present in a Prompt. content can be only one of the following:
card

object (StaticCardPrompt)

A basic card.

image

object (StaticImagePrompt)

An image.

table

object (StaticTablePrompt)

Table card.

media

object (StaticMediaPrompt)

Response indicating a set of media to be played.

list

object (StaticListPrompt)

A card for presenting a list of options to select from.

collection

object (StaticCollectionPrompt)

A card presenting a list of options to select from.

collectionBrowse

object (StaticCollectionBrowsePrompt)

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 (StaticImagePrompt)
  },
  "imageFill": enum (ImageFill),
  "button": {
    object (StaticLinkPrompt)
  }
}
Fields
title

string

Optional. Overall title of the card.

subtitle

string

Optional. Subtitle of the card.

text

string

Required. Body text of the card which is needed unless image is present. Supports a limited set of markdown syntax for formatting.

image

object (StaticImagePrompt)

Optional. A hero image for the card. The height is fixed to 192dp.

imageFill

enum (ImageFill)

Optional. How the image background will be filled.

button

object (StaticLinkPrompt)

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

string

Required. The source url of the image. Images can be JPG, PNG and GIF (animated and non-animated). For example,https://www.agentx.com/logo.png.

alt

string

Required. A text description of the image to be used for accessibility, e.g. screen readers.

height

integer

Optional. The height of the image in pixels.

width

integer

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 (OpenUrl)
  }
}
Fields
name

string

Name of the link

open

object (OpenUrl)

Defines behavior when the user opens the link.

OpenUrl

Defines behavior when the user opens the link.

JSON representation
{
  "url": string,
  "hint": enum (UrlHint)
}
Fields
url

string

The url field which could be any of: - http/https urls for opening an App-linked App or a webpage

hint

enum (UrlHint)

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 (StaticImagePrompt)
  },
  "columns": [
    {
      object (TableColumn)
    }
  ],
  "rows": [
    {
      object (TableRow)
    }
  ],
  "button": {
    object (StaticLinkPrompt)
  }
}
Fields
title

string

Optional. Overall title of the table. Must be set if subtitle is set.

subtitle

string

Optional. Subtitle for the table.

image

object (StaticImagePrompt)

Optional. Image associated with the table.

columns[]

object (TableColumn)

Optional. Headers and alignment of columns.

rows[]

object (TableRow)

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 WEB_BROWSER capability, you can point the user to a web page with more data.

button

object (StaticLinkPrompt)

Optional. Button.

TableColumn

Describes a column in the table.

JSON representation
{
  "header": string,
  "align": enum (HorizontalAlignment)
}
Fields
header

string

Header text for the column.

align

enum (HorizontalAlignment)

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 (TableCell)
    }
  ],
  "divider": boolean
}
Fields
cells[]

object (TableCell)

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

boolean

Indicates whether there should be a divider after each row.

TableCell

Describes a cell in a row.

JSON representation
{
  "text": string
}
Fields
text

string

Text content of the cell.

StaticMediaPrompt

Contains information about the media, such as name, description, url, etc. Next id: 11

JSON representation
{
  "mediaType": enum (MediaType),
  "startOffset": string,
  "optionalMediaControls": [
    enum (OptionalMediaControls)
  ],
  "mediaObjects": [
    {
      object (MediaObject)
    }
  ],
  "repeatMode": enum (RepeatMode)
}
Fields
mediaType

enum (MediaType)

Media type of this response.

startOffset

string (Duration format)

Start offset of the first media object.

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

optionalMediaControls[]

enum (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[]

object (MediaObject)

List of media objects.

repeatMode

enum (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 (MediaImage)
  }
}
Fields
name

string

Name of this media object.

description

string

Description of this media object.

url

string

The url pointing to the media content.

image

object (MediaImage)

Image to show with the media card.

MediaImage

Image to be shown inside a MediaPrompt.

JSON representation
{

  // Union field image can be only one of the following:
  "large": {
    object (StaticImagePrompt)
  },
  "icon": {
    object (StaticImagePrompt)
  }
  // End of list of possible types for union field image.
}
Fields
Union field image. Only one type of MediaImage is allowed. image can be only one of the following:
large

object (StaticImagePrompt)

A large image, such as the cover of the album, etc.

icon

object (StaticImagePrompt)

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 (ListItem)
    }
  ]
}
Fields
title

string

Optional. Title of the list.

subtitle

string

Optional. Subtitle of the list.

items[]

object (ListItem)

Required. List items.

ListItem

An item in the list.

JSON representation
{
  "key": string,
  "title": string,
  "description": string,
  "image": {
    object (StaticImagePrompt)
  }
}
Fields
key

string

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

string

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

string

Optional. Body text of the item.

image

object (StaticImagePrompt)

Optional. Item image.

StaticCollectionPrompt

A card for presenting a collection of options to select from.

JSON representation
{
  "title": string,
  "subtitle": string,
  "items": [
    {
      object (CollectionItem)
    }
  ],
  "imageFill": enum (ImageFill)
}
Fields
title

string

Optional. Title of the collection.

subtitle

string

Optional. Subtitle of the collection.

items[]

object (CollectionItem)

Required. Collection items.

imageFill

enum (ImageFill)

Optional. Type of image display option.

CollectionItem

An item in the collection.

JSON representation
{
  "key": string,
  "title": string,
  "description": string,
  "image": {
    object (StaticImagePrompt)
  }
}
Fields
key

string

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

string

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

string

Optional. Body text of the item.

image

object (StaticImagePrompt)

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 (CollectionBrowseItem)
    }
  ],
  "imageFill": enum (ImageFill)
}
Fields
items[]

object (CollectionBrowseItem)

Items in the browse collection. The list size should be in the range [2, 10].

imageFill

enum (ImageFill)

Image display option for images in the collection.

CollectionBrowseItem

Item in the collection.

JSON representation
{
  "title": string,
  "description": string,
  "footer": string,
  "image": {
    object (StaticImagePrompt)
  },
  "openUriAction": {
    object (OpenUrl)
  }
}
Fields
title

string

Required. Title of the collection item.

description

string

Description of the collection item.

footer

string

Footer text for the collection item, displayed below the description. Single line of text, truncated with an ellipsis.

image

object (StaticImagePrompt)

Image for the collection item.

openUriAction

object (OpenUrl)

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

string

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

string

Required. URL of the web view to load.

data[]

value (Value format)

Optional. JSON data to be passed through to the immersive experience web page as an event. If the override field in the containing prompt is false data values defined in this Canvas prompt will be added after data values defined in previous Canvas prompts.

suppressMic

boolean

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

boolean

Optional. If true, conversation related metadata is included and send back to the canvas application.

enableFullScreen

boolean

Optional. If true the canvas application occupies the full screen and won't have a header at the top. A toast message will also be displayed on the loading screen that includes the Action's display name, the developer's name, and instructions for exiting the Action. Default value: false.

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 (EventHandler)
  },
  "intentEvents": [
    {
      object (IntentEvent)
    }
  ],
  "conditionalEvents": [
    {
      object (ConditionalEvent)
    }
  ],
  "slots": [
    {
      object (Slot)
    }
  ],
  "onSlotUpdated": {
    object (EventHandler)
  }
}
Fields
onEnter

object (EventHandler)

Handler to invoke when transitioning into this scene.

intentEvents[]

object (IntentEvent)

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[]

object (ConditionalEvent)

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[]

object (Slot)

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

object (EventHandler)

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 (EventHandler)
  }
}
Fields
intent

string

Required. Intent triggering the event.

transitionToScene

string

Optional. Destination scene which the conversation should jump to. The state of the current scene is destroyed on the transition.

handler

object (EventHandler)

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 (EventHandler)
  }
}
Fields
condition

string

Required. Filter condition for this event to trigger. If condition is evaluated to true then the associated handler will be triggered. The following variable references are supported: $session - To reference data in session storage. $user - To reference data in user storage. The following boolean operators are supported (with examples): && - session.params.counter > 0 && session.params.counter < 100 || - session.params.foo == "John" || session.params.counter == "Adam" ! - !(session.params.counter == 5) The following comparisons are supported: ==, !=, <, >, <=, >= The following list and string operators are supported (with examples): in - "Watermelon" in session.params.fruitList size - size(session.params.fruitList) > 2 substring - session.params.fullName.contains("John")

transitionToScene

string

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

object (EventHandler)

Optional. Event handler which is triggered when the associated condition is evaluated to true. Should execute before transitioning to the destination scene. Useful to generate Prompts in response to events.

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 (ClassReference)
  },
  "required": boolean,
  "promptSettings": {
    object (PromptSettings)
  },
  "commitBehavior": {
    object (CommitBehavior)
  },
  "config": value,
  "defaultValue": {
    object (DefaultValue)
  }
}
Fields
name

string

Required. Name of the slot.

type

object (ClassReference)

Required. Declares the data type of this slot.

required

boolean

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

object (PromptSettings)

Optional. Registers Prompts for different stages of slot filling.

commitBehavior

object (CommitBehavior)

Optional. Commit behavior associated with the slot.

config

value (Value format)

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 userSelectedSkuId:

{ "@type": "type.googleapis.com/ google.actions.transactions.v3.CompletePurchaseValueSpec", "skuId": { "skuType": "SKU_TYPE_IN_APP", "id": "$session.params.userSelectedSkuId", "packageName": "com.example.company" } }

defaultValue

object (DefaultValue)

Optional. Configuration to populate a default value for this slot.

PromptSettings

A single place where slot prompts are defined.

JSON representation
{
  "initialPrompt": {
    object (EventHandler)
  },
  "noMatchPrompt1": {
    object (EventHandler)
  },
  "noMatchPrompt2": {
    object (EventHandler)
  },
  "noMatchFinalPrompt": {
    object (EventHandler)
  },
  "noInputPrompt1": {
    object (EventHandler)
  },
  "noInputPrompt2": {
    object (EventHandler)
  },
  "noInputFinalPrompt": {
    object (EventHandler)
  }
}
Fields
initialPrompt

object (EventHandler)

Prompt for the slot value itself. Example: "What size did you want?"

noMatchPrompt1

object (EventHandler)

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

object (EventHandler)

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

object (EventHandler)

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

object (EventHandler)

Prompt to give when the user does not provide an input for the first time. Example: "Sorry, I didn't get that."

noInputPrompt2

object (EventHandler)

Prompt to give when the user does not provide an input for the second time. Example: "Sorry, I didn't get that."

noInputFinalPrompt

object (EventHandler)

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

string

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

string

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: sessionParam = "fruit" corresponds to $session.params.fruit. sessionParam = "ticket" corresponds to $session.params.ticket.

constant

value (Value format)

Optional. Constant default value for the slot. This will only be used if a value for this slot was not populated through the sessionParam. The type for this value must match the type of the slot.

DataFiles

Wrapper for repeated data file. Repeated fields cannot exist in a oneof.

JSON representation
{
  "dataFiles": [
    {
      object (DataFile)
    }
  ]
}
Fields
dataFiles[]

object (DataFile)

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

string

Relative path of the data file from the project root in the SDK file structure. Allowed file paths: - Images: resources/images/{multiple directories}?/{ImageName}.{extension} - Audio: resources/audio/{multiple directories}?/{AudioFileName}.{extension} - Inline Cloud Function Code: webhooks/{WebhookName}.zip Allowed extensions: - Images: png, jpg, jpeg - Audio: mp3, mpeg - Inline Cloud Functions: zip

contentType

string

Required. The content type of this asset. Example: text/html. The content type must comply with the specification (http://www.w3.org/Protocols/rfc1341/4_Content-Type.html). Cloud functions must be in zip format and the content type should be application/zip;zip_type=cloud_function. The zip_type parameter indicates that the zip is for a cloud function.

payload

string (bytes format)

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.