- Action ID
actions.intent.UPDATE_RESERVATION
- Description
-
Check in to a flight or hotel reservation. If more information is necessary to check-in, start the check-in flow by searching for the appropriate trip.
For flight check-ins, the value of the
reservation.reservationFor.@type
intent parameter is "Flight". Determine the flight with the departure time, departure airport IATA code, and arrival airport IATA code using thereservation.reservationFor.departureTime
,reservation.reservationFor.departureAirport.iataCode
, andreservation.reservationFor.arrivalAirport.iataCode
intent parameters, if available.For hotel check-ins, the value of the
reservation.reservationFor.@type
intent parameter is "Hotel". Determine the hotel with the hotel name, address, and check-in time using thereservation.reservationFor.name
,reservation.reservationFor.address
, andreservation.reservationFor.checkinTime
intent parameters, if available.
Locale support
Functionality | Locales |
---|---|
Preview creation using App Actions test tool | en-US |
User invocation from Google Assistant | en-US |
Example queries
Recommended fields
The following fields represent essential information that users often provide in queries that trigger this built-in intent:
reservation.reservationFor.@type
reservation.reservationFor.checkinTime
Other supported fields
The following fields represent information that users often provide to disambiguate their needs or otherwise improve their results:
reservation.@type
reservation.reservationFor.address
reservation.reservationFor.arrivalAirport.@type
reservation.reservationFor.arrivalAirport.address
reservation.reservationFor.arrivalAirport.iataCode
reservation.reservationFor.departureAirport.@type
reservation.reservationFor.departureAirport.address
reservation.reservationFor.departureAirport.iataCode
reservation.reservationFor.departureTime
reservation.reservationFor.name
Supported text values by field
Inventory availability by field
Sample XML files
For information about the actions.xml
schema, see Create actions.xml. For information about the shortcuts.xml
schema, see Create shorcuts.xml.
Handle BII parameters
shortcuts.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample shortcuts.xml -->
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<capability android:name="actions.intent.UPDATE_RESERVATION">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
android:targetClass="YOUR_TARGET_CLASS">
<!-- Eg. departureTime = "2011-12-20T23:59:59" -->
<parameter
android:name="reservation.reservationFor.departureTime"
android:key="departureTime"/>
<!-- Eg. arrivalAirportAddress = "123 Main Street, San Francisco, CA 12345" -->
<parameter
android:name="reservation.reservationFor.arrivalAirport.address"
android:key="arrivalAirportAddress"/>
<!-- Eg. arrivalAirportIatacode = "SFO" -->
<parameter
android:name="reservation.reservationFor.arrivalAirport.iataCode"
android:key="arrivalAirportIatacode"/>
<!-- Eg. departureAirportAddress = "456 Market Street, New York, NY 67890" -->
<parameter
android:name="reservation.reservationFor.departureAirport.address"
android:key="departureAirportAddress"/>
<!-- Eg. departureAirportIatacode = "JFK" -->
<parameter
android:name="reservation.reservationFor.departureAirport.iataCode"
android:key="departureAirportIatacode"/>
</intent>
</capability>
</shortcuts>
actions.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
<action intentName="actions.intent.UPDATE_RESERVATION">
<fulfillment urlTemplate="myapp://custom-deeplink{?departureTime,arrivalAirportAddress,arrivalAirportIatacode,departureAirportAddress,departureAirportIatacode}">
<!-- e.g. departureTime = "2011-12-20T23:59:59" -->
<!-- (Optional) Require a field eg.departureTime for fulfillment with required="true" -->
<parameter-mapping urlParameter="departureTime" intentParameter="reservation.reservationFor.departureTime" required="true" />
<!-- e.g. arrivalAirportAddress = "123 Main Street, San Francisco, CA 12345" -->
<parameter-mapping urlParameter="arrivalAirportAddress" intentParameter="reservation.reservationFor.arrivalAirport.address" />
<!-- e.g. arrivalAirportIatacode = "SFO" -->
<parameter-mapping urlParameter="arrivalAirportIatacode" intentParameter="reservation.reservationFor.arrivalAirport.iataCode" />
<!-- e.g. departureAirportAddress = "456 Market Street, New York, NY 67890" -->
<parameter-mapping urlParameter="departureAirportAddress" intentParameter="reservation.reservationFor.departureAirport.address" />
<!-- e.g. departureAirportIatacode = "JFK" -->
<parameter-mapping urlParameter="departureAirportIatacode" intentParameter="reservation.reservationFor.departureAirport.iataCode" />
</fulfillment>
<!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
<fulfillment urlTemplate="myapp://deeplink" />
</action>
</actions>
Use web inventory
reservation.reservationFor.arrivalAirport.address
is a field
that supports web inventory.
In the following example, Google Assistant performs a web search for the user
query and determines the fulfillment URL. Assistant filters for search results
that match the provided urlFilter
value of
https://www.mywebsite.com/link1/.*
.
shortcuts.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample shortcuts.xml -->
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<capability android:name="actions.intent.UPDATE_RESERVATION">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
android:targetClass="YOUR_TARGET_CLASS">
<parameter android:name="reservation.reservationFor.departureTime">
<data android:pathPattern="https://www.mywebsite.com/link1/.*"/>
</parameter>
<parameter android:name="reservation.reservationFor.arrivalAirport.address">
<data android:pathPattern="https://www.mywebsite.com/link2/.*"/>
</parameter>
<parameter android:name="reservation.reservationFor.arrivalAirport.iataCode">
<data android:pathPattern="https://www.mywebsite.com/link3/.*"/>
</parameter>
<parameter android:name="reservation.reservationFor.departureAirport.address">
<data android:pathPattern="https://www.mywebsite.com/link4/.*"/>
</parameter>
<parameter android:name="reservation.reservationFor.departureAirport.iataCode">
<data android:pathPattern="https://www.mywebsite.com/link5/.*"/>
</parameter>
</intent>
</capability>
</shortcuts>
actions.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
<action intentName="actions.intent.UPDATE_RESERVATION">
<!-- Use URL from entity match for deep link fulfillment -->
<!-- Example: url = 'https://www.mywebsite.com/link1/item1' -->
<fulfillment urlTemplate="{@url}" />
<!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
<fulfillment urlTemplate="myapp://deeplink" />
<!-- Define parameters with web inventories using urlFilter -->
<parameter name="reservation.reservationFor.arrivalAirport.address">
<entity-set-reference urlFilter="https://www.mywebsite.com/link1/.*" />"/>
</parameter>
</action>
</actions>
JSON-LD sample
The following JSON-LD sample provides some example values that you can use in the App Actions test tool:
{ "@context": "http://schema.org", "@type": "Reservation", "reservationFor": { "@type": "Flight", "arrivalAirport": { "@type": "Airport", "address": "123 Main Street, San Francisco, CA 12345", "iataCode": "SFO" }, "departureAirport": { "@type": "Airport", "address": "456 Market Street, New York, NY 67890", "iataCode": "JFK" }, "departureTime": "2011-12-20T23:59:59" } } { "@context": "http://schema.org", "@type": "Reservation", "reservationFor": { "@type": "Hotel", "address": "123 Main Street, San Francisco, CA 12345", "checkinTime": "2011-12-20T23:59:59", "name": "Example Hotel Name" } }