最佳实践

本指南重点介绍了订餐优惠的要求和示例。

资格要求和政策

本部分重点介绍合作伙伴在提供优惠时必须遵守的重要资格条件。在沙盒 Feed 测试期间,请务必测试您计划发布的所有优惠类型。如果您不确定某项优惠是否符合条件,请与您的 Google 联系人联系。

排除个性化优惠和一次性优惠

为确保提供优质且一致的用户体验,合作伙伴不得提供仅限特定用户群体的优惠。仅为特定用户创建的个性化优惠不符合条件。我们允许提供面向所有用户的平台级优惠,例如面向首次用户或首次在特定餐厅订餐的用户提供的优惠,前提是该优惠在优惠着陆页上向所有用户显示。优惠条件必须在优惠标题和优惠网址着陆页中明确说明。无论是已登录还是未登录您的网站或应用,所有用户都必须能在宣传优惠的着陆页上看到优惠。

提供优惠券代码的优惠

某些优惠需要用户输入优惠券代码,例如“使用代码 SAVE20 可享账单总额八折优惠”。请务必注意,Google 不会显示来自优惠券定义的优惠券代码。合作伙伴可以在 OfferDetails.offer_display_text 中添加此信息,以便向用户显示。基于优惠券的优惠通常分为两类:

  • 当任何用户从 Google 访问时,系统会在结账时自动向其显示优惠券的优惠。这些都是允许的。
  • 如果优惠要求用户在结账时输入优惠券代码,但未在优惠网址着陆页上提供有关如何应用优惠券代码的说明,或者在访问优惠网址时未自动应用优惠券,则此类优惠是不允许的。

优惠内容和结构

本部分详细介绍了 Feed 中提供的优惠的内容和结构要求,包括结构化元数据的示例。

优惠显示文字和优惠规范

OfferDetails.offer_display_text 是一个必需字段,用作 Google 搜索上“优惠”部分中可立即看到的简明标题,例如“立减 10 美元”或“节省 15%”。

OfferDetails.offer_specificationOfferDetails 中的必需的“one of”字段。这意味着,必须且只能提供以下三个字段中的一个来指定交易:

  • discount_value
  • discount_percentage
  • other_offer_details_text

OfferDetails.other_offer_details_text 字段是一个自由格式的文本字段,用于在无法将优惠表示为固定折扣值或百分比时补充 offer_display_text。如果 offer_display_text 已足以传达有关优惠的所有必要信息,则应使用与 offer_display_text 相同的文本填充 other_offer_details_text 字段。不过,对于复杂的交易,此字段应提供有关奖励的具体说明。

结构化元数据字段

为了提高商品信息的清晰度并实现更好的排名和过滤效果,合作伙伴必须在相应的结构化字段中提供商品信息元数据。terms.terms_and_conditions 字段是必需的。该值应包含有关如何兑换优惠的条件。例如,您可以在此字段中填充向用户显示的优惠着陆页上的详细条款。

针对部分商品的优惠必须使用 terms.terms_and_conditions 字段或 offer_restrictions.inclusionsoffer_restrictions.exclusions 字段来定义符合条件的商品。

商品 JSON 示例

立减 20 美元

示例:周二可享 20 美元固定折扣,最低消费金额为 15 美元

{
  "offer_id": "offer-example-1-takeout",
  "offer_source": "OFFER_SOURCE_AGGREGATOR",
  "action_type": "ACTION_TYPE_FOOD_TAKEOUT",
  "offer_modes": ["OFFER_MODE_ONLINE_ORDER"],
  "offer_category": "OFFER_CATEGORY_BASE_OFFER",
  "offer_details": {
    "offer_display_text": "$20 off on Tuesdays",
    "discount_value": {
      "currency_code": "USD",
      "units": 20
    },
    "min_spend_value": {
      "currency_code": "USD",
      "units": 15
    }
  },
  "validity_periods": [
    {
      "valid_period": {
        "valid_from_time": { "seconds": 1768953600 },
        "valid_through_time": { "seconds": 1795219200 }
      },
      "time_of_day": [
        {
          "time_windows": {
            "open_time": { "hours": 9 },
            "close_time": { "hours": 20, "minutes": 59, "seconds": 59 }
          },
          "day_of_week": ["TUESDAY"]
        }
      ]
    }
  ],
  "offer_restrictions": {
    "combinable_with_other_offers": false
  },
  "terms": {
    "terms_and_conditions": "For use only at the participating restaurant location on qualifying delivery or takeout orders with $15 minimum spend. Single use per order. Offer may not be combined with any other offers, discounts, or promotions. Valid only on Tuesdays."
  },
  "entity_ids": ["dining-1"],
  "offer_url": "https://www.example-restaurant.com/offer/base_offer_1"
}

