Create lodging reservation

Action ID
actions.intent.CREATE_LODGING_RESERVATION
Description

Search for available hotel or other lodging reservations in an app. Populate the search criteria using the details that best match your app's search functionality. For example, you can populate the address using the lodgingReservation.reservationFor.address intent parameter and (if available) the check-in time with lodgingReservation.reservationFor.checkinTime. Filter available reservations using information from the lodgingReservation.reservationFor.description parameter, if available.

If enough fields are populated to perform a search, your app can directly show search results. Your app must confirm with the user before creating a reservation.

.

Locale support

Functionality Locales
Preview creation using App Actions test tool en-US
User invocation from Google Assistant en-US

Example queries

The following fields represent essential information that users often provide in queries that trigger this built-in intent:

lodgingReservation.reservationFor.address
lodgingReservation.reservationFor.brand.name

Other supported fields

The following fields represent information that users often provide to disambiguate their needs or otherwise improve their results:

lodgingReservation.@type
lodgingReservation.reservationFor.@type
lodgingReservation.reservationFor.brand.@type
lodgingReservation.reservationFor.checkinTime
lodgingReservation.reservationFor.description

Supported text values by field




Inventory availability by field




Sample actions.xml

For information about the actions schema, read Create actions.xml.

Handle intent parameters as URL parameters

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.CREATE_LODGING_RESERVATION">
    <fulfillment urlTemplate="myapp://custom-deeplink{?address,checkinTime,description,name}">
      <!-- Eg. address = "123 Main Street, San Francisco, CA 12345" -->
      <!-- (Optional) Require a field eg.address for fulfillment with required="true" -->
      <parameter-mapping urlParameter="address" intentParameter="lodgingReservation.reservationFor.address" required="true" />
      <!-- Eg. checkinTime = "2011-12-20T23:59:59" -->
      <parameter-mapping urlParameter="checkinTime" intentParameter="lodgingReservation.reservationFor.checkinTime" />
      <!-- Eg. description = "hostel" -->
      <parameter-mapping urlParameter="description" intentParameter="lodgingReservation.reservationFor.description" />
      <!-- Eg. name = "Example Hotel Chain" -->
      <parameter-mapping urlParameter="name" intentParameter="lodgingReservation.reservationFor.brand.name" />
    </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 to discover URLs for fulfillment

lodgingReservation.reservationFor.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/.*.

<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.CREATE_LODGING_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="lodgingReservation.reservationFor.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": "LodgingReservation",
  "reservationFor": {
    "@type": "Hotel",
    "address": "123 Main Street, San Francisco, CA 12345",
    "brand": {
      "@type": "Brand",
      "name": "Example Hotel Chain"
    },
    "checkinTime": "2011-12-20T23:59:59",
    "description": "hostel"
  }
}