条件式费率是一种价格规则,可让您根据用户的设备、国家/地区或用户是否已登录 Google 等条件为行程提供不同的费率。
如果行程或客房套餐有多个公开费率或条件式费率,用户会看到最低费率。Google 始终会为用户选择符合条件的最低房价。
概览
条件式费率会显示在标准价格广告位中,并且仅向搜索内容符合关联条件式费率的条件的用户显示。这些条件可以基于以下条件:
如需启用条件式费率,请修改以下内容:
费率规则 XML 文件:定义应用条件式费率的条件。
价格 Feed:在交易消息中使用
<Rate>
元素设置费率。着陆页文件:向深层链接添加特定于费率规则的值。
设备专用条件式费率
设备专用费率是指只有使用特定设备(例如移动设备、平板电脑或桌面设备)的用户才能查看和预订的酒店房价。这些费率由 Google 的合作伙伴提供,最终用户可以在合作伙伴网站上查看和预订相同的设备专用费率。
适用于特定国家/地区的条件式费率
针对特定国家/地区的房价是指只有搜索特定国家/地区酒店的用户才能看到和预订的酒店房价。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>
无公开双人间
以下示例展示了包含无公开双人入住费率的条件式费率的 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)¤cy=(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)¤cy=(USER-CURRENCY)
此示例在两个着陆页之间进行选择,具体取决于是否设置了费率规则 ID。
如需了解详情,请参阅使用变量和条件。