买一送一优惠

示例:买一送一开胃菜优惠,周一至周四有效

{
  "offer_id": "offer-example-2-delivery",
  "offer_source": "OFFER_SOURCE_AGGREGATOR",
  "action_type": "ACTION_TYPE_FOOD_DELIVERY",
  "offer_modes": ["OFFER_MODE_ONLINE_ORDER"],
  "offer_category": "OFFER_CATEGORY_BASE_OFFER",
  "offer_details": {
    "offer_display_text": "Buy one appetizer, get one free",
    "other_offer_detail_text": "Buy one appetizer, get one free"
  },
  "validity_periods": [
    {
      "valid_period": {
        "valid_from_time": { "seconds": 1768953600 },
        "valid_through_time": { "seconds": 1795219200 }
      },
      "time_of_day": [
        {
          "time_windows": {
            "open_time": { "hours": 10 },
            "close_time": { "hours": 23, "minutes": 59, "seconds": 59 }
          },
          "day_of_week": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY"]
        }
      ]
    }
  ],
  "offer_restrictions": {
    "combinable_with_other_offers": true,
    "inclusions": [
      {
        "description": "appetizers"
      }
    ]
  },
  "terms": {
    "terms_and_conditions": "For use only at the participating restaurant location on qualifying delivery or takeout orders. Single use per order. Valid on all menu appetizers. Offer may be combined with any other offers, discounts, or promotions. Valid Monday through Thursday."
  },
  "entity_ids": ["dining-1"],
  "offer_url": "https://www.example-restaurant.com/offer/base_offer_4"
}

百分比折扣优惠

示例:所有三明治均可享七五折优惠

{
  "offer_id": "offer-example-3-delivery",
  "offer_source": "OFFER_SOURCE_AGGREGATOR",
  "action_type": "ACTION_TYPE_FOOD_DELIVERY",
  "offer_modes": ["OFFER_MODE_ONLINE_ORDER"],
  "offer_category": "OFFER_CATEGORY_BASE_OFFER",
  "offer_details": {
    "offer_display_text": "25% off on all Sandwiches",
    "discount_percent": 25.0
  },
  "validity_periods": [
    {
      "valid_period": {
        "valid_from_time": { "seconds": 1768953600 },
        "valid_through_time": { "seconds": 1795219200 }
      }
    }
  ],
  "offer_restrictions": {
    "combinable_with_other_offers": true,
    "combinable_offer_ids": ["offer-example-4-delivery"],
    "inclusions": [
      "Sandwiches"
    ]
  },
  "terms": {
    "terms_and_conditions": "For use only at the participating restaurant location on qualifying delivery or takeout orders. Applies to specific items only. Single use per order. May be combined with any other offers, discounts, or promotions."
  },
  "entity_ids": ["dining-1"],
  "offer_url": "https://www.example-restaurant.com/offer/base_offer_2"
}

免运费优惠

示例:订单金额超过 30 美元可免运费,否则运费为 7.00 美元。

{
  "offer_id": "offer-example-4-delivery",
  "offer_source": "OFFER_SOURCE_AGGREGATOR",
  "action_type": "ACTION_TYPE_FOOD_DELIVERY",
  "offer_modes": ["OFFER_MODE_ONLINE_ORDER"],
  "offer_category": "OFFER_CATEGORY_BASE_OFFER",
  "offer_details": {
    "offer_display_text": "Free delivery on orders over $30",
    "discount_value": {
      "currency_code": "USD",
      "units": 7
    },
    "min_spend_value": {
      "currency_code": "USD",
      "units": 30
    }
  },
  "validity_periods": [
    {
      "valid_period": {
        "valid_from_time": { "seconds": 1768953600 },
        "valid_through_time": { "seconds": 1795219200 }
      }
    }
  ],
  "offer_restrictions": {
    "combinable_with_other_offers": true
  },
  "terms": {
    "terms_and_conditions": "For use only at the participating restaurant location on qualifying delivery orders with $30 minimum spend. Delivery is $7.00 otherwise. Single use per order. May be combined with any other offers, discounts, or promotions."
  },
  "entity_ids": ["dining-1"],
  "offer_url": "https://www.example-restaurant.com/offer/base_offer_3"
}

包含加购项优惠的基础优惠示例

