条件式费率

条件式价格是一种价格规则,可让您根据用户设备、国家/地区或用户是否已登录 Google 等条件,为行程提供不同的价格。

如果某个行程或客房套餐有多个公开费率或条件式费率,用户将看到最低的费率。Google 始终会为用户选择符合条件的最低价格。

概览

条件式价格会显示在标准定价广告位中,并且仅向搜索内容符合相关条件式价格条件的用户显示。 这些条件可以基于以下因素:

如需启用条件房价,请修改以下内容:

特定于设备的条件式价格

特定设备专享房价是指仅在特定设备(例如移动设备、平板电脑或桌面设备)上对用户显示并可供用户预订的酒店房价。这些费率由 Google 的合作伙伴提供,最终用户可以在合作伙伴的网站上看到并预订相同的设备专用费率。

fenced_rates

特定国家/地区的条件式价格

特定国家/地区的费率是指只有从特定国家/地区搜索酒店的用户才能看到并预订的酒店费率。Google 会使用最终用户的 IP 地址来确定国家/地区。这些费率由 Google 的合作伙伴提供,最终用户可以在合作伙伴自己的特定国家/地区网站上查看和预订相同的特定国家/地区费率。

特定语言的条件式价格

只有在 Google 中使用特定语言设置搜索酒店的用户才能看到特定语言的费率。使用 <LanguageCode> 元素定义特定于语言的条件。

With Context queries 请求消息中未指定语言。因此,如果您在费率规则中指定了 <LanguageCode>,则“包含上下文”响应应包含所有相关的特定语言费率。

下采样条件式费率

下采样条件式价格仅会显示给随机选择的一部分符合条件的用户。抽样率使用 <MaxUsersPercent> 元素定义,并使用以下公式计算:

MaxUsersPercent = (number of users selected to view rate)/(total eligible users)

已登录账号的条件式价格

只有使用 Google 账号登录的用户才能看到登录率。Google 的合作伙伴提供房价,用户可以在合作伙伴自己的网站上查看和预订房价。登录率使用 <UserSignedIn> 元素定义。

由于 Google 始终会选择符合条件的最低价格,因此如果条件式价格高于在 <Result> 级别设置的价格,系统将永远不会选择条件式价格。为避免这种情况,请移除 <Result> 级别的费率,并对所有费率进行条件设置。或者,您也可以咨询您的技术客户经理,了解如何针对在 <Result> 级别设置的价格使用默认费率规则。

创建费率规则 XML 文件

条件式费率的费率规则是使用费率规则 XML 文件定义的。如需了解详情,请参阅费率规则 XML 参考

更新价格 Feed

条件式费率是使用交易消息中的元素设置的。

<Rate> 元素还可以用作 <RoomBundle><Result> 元素中 <Rates> 的多个子元素。如需将其用作条件费率,您必须将 rate_rule_id 属性的值设置为与您在费率规则 XML 文件中定义的费率规则 ID 相匹配。

如果您没有默认的公开双人入住价格,请将 <Result> 消息的 <Baserate> 子元素的属性设置为 -1。在这种情况下,发送给 Google 的任何条件性 <Rates> 都将被视为有效。

示例

基本价格 + 有条件

以下示例展示了一条包含基本费率和条件费率的交易消息:

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-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>
      </Rate>
    </Rates>

  </Result>
</Transaction>

RoomBundle 单曲

以下示例展示了一条包含 <RoomBundle> 下的单个费率的交易消息

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-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>

RoomBundle 多重

以下示例展示了一个包含 <RoomBundle> 下的多个费率的交易消息:

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>2</Nights>
    <!-- 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 recommended. -->
      <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 and it should be within 50 characters in length for optimal
      performance. For details, see Using Variables and Conditions. -->
      <RatePlanID>5-ABC</RatePlanID>

      <!-- Occupancy is mandatory for RoomBundle elements. -->
      <!-- Elements below will get inherited to nested rate elements. -->
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
      </OccupancyDetails>
      <InternetIncluded>1</InternetIncluded>

      <!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
      <ChargeCurrency>web</ChargeCurrency>

      <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>
        </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>
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

不提供双人间

以下示例展示了一条包含无公开双人入住费率的条件式费率的 Transaction 消息:

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

  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>1</Nights>

    <!-- <Unavailable/> should not be specified when available nested rates
    exist. -->
    <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>

更新着陆页文件

如需确保符合条件的最终用户可以通过深层链接预订折扣价,请修改您的着陆页文件。预订网站可能还需要进行额外的实现,才能正确显示和实现折扣价。

我们希望合作伙伴能够遵守条件费率深层链接中显示的价格。

在动态深层链接中,您可以使用 RATE-RULE-ID 变量按名称(即 <RateRule> 元素的 id 属性)包含费率规则。

以下示例添加了费率规则 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)

着陆页文件还支持 IF-RATE-RULE-ID 指令,可让您根据费率规则是否存在有条件地定义网址的各个部分:

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)

此示例会根据费率规则 ID 是否已设置来选择两个着陆页中的一个。

如需了解详情,请参阅使用变量和条件