Conditional Rates

Conditional rates (previously called fenced rates) let you offer different rates for your itineraries, based on the end-user's device and country, or whether the end-user is signed in to their Google account.

A special kind of conditional rate, a qualified rate, can indicate lower rates are available if the user signs up for a loyalty program.

You can set up and use some conditional rates without contacting your Technical Account Manager (TAM). In particular, qualified rates require that you work with your TAM to set up and use them.

Overview

Conditional rates show in the standard pricing slots, and are visible only to users whose searches meet the criteria for the associated conditional rate. These criteria can be based on:

To enable conditional rates, modify the following:

Device-specific conditional rates

Device-specific rates are hotel rates that are only visible to and bookable by users on a specific device: mobile, tablet, or desktop. The rates are provided by our partners; end-users can see and book the same device-specific rates on the partner’s site.

Note that tablet users are eligible for desktop rates.

Country-specific conditional rates

Country-specific rates are hotel rates that are only visible to and bookable by users who are searching for hotels from a specific country. Google determines the country by looking at the end-user's IP address. The rates are provided by Google's partners and users can see and book the same country-specific rates on the partner’s own country-specific site.

Signed-in conditional rates

Signed-in rates are visible only to users who have signed in with a Google account. The rates are provided by Google's partners, and users can see and book the rates on the partner’s own site.

Create a Rate Rule Definition file

You define rate rules for conditional rates using a Rate Rule Definition file, and send them via email to your Technical Account Manager (TAM).

This section describes how to create a Rate Rule Definition file in XML. You can also do this with the Hotel Ads Center, as described in Conditional Rates.

The root element of a Rate Rule Definition file is the <PrivateRates> element. Within this element, a Rate Rule Definition file requires one or more <RateRule> child elements that define the individual rules. Each <RateRule> child element requires an id attribute, as well as child elements that define the rule itself.

The following shows the Rate Rule Definition file syntax:

<!-- Rate Rule Definition File Syntax -->
<PrivateRates>

  <!-- At least one RateRule is required. The id attribute is required. -->
  <RateRule id="rate_rule_id">

    <!-- Optional. -->
    <Description>rate_rule_description</Description>

    <!-- One or more UserRateCondition elements are required. -->
    <UserRateCondition op="operation_type">

      <!-- Define one or more countries to which the country-specific rates apply. -->
      <UserCountry>country_code</UserCountry>

      <!-- Define one or more devices to which the device-specific rates apply. -->
      <UserDeviceType>device_type</UserDeviceType>

      <!-- Whether or not the user must be signed in to their Google account. -->
      <UserSignedIn>[ true | false ]</UserSignedIn>

      <!-- Define a flight + hotel package. -->
      <PackageType>package_type</PackageType>

    </UserRateCondition>
    ...
  </RateRule>
  ...
</PrivateRates>

The following table describes the child elements of the <RateRule> element in the Rate Rule Definition file:

Element Required? Description
<Description> Optional Describes the rate rule.
<UserRateCondition> Required Contains the filters that define the constraints of your rate rule. This element must contain at least one type of rule (either <UserCountry>, <UserDeviceType>, or <UserSignedIn>).

The op attribute is required. It can be one of the following values:

  • "all": Include end-users that match all of the conditions defined by this rate rule.
  • "any": Include end-users that match any of the conditions defined by this rate rule.
  • "none": Exclude end-users that match any of the conditions defined by this rate rule.

The <UserRateCondition> element is recursive and can be combined to specify multiple AND/OR conditions for your rate rule.

<UserCountry> Optional Specifies the two-letter country code (ISO 3166-1 alpha-2) for this rate rule's country condition. For example, "US" or "DE".

Google determines the end-user's country by looking at their IP address.

<UserDeviceType> Optional Defines the device type condition for this rate rule. Possible values are:

  • "mobile"
  • "desktop"
  • "tablet"
<UserSignedIn> Optional A boolean that specifies whether or not the user must be signed in to their Google account for this rate rule. A value of "true" indicates that the user must be signed in. A value of "false" indicates that the user must not be signed in. If you don't care whether the user is signed in or out, do not include a <UserSignedIn> condition.

<PackageType> Optional Indicates that this rate is part of a package. Possible values are:

  • "flight"

For qualified rates, no Rate Rule Definition file is required. Conditions for qualified rates are configured by your Technical Account Manager (TAM).

Examples

The following examples show various ways to define conditional rates.

All Mobile Users
<PrivateRates>
<RateRule id="mobile">
<Description>Mobile users</Description>
<UserRateCondition op="all">
   <UserDeviceType>mobile</UserDeviceType>
</UserRateCondition>
</RateRule>
</PrivateRates>
Mobile Users searching in the US or GB
<PrivateRates>
<RateRule id="mobile_us_or_uk">
<Description>Mobile users searching in US or GB.</Description>
<UserRateCondition op="all">
   <UserDeviceType>mobile</UserDeviceType>
   <UserCountry>US</UserCountry>
   <UserCountry>GB</UserCountry>
</UserRateCondition>
</RateRule>
</PrivateRates>
Mobile Users not searching in the US or GB
<PrivateRates>
<RateRule id="mobile_not_us_or_gb">
<Description>Mobile users not originating from searches in US or GB.</Description>
<UserRateCondition op="all">
   <UserDeviceType>mobile</UserDeviceType>
   <UserRateCondition op="none">
      <UserCountry>US</UserCountry>
      <UserCountry>GB</UserCountry>
   </UserRateCondition>
</UserRateCondition>
</RateRule>
</PrivateRates>
Users searching in the US or GB
<PrivateRates>
<RateRule id="us_or_gb">
<Description>Users searching in the US or GB.</Description>
<UserRateCondition op="all">
    <UserCountry>US</UserCountry>
    <UserCountry>GB</UserCountry>
</UserRateCondition>
</RateRule>
</PrivateRates>
Flight package rate
<PrivateRates>
<RateRule id="flight_package">
<Description>Rate when packaged with a flight.</Description>
<UserRateCondition op="all">
  <PackageType>flight</PackageType>
</UserRateCondition>
</RateRule>
</PrivateRates>
Signed-in users
<PrivateRates>
<RateRule id="signed_in_users">
<Description>Users who are signed into their Google account</Description>
<UserRateCondition op="all">
  <UserSignedIn>true</UserSignedIn>
</UserRateCondition>
</RateRule>
</PrivateRates>

Update your price feed

You set conditional rates in a similar way to other rates: using the element in a Transaction message.

The <Rate> element may be used as a repeated child of <Rates> within the <RoomBundle> or <Result> elements. For it to be a conditional rate, you must set the value of the rate_rule_id attribute which matches the rate rule ID that you defined in the Rate Rule Definition file.

If you do not have a default public double occupancy rate, then set the <Baserate> child element of the <Result> message to -1. Any conditional <Rates> that are sent to us in this case will be considered valid.

The following example shows a Transaction message that contains a base rate and a conditional rate:

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>1</Nights>

    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>

    <Rates>
      <!-- The rate_rule_id is required when using conditional rates -->
      <Rate rate_rule_id="mobile">
        <!-- Override base rate and taxes for conditional rates -->
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <!-- NOTE: OtherFees is inherited from the above setting -->
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

Rate under a <RoomBundle>

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>

    <Baserate currency="USD">300.00</Baserate>
    <Tax currency="USD">30.00</Tax>
    <OtherFees currency="USD">2.00</OtherFees>

    <RoomBundle>
      <RoomID>single</RoomID>
      <Baserate currency="USD">300.00</Baserate>
      <Tax currency="USD">30.00</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
    </RoomBundle>

    <RoomBundle>
      <RoomID>3</RoomID>  <!-- Links to data in metadata -->
      <RatePlanID>basic</RatePlanID>
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <ChargeCurrency>web</ChargeCurrency>
      <BreakfastIncluded>1</BreakfastIncluded>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">269.00</Baserate>
          <Tax currency="USD">2.69</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
        </Rates>
      </Rates>

    </RoomBundle>
  </Result>
</Transaction>

Multiple Rates under a <RoomBundle>

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>

    <!-- Any attribute listed below will not be inherited between bundles
         or baserates. -->
    <!-- The baserate attribute is optional. -->
    <!-- If a baserate is provided, the pricing must match a specific roombundle
    price provided below. -->
    <Baserate currency="USD">300.00</Baserate>
    <Tax currency="USD">30.00</Tax>
    <OtherFees currency="USD">2.00</OtherFees>

    <!-- When Google receives new room bundle information for an itinerary, all
    previous room bundle pricing is dropped from Google's cache. Thus, if you
    want to delete a specific room bundle from Google's cache, you may do so
    by simply not providing that specific room bundle in subsequent transaction
    messages. -->
    <RoomBundle>
     ...
      <!-- RoomID is required, PackageID is optional. -->
      <RoomID>5</RoomID>
      <PackageID>ABC</PackageID>
      <!-- Baserate is required. -->
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>

      <!-- RatePlanID is optional and represents the unique identifier for a
      room and package data combination. We strongly recommend using RatePlanID
      as a variable to build your dynamic landing page (formerly Point of Sale)
      URL. For details, see Using Variables and Conditions. -->
      <RatePlanID>5-ABC</RatePlanID>

      <!-- Occupancy is mandatory for RoomBundle elements. Occupancy and elements below do not get inherited between
      rates and other roombundles. -->
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
      </OccupancyDetails>
      <InternetIncluded>1</InternetIncluded>

      <!-- Elements below will get inherited between rates and other roombundles
      (and AllowablePOS). -->

      <!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <!-- Neither rate overrides Custom2. -->
      <Custom2>ratebasic</Custom2>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides ChargeCurrency from roombundle. -->
          <ChargeCurrency>hotel</ChargeCurrency>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode321</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode432</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

Conditional Rate with no public double occupancy rate

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">

  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>1</Nights>

    <Baserate currency="USD">-1</Baserate>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>

    <Rates>
      <!-- The rate_rule_id is required when using conditional rates. -->
      <Rate rate_rule_id="mobile">
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <OtherFees currency="USD">1.00</OtherFees>
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

Update your landing page file

To ensure that eligible end-users can book the discounted rate through a deep link, you might be required to modify your Landing Page file. There may be additional implementation needed on the booking website to properly fulfill the discounted rates so that when the user clicks through, your website shows them the discounted rate.

We expect you to honor the price shown at the conditional rate deep link.

In a dynamic deep link, you can include the rate rule by its name (the id attribute of the <RateRule> element) with the RATE-RULE-ID variable.

The following example adds the rate rule ID:

https://bookingsite.com/landing.do?id=(PARTNER-HOTEL-ID)&arrival=(CHECKINDAY)-(CHECKINMONTH)-(CHECKINYEAR)&departure=(CHECKOUTDAY)-(CHECKOUTMONTH)-(CHECKOUTYEAR)&lang=(USER-LANGUAGE)&currency=(USER-CURRENCY)&prid=(RATE-RULE-ID)

The Landing Page file also supports the IF-RATE-RULE-ID directive that lets you conditionally define parts of the URL, based on whether the rate rule exists, as the following example shows:

https://bookingsite.com/(IF-RATE-RULE-ID)privatelanding.do(RATE-RULE-ID)(ELSE)landing.do(ENDIF)?id=(PARTNER-HOTEL-ID)&arrival=(CHECKINDAY)-(CHECKINMONTH)-(CHECKINYEAR)&departure=(CHECKOUTDAY)-(CHECKOUTMONTH)-(CHECKOUTYEAR)&lang=(USER-LANGUAGE)&currency=(USER-CURRENCY)

This example chooses between two landing pages, depending on whether the rate rule ID is set.

For more information, see Using Variables and Conditions.