示例:某餐厅仅在工作日午餐时段提供九折优惠,如果使用特定信用卡付款,则可随时享受九五折优惠。

[
  {
    "offer_id": "offerId1",
    "offer_source": "OFFER_SOURCE_AGGREGATOR",
    "action_type": "ACTION_TYPE_FOOD_TAKEOUT",
    "offer_modes": ["OFFER_MODE_ONLINE_ORDER"],
    "offer_category": "OFFER_CATEGORY_BASE_OFFER",
    "offer_details": {
      "offer_display_text": "10% off",
      "discount_percent": 10.0
    },
    "validity_periods": [
      {
        "valid_period": {
          "valid_from_time": { "seconds": 1768953600 },
          "valid_through_time": { "seconds": 1795219200 }
        },
        "time_of_day": [
          {
            "day_of_week": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY"]
          }
        ]
      }
    ],
    "offer_restrictions": {
      "combinable_with_other_offers": true,
      "combinable_offer_categories": ["OFFER_CATEGORY_ADD_ON_PAYMENT_OFFER"]
    },
    "terms": {
      "terms_and_conditions": "For use only at the participating restaurant location on qualifying delivery or takeout orders. Single use per order. Offer may be combined with any other offers, discounts, or promotions."
    },
    "entity_ids": ["dining-1"],
    "offer_url": "https://www.example-restaurant.com/offer/base_offer_5"
  },
  {
    "offer_id": "offerId2",
    "offer_source": "OFFER_SOURCE_AGGREGATOR",
    "action_type": "ACTION_TYPE_FOOD_TAKEOUT",
    "offer_modes": ["OFFER_MODE_ONLINE_ORDER"],
    "offer_category": "OFFER_CATEGORY_ADD_ON_PAYMENT_OFFER",
    "offer_details": {
      "offer_display_text": "5% off",
      "discount_percent": 5.0
    },
    "validity_periods": [
      {
        "valid_period": {
          "valid_from_time": { "seconds": 1768953600 },
          "valid_through_time": { "seconds": 1795219200 }
        },
        "time_of_day": [
          {
            "day_of_week": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY"]
          }
        ]
      }
    ],
    "offer_restrictions": {
      "combinable_with_other_offers": true,
      "combinable_offer_ids": ["offerId1"]
    },
    "payment_instrument": {
      "items": [
        { "type": "PAYMENT_INSTRUMENT_CREDIT_CARD", "name": "Participating Credit Card" }
      ],
      "provider_name": "Card Provider"
    },
    "terms": {
      "terms_and_conditions": "For use only at the participating restaurant location on qualifying delivery or takeout orders. Single use per order. Offer may be combined with any other offers, discounts, or promotions."
    },
    "entity_ids": ["dining-1"],
    "offer_url": "https://www.example-restaurant.com/offer/addon_offer_1"
  }
]

履单和限制

本部分详细介绍了与优惠兑现规范及相关限制相关的要求和最佳实践。

履单模式(外送和自提)

如果某项优惠同时适用于外送和外卖,则必须在 Feed 中包含两项优惠。每个条目都必须具有专用的 ActionType

  • ACTION_TYPE_FOOD_DELIVERY
  • ACTION_TYPE_FOOD_TAKEOUT

这样可确保用户在合作伙伴网站上看到正确的履单背景信息。

时间窗口

无论用户是已登录还是未登录您的网站或应用,都应在优惠着陆页上向所有用户显示优惠。如果优惠在特定时间段内有效,您必须添加 validity_periods.valid_period 字段来指定有效期限。这样可防止优惠在时间段之外显示。如果优惠在一天中的特定时段显示在优惠网址上,则还必须设置时间窗口。例如,如果餐厅关闭时着陆页不显示优惠,您必须添加 TimeOfDayWindow 的营业时间和结束时间。

处理跨午夜的时间段

跨午夜的优惠(例如,从周二晚上 10:00 到周三凌晨 2:00 有效)必须进行细分,才能由提取流水线正确处理。 要求:使用 TimeOfDayWindow 字段将窗口划分为两个不同的时间段:

  • 第 1 段:开始当天(例如星期二)晚上 10:00 至 11:59:59。
  • 细分 2:次日(例如周三)凌晨 12:00 至凌晨 2:00。

这样可确保整个期间内准确反映优惠的有效性。

费用规范

可以使用 OfferDetails.additional_fees 字段指定外送和外卖费用。应使用 OfferDetails.convenience_fee 指定服务费。对于可变费用,请使用费用范围值,例如,如果外送费用会根据用户的位置而变化。