条件式费率

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

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

概览

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

要启用条件式费率,请修改以下内容:

针对特定设备的条件式费率

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

fenced_rates

在特定国家/地区的条件式费率

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

针对特定语言的条件式费率

特定语言的费率仅适用于在 Google 中使用特定语言设置搜索酒店的用户。特定于语言的条件使用 <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>
        <!-- NOTE: OtherFees is inherited from the above setting -->
        <Custom1>ratecode123</Custom1>
      </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. 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>
      <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>

禁止公共双人入住

以下示例展示了一条交易消息,其中包含没有公开双人入住费率的条件式费率

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

更新着陆页文件

为确保符合条件的最终用户可以通过深层链接预订折扣费率,请修改着陆页文件。为了正确显示和履行折扣费率,预订网站上可能还需要进行其他实现。

我们希望合作伙伴能够兑现通过条件式费率深层链接显示的价格。

在动态深层链接中,您可以通过名称、<RateRule> 元素的 id 属性以及 RATE-RULE-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。

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