Using Fenced Rates

Fenced rates let you offer different rates for your itineraries, based on the end-user's device and domain.

Overview

Fenced rates show in the standard pricing slots and only to users whose searches meet the criteria for the associated fenced rates.

Hotel Prices supports the following types of rates:

  • Device-specific rates
  • Domain-specific rates
  • Signed-in rates

Device-specific 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.

Domain-specific rates

Domain-specific rates are hotel rates that are only visible to and bookable by users who are searching for hotels on a specific Google domain, such as google.co.uk. The rates are provided by Google's partners and users can see and book the same domain-specific rates on the partner’s own domain-specific site.

Signed-in 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.

Implementation of Fenced Rates

In order to enable fenced rates, you will need to complete the following sections:

Rate Rule Definition file

You define rate rules using a Rate Rule Definition file, and send them via email to your Technical Account Manager (TAM). This section describes the Rate Rule Definition file syntax.

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 devices to which the device-specific rates apply. -->
      <UserDeviceType>device_type</UserDeviceType>
      ...

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

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

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

The following table describes the child elements of the <RateRule> element:

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

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.

<UserDeviceType> Optional Defines the device type condition for this rate rule. Possible values are:
  • mobile
  • desktop
  • tablet
<UserCountry> Optional Specifies the two-character 2-letter country code (ISO 3166-1 alpha-2) for this rate rule's country condition. The country code is for the Google Domain from which the user is searching.
<PackageType> Optional Indicates that this rate is part of a package. Possible values are:
  • flight

Rate Rule Definition examples

The following examples show various ways to define fenced rates.

Example 1. All Mobile Users

<PrivateRates>
 <RateRule id="mobile">
    <Description>Mobile users</Description>
    <UserRateCondition op="all">
       <UserDeviceType>mobile</UserDeviceType>
    </UserRateCondition>
  </RateRule>
</PrivateRates>

Example 2. 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="any">
       <UserDeviceType>mobile</UserDeviceType>
       <UserCountry>US</UserCountry>
       <UserCountry>GB</UserCountry>
    </UserRateCondition>
  </RateRule>
</PrivateRates>

Example 3. 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>

Example 4. 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>

Example 5. 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>

Example 6. 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>

Price Feed elements

To send us prices for fenced rates, you will need to modify the Price Feed Transaction Messages.

You set fenced rates in a similar way to other rates: using the <Rate> element in your transaction messages. The <Rate> element may be used as a repeated child of <Rates> within the <RoomBundle> or <Result> elements. For it to be a fenced 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 fenced <Rates> that are sent to us in this case will be considered valid.

The <Rate> element supports the following child elements, as described Result Element:

  • <AllowablePointsOfSale>
  • <Baserate>
  • <ChargeCurrency>
  • <Refundable>
  • <OtherFees>
  • <Tax>
  • <Custom[1-5]>
<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2014-07-18T11:22:33-04:00">
  <Result>
    <Property>1234</Property>
    <Checkin>2010-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>
      <Rate rate_rule_id="mobile">
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <!-- note - OtherFees comes from above -->
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

Example 2. Rate under a <RoomBundle>

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2014-07-18T11:22:33-04:00">
  <Result>
    <Property>1234</Property>
    <Checkin>2010-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>3</RoomID>  <!-- Links to data in metadata -->
      <RatePlanID>basic</RatePlanID>
      <Baserate currency="USD">300.00</Baserate>
      <Tax currency="USD">30.00</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <ChargeCurrency>web</ChargeCurrency>
      <BreakfastIncluded>1</BreakfastIncluded>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">275.00</Baserate>
          <Tax currency="USD">27.50</Tax>
          <OtherFees currency="USD">2.00</OtherFees>
        </Rates>
      </Rates>

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

Example 3. Multiple Rates under a <RoomBundle>

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2014-07-18T11:22:33-04:00">
  <Result>
    <Property>1234</Property>
    <Checkin>2010-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>5</RoomID>
      <Baserate currency="USD">300.00</Baserate>
      <Tax currency="USD">30.00</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <InternetIncluded>1</InternetIncluded>

      <!-- "mobile" overrides chargeCurrency, "us_or_gb" doesn’t -->
      <ChargeCurrency>web</ChargeCurrency>
      <!-- both Rates override Custom1 -->
      <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.12</Tax>
          <OtherFees currency="USD">2.00</OtherFees>
          <ChargeCurrency>hotel</ChargeCurrency>
          <Custom1>ratecode321</Custom1>
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.12</Tax>
          <OtherFees currency="USD">2.00</OtherFees>
          <Custom1>ratecode432</Custom1>
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

Example 4. Fenced Rate with no public double occupancy rate

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2014-07-18T11:22:33-04:00">
  <Result>
    <Property>1234</Property>
    <Checkin>2010-06-10</Checkin>
    <Nights>1</Nights>

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

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

Points of Sale for Fenced Rates

To ensure that eligible end-users can book the discounted rate through a deep link, you might be required to modify your Points of Sale 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.

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 Points of Sale 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 Building Dynamic POS URLs.

Country Codes for <UserCountry>

Here are the country codes for which Google domains match:

Google Domain Country Code
www.google.com US
www.google.com.br BR
www.google.ca CA
www.google.com.mx MX
www.google.com.au AU
www.google.com.hk HK
www.google.co.in IN
www.google.co.id ID
www.google.co.jp JP
www.google.co.kr KR
www.google.com.my MY
www.google.co.nz NZ
www.google.com.ph PH
www.google.com.sg SG
www.google.com.tw TW
www.google.co.th TH
www.google.com.vn VN
www.google.at AT
www.google.be BE
www.google.bg BG
www.google.hr HR
www.google.cz CZ
www.google.dk DK
www.google.ee EE
www.google.fi FI
www.google.fr FR
www.google.de DE
www.google.com.gh GH
www.google.gr GR
www.google.hu HU
www.google.ie IE
www.google.co.il IL
www.google.it IT
www.google.co.ke KE
www.google.lv LV
www.google.lt LT
www.google.nl NL
www.google.com.ng NG
www.google.no NO
www.google.pl PL
www.google.pt PT
www.google.ro RO
www.google.ru RU
www.google.rs RS
www.google.sn SN
www.google.sk SK
www.google.si SI
www.google.co.za ZA
www.google.es ES
www.google.se SE
www.google.ch CH
www.google.com.tr TR
www.google.co.ug UG
www.google.ua UA
www.google.co.uk GB