实现高级关系型广告资源

“菜单”实体描述了餐厅向其客户提供的菜单。“菜单”实体必须通过 Restaurant 的 menuId 属性在 Restaurant 实体中定义。

定义菜单的其他对象(例如说明、图片、插件和营养信息)包括 MenuItemMenuItemOffer,以及可选对象 MenuSectionAvailabilityMenuItemOption

您可以使用 MenuSection 对象将多个 MenuItem 对象整理到逻辑类别中。对于包含多种菜单(例如早餐、午餐和晚餐)的餐厅,这种方法非常有用。将每个菜单添加为单独的 MenuSection

用例 最佳做法
用例 1:基本菜单 使用 MenuItemMenuItemOfferMenuSection(可选)

以下示例与“基本菜单”用例匹配,其中包含两个菜单部分(“全天美食”和“饮料”),每个部分包含两个菜单项:

JSON

{
  "@type": "Menu",
  "name": "Coffee Shop A",
  "@id": "1535"
} {
  "@type": "MenuSection",
  "@id": "4371",
  "menuId": {
    "@id": "1535",
    "displayOrder": 1
  },
  "name": "All day food",
  "menuItemId": ["1", "2"]
} {
  "@type": "MenuItem",
  "@id": "1",
  "name": "Mediterranean Bagel",
  "description": "rocket, scrambled egg, tomato relish, bacon ***Gluten free bagel available***",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "4371",
    "displayOrder": 1
  }
} {
  "@type": "MenuItemOffer",
  "@id": "6680262",
  "sku": "offer-mediterranean-bagel",
  "menuItemId": "1",
  "price": 17.60,
  "priceCurrency": "AUD"
} {
  "@type": "MenuItem",
  "@id": "2",
  "name": "Club Empire Bagel",
  "description": "grilled chicken, bacon, rocket, tomato relish ***Gluten Free Bagels Available***",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "4371",
    "displayOrder": 2
  }
} {
  "@type": "MenuItemOffer",
  "@id": "428",
  "sku": "offer-club-empire-bagel",
  "menuItemId": "2",
  "price": 18.90,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "27",
  "menuId": {
    "@id": "1535",
    "displayOrder": 2
  },
  "name": "Drinks",
  "menuItemId": ["3", "4"]
} {
  "@type": "MenuItem",
  "@id": "3",
  "name": "Cold Brew Coffee",
  "description": "67% less acid & refreshingly good",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "27",
    "displayOrder": 1
  }
} {
  "@type": "MenuItemOffer",
  "@id": "456",
  "sku": "offer-cold-brew-coffee",
  "menuItemId": "3",
  "price": 8.50,
  "priceCurrency": "AUD"
} {
  "@type": "MenuItem",
  "@id": "4",
  "name": "English Breakfast Tea",
  "description": "Not Coffee. Try our tea",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "27",
    "displayOrder": 2
  }
} {
  "@type": "MenuItemOffer",
  "@id": "4432",
  "sku": "offer-english-breakfast-tea",
  "menuItemId": "4",
  "price": 5.50,
  "priceCurrency": "AUD"
}

限时菜单

MenuItemOffer 对象与 Availability 结合使用可用于创建有时间限制的菜单项和菜单项选项。请改为使用 Availability 对象创建有时限的菜单部分。

用例 最佳做法
用例 1:有时间限制的菜单部分 使用 Availability 指定相应部分的 availabilityStartsavailabilityEnds 时间。
用例 2:有时间限制的菜单项 使用 MenuItemOffermenuItemId 指定优惠所关联的 MenuItem。使用 Availability 指定优惠的 availabilityStartsavailabilityEndsavailabilityDaycode> 时间。
用例 3:多优惠菜单项 使用 MenuItemOffermenuItemId 属性并设置 availabilityId 属性,以指定价格的有效期。

JSON

包含“全天美食”、“午餐”和“饮料”版块的基本菜单。

该菜单包含三个部分。如“Availability 对象”中所述,“午餐(上午 11:30 - 2:30)”部分仅在上午 11:30 - 2:30 提供。

{
  "@type": "Menu",
  "name": "Coffee Shop A",
  "@id": "1535"
} {
  "@type": "MenuSection",
  "@id": "4371",
  "menuId": {
    "@id": "1535",
    "displayOrder": 1
  },
  "name": "All day food",
  "menuItemId": ["1", "2"]
} {
  "@type": "MenuItem",
  "@id": "1",
  "name": "Mediterranean Bagel",
  "description": "rocket, scrambled egg, tomato relish, bacon ***Gluten free bagel available***",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "4371",
    "displayOrder": 1
  }
} {
  "@type": "MenuItemOffer",
  "@id": "6680262",
  "sku": "offer-mediterranean-bagel",
  "menuItemId": "1",
  "price": 17.60,
  "priceCurrency": "AUD"
} {
  "@type": "MenuItem",
  "@id": "2",
  "name": "Club Empire Bagel",
  "description": "grilled chicken, bacon, rocket, tomato relish ***Gluten Free Bagels Available***",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "4371",
    "displayOrder": 2
  }
} {
  "@type": "MenuItemOffer",
  "@id": "428",
  "sku": "offer-club-empire-bagel",
  "menuItemId": "2",
  "price": 18.90,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "27",
  "menuId": {
    "@id": "1535",
    "displayOrder": 3
  },
  "name": "Drinks",
  "menuItemId": ["3", "4"]
} {
  "@type": "MenuItem",
  "@id": "3",
  "name": "Cold Brew Coffee",
  "description": "67% less acid & refreshingly good",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "27",
    "displayOrder": 1
  }
} {
  "@type": "MenuItemOffer",
  "@id": "3",
  "sku": "offer-cold-brew-coffee",
  "menuItemId": "3",
  "price": 8.50,
  "priceCurrency": "AUD"
} {
  "@type": "MenuItem",
  "@id": "4",
  "name": "English Breakfast Tea",
  "description": "Not Coffee. Try our tea",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "27",
    "displayOrder": 2
  }
} {
  "@type": "MenuItemOffer",
  "@id": "4",
  "sku": "offer-english-breakfast-tea",
  "menuItemId": "4",
  "price": 5.50,
  "priceCurrency": "AUD"
} {
  "@type": "Availability",
  "@id": "85343705",
  "availabilityStarts": "11:30",
  "availabilityEnds": "14:30"
} {
  "@type": "MenuSection",
  "@id": "53",
  "menuId": {
    "@id": "1535",
    "displayOrder": 2
  },
  "name": "Lunch (Available 11:30am - 2:30pm)",
  "menuItemId": ["5", "6"],
  "availabilityId": ["85343705"]
} {
  "@type": "MenuItem",
  "@id": "5",
  "name": "Bibimbap",
  "description": "pulled pork, julienned carrot, cucumber, spring onions, brown rice, pureed kimchi, fried free-range egg.",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "53",
    "displayOrder": 1
  }
} {
  "@type": "MenuItemOffer",
  "@id": "753",
  "sku": "offer-bibimbap",
  "menuItemId": "5",
  "price": 24.80,
  "priceCurrency": "AUD"
} {
  "@type": "MenuItem",
  "@id": "6",
  "name": "The Big Chicken",
  "description": "WA free range handmade chicken burger, lettuce, avocado, bacon, tomato relish on charcoal brioche bun, sweet potato wedges and house made aioli (vegetarian option – spiced lentil burger, just ask us in the notes)",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "53",
    "displayOrder": 2
  }
} {
  "@type": "MenuItemOffer",
  "@id": "856",
  "sku": "offer-big-chicken",
  "menuItemId": "6",
  "price": 25.60,
  "priceCurrency": "AUD"
}

JSON

包含“全天美食”、“午餐”和“饮料”版块的基本菜单。

该菜单包含三个部分。如“Availability 对象”中所述,“午餐(上午 11:30 - 2:30)”部分仅在上午 11:30 - 2:30 提供。菜单项“Bibimbap”仅在中午 12:00 到下午 1:00 提供,如对应的 MenuItemOffer 对象中引用的 Availability 所述。

{
  "@type": "Menu",
  "name": "Coffee Shop A",
  "@id": "1535"
} {
  "@type": "MenuSection",
  "@id": "4371",
  "menuId": {
    "@id": "1535",
    "displayOrder": 1
  },
  "name": "All day food",
  "menuItemId": ["1", "2"]
} {
  "@type": "MenuItem",
  "@id": "1",
  "name": "Mediterranean Bagel",
  "description": "rocket, scrambled egg, tomato relish, bacon ***Gluten free bagel available***",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "4371",
    "displayOrder": 1
  }
} {
  "@type": "MenuItemOffer",
  "@id": "6680262",
  "sku": "offer-mediterranean-bagel",
  "menuItemId": "1",
  "price": 17.60,
  "priceCurrency": "AUD"
} {
  "@type": "MenuItem",
  "@id": "2",
  "name": "Club Empire Bagel",
  "description": "grilled chicken, bacon, rocket, tomato relish ***Gluten Free Bagels Available***",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "4371",
    "displayOrder": 2
  }
} {
  "@type": "MenuItemOffer",
  "@id": "428",
  "sku": "offer-club-empire-bagel",
  "menuItemId": "2",
  "price": 18.90,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "27",
  "menuId": {
    "@id": "1535",
    "displayOrder": 3
  },
  "name": "Drinks",
  "menuItemId": ["3", "4"]
} {
  "@type": "MenuItem",
  "@id": "3",
  "name": "Cold Brew Coffee",
  "description": "67% less acid & refreshingly good",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "27",
    "displayOrder": 1
  }
} {
  "@type": "MenuItemOffer",
  "@id": "3",
  "sku": "offer-cold-brew-coffee",
  "menuItemId": "3",
  "price": 8.50,
  "priceCurrency": "AUD"
} {
  "@type": "MenuItem",
  "@id": "4",
  "name": "English Breakfast Tea",
  "description": "Not Coffee. Try our tea",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "27",
    "displayOrder": 2
  }
} {
  "@type": "MenuItemOffer",
  "@id": "4",
  "sku": "offer-english-breakfast-tea",
  "menuItemId": "4",
  "price": 5.50,
  "priceCurrency": "AUD"
} {
  "@type": "Availability",
  "@id": "85343705",
  "availabilityStarts": "11:30",
  "availabilityEnds": "14:30"
} {
  "@type": "MenuSection",
  "@id": "53",
  "menuId": {
    "@id": "1535",
    "displayOrder": 2
  },
  "name": "Lunch (Available 11:30am - 2:30pm)",
  "menuItemId": ["5", "6"],
  "availabilityId": ["85343705"]
} {
  "@type": "MenuItem",
  "@id": "5",
  "name": "Bibimbap",
  "description": "pulled pork, julienned carrot, cucumber, spring onions, brown rice, pureed kimchi, fried free-range egg.",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "53",
    "displayOrder": 1
  }
} {
  "@type": "Availability",
  "@id": "54767",
  "availabilityStarts": "12:00",
  "availabilityEnds": "13:00"
} {
  "@type": "MenuItemOffer",
  "@id": "753",
  "sku": "offer-bibimbap",
  "menuItemId": "5",
  "price": 24.80,
  "priceCurrency": "AUD",
  "availabilityId": ["54767"]
} {
  "@type": "MenuItem",
  "@id": "6",
  "name": "The Big Chicken",
  "description": "WA free range handmade chicken burger, lettuce, avocado, bacon, tomato relish on charcoal brioche bun, sweet potato wedges and house made aioli (vegetarian option – spiced lentil burger, just ask us in the notes)",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png",
  "parentMenuSectionId": {
    "@id": "53",
    "displayOrder": 2
  }
} {
  "@type": "MenuItemOffer",
  "@id": "856",
  "sku": "offer-big-chicken",
  "menuItemId": "6",
  "price": 25.60,
  "priceCurrency": "AUD"
}

JSON

MenuItem 中包含因价格和时间而异的优惠。

该菜单包含两个部分。菜单项“意大利面”有两个对应的 MenuItemOffer 对象(一个用于午餐价格,另一个用于晚餐价格)。意大利面的午餐价格为 7.49 美元,晚餐价格为 10.49 美元。

{
  "@type": "Menu",
  "name": "Dine-In Menu",
  "@id": "1535"
} {
  "@type": "MenuSection",
  "@id": "4371",
  "menuId": {
    "@id": "1535",
    "displayOrder": 1
  },
  "name": "Main",
  "description": "Main course",
  "image": "http://www.provider.com/somerestaurant/main_dishes.jpg",
  "menuItemId": ["1", "2"]
} {
  "@type": "MenuItem",
  "@id": "1",
  "name": "Pizza",
  "description": "Pizza",
  "image": "http://www.provider.com/somerestaurant/menuitem/1",
  "parentMenuSectionId": {
    "@id": "4371",
    "displayOrder": 1
  }
} {
  "@type": "Availability",
  "@id": "morning_availability",
  "availabilityStarts": "08:00",
  "availabilityEnds": "18:00"
} {
  "@type": "Availability",
  "@id": "evening_availability",
  "availabilityStarts": "18:00",
  "availabilityEnds": "21:00"
} {
  "@type": "MenuItemOffer",
  "@id": "6680262",
  "sku": "offer-pizza",
  "menuItemId": "1",
  "price": 7.49,
  "priceCurrency": "USD",
  "availabilityId": ["morning_availability"]
} //Starts at 8:00AM, ends at 6:00PM, last order at 5:59:59PM
{
  "@type": "MenuItem",
  "@id": "2",
  "name": "Pasta",
  "description": "Pasta",
  "image": "http://www.provider.com/somerestaurant/menuitem/2",
  "parentMenuSectionId": {
    "@id": "4371",
    "displayOrder": 2
  }
} {
  "@type": "MenuItemOffer",
  "@id": "5472",
  "sku": "offer-pasta-lunch",
  "menuItemId": "2",
  "price": 7.49,
  "priceCurrency": "USD",
  "availabilityId": ["morning_availability"]
} //Starts at 8:00AM, ends at 6:00PM, last order at 5:59:59PM
{
  "@type": "MenuItemOffer",
  "@id": "174",
  "sku": "offer-pasta-dinner",
  "menuItemId": "2",
  "price": 10.49,
  "priceCurrency": "USD",
  "availabilityId": ["evening_availability"]
} //Starts at 6:00PM, ends at 9:00PM, last order at 8:59:59PM
{
  "@type": "MenuSection",
  "@id": "753",
  "menuId": {
    "@id": "1535",
    "displayOrder": 2
  },
  "name": "Soups & Salads",
  "description": "Salads and a few choices of soup",
  "image": "https://www.provider.com/somerestaurant/soup_and_salad_dishes.jpg",
  "menuItemId": ["3"]
} {
  "@type": "MenuItem",
  "@id": "3",
  "name": "Pea Soup",
  "description": "Creamy pea soup topped with melted cheese and sourdough croutons.",
  "parentMenuSectionId": {
    "@id": "1535",
    "displayOrder": 1
  }
} {
  "@type": "MenuItemOffer",
  "@id": "9763",
  "sku": "offer-pea-soup",
  "menuItemId": "3",
  "price": 3.49,
  "priceCurrency": "USD"
} //Starts at 8:00AM, ends at 6:00PM, last order at 5:59:59PM

使用插件进行自定义

菜单项可以包含其他插件选项。使用 menuAddOnId 引用 MenuSection 对象,为 MenuItem 定义插件。这些 MenuSection 对象必须包含用于插件的菜单项。

您可以使用插件 MenuSection 对象的 defaultOptionId 属性提供默认的插件 MenuItem 对象。

用例 最佳做法
用例 1:基本插件 使用插件 MenuSection 对象的 eligibleQuantityMineligibleQuantityMax 属性指定可在插件部分中选择的插件项的最小和最大数量。
用例 2:默认插件 使用插件 MenuSection 对象的 defaultOptionId 来提供默认插件选项。
用例 3:套餐/套餐 使用 MenuSection 对象来描述用户在选择菜品/组合时可以做出的选择。

JSON

在此示例中,可以使用吸管选项自定义“Cappuccino”菜单项。

“全天美食”菜单部分中的“地中海百吉饼”菜品有一个额外的插件选项,以及两个鸡蛋插件选项。

同一菜单部分内的“俱乐部百吉饼”包含相同的额外附加菜品,以及“炒蛋”附加菜品选项。

在饮品部分中,有一个项目包含“牛奶”附加选项和“吸管”附加选项。

{
  "@type": "Menu",
  "name": "Coffee Shop A",
  "@id": "1535"
} {
  "@type": "MenuSection",
  "@id": "4371",
  "menuId": {
    "@id": "1535",
    "displayOrder": 1
  },
  "name": "All day food",
  "menuItemId": ["1", "12"]
} {
  "@type": "MenuItem",
  "@id": "1",
  "name": "Mediterranean Bagel",
  "description": "rocket, scrambled egg, tomato relish, bacon ***Gluten free bagel available***",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png"
} {
  "@type": "MenuItemOffer",
  "@id": "6680262",
  "sku": "offer-mediterranean-bagel",
  "menuItemId": "1",
  "price": 17.60,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "362",
  "name": "Extras",
  "menuItemId": ["2"],
  "parentMenuItemId": [{
    "@id": "1",
    "displayOrder": 1
  }]
} {
  "@type": "MenuItem",
  "@id": "2",
  "name": "Chorizo"
} {
  "@type": "MenuItemOffer",
  "@id": "74",
  "sku": "offer-addon-chorizo",
  "menuItemId": "2",
  "price": 6.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuSection",
  "@id": "5374",
  "name": "Egg Options",
  "menuItemId": ["8", "9"],
  "parentMenuItemId": [{
    "@id": "1",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 2
} {
  "@type": "MenuItem",
  "@id": "8",
  "name": "No Extra Egg"
} {
  "@type": "MenuItemOffer",
  "@id": "4527",
  "sku": "offer-addon-no-egg",
  "menuItemId": "8",
  "price": 0.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "9",
  "name": "Extra Egg - Fried"
} {
  "@type": "MenuItemOffer",
  "@id": "99",
  "sku": "offer-addon-fried-egg",
  "menuItemId": "9",
  "price": 3.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "12",
  "name": "Club Bagel",
  "description": "grilled chicken, bacon, rocket, tomato relish ***Gluten Free Bagels Available***",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png"
} {
  "@type": "MenuItemOffer",
  "@id": "428",
  "sku": "offer-club-empire-bagel",
  "menuItemId": "12",
  "price": 18.90,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "3865",
  "name": "Extras",
  "menuItemId": ["2", "13"],
  "parentMenuItemId": [{
    "@id": "12",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 0,
  "eligibleQuantityMax": 2
} {
  "@type": "MenuItem",
  "@id": "13",
  "name": "Free Range Bacon"
} {
  "@type": "MenuItemOffer",
  "@id": "832",
  "sku": "offer-addon-bacon",
  "menuItemId": "13",
  "price": 6.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuSection",
  "@id": "5428",
  "name": "Egg Options",
  "menuItemId": ["8", "9", "14"],
  "parentMenuItemId": [{
    "@id": "12",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 2
} {
  "@type": "MenuItem",
  "@id": "14",
  "name": "Scrambled Egg"
} {
  "@type": "MenuItemOffer",
  "@id": "546",
  "sku": "offer-scrambled-egg",
  "menuItemId": "14",
  "price": 3.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuSection",
  "@id": "531",
  "menuId": {
    "@id": "1535",
    "displayOrder": 2
  },
  "name": "Lunch (Available 11:30am - 2:30pm)",
  "menuItemId": ["15"]
} {
  "@type": "MenuItem",
  "@id": "15",
  "name": "Bibimbap",
  "description": "pulled pork, julienned carrot, cucumber, spring onions, brown rice, pureed kimchi, fried free-range egg.",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png"
} {
  "@type": "MenuItemOffer",
  "@id": "753",
  "sku": "offer-bibimbap",
  "menuItemId": "15",
  "price": 24.80,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "27",
  "menuId": {
    "@id": "1535",
    "displayOrder": 3
  },
  "name": "Drinks",
  "menuItemId": ["17"]
} {
  "@type": "MenuItem",
  "@id": "17",
  "name": "Cappuccino",
  "description": "Milk Foam over a cup of espresso, topped with chocolate powder art",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png"
} {
  "@type": "MenuItemOffer",
  "@id": "1743",
  "sku": "offer-cappucino",
  "menuItemId": "17",
  "price": 6.50,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "4527",
  "name": "Milk",
  "menuItemId": ["18"],
  "parentMenuItemId": [{
    "@id": "17",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "18",
  "name": "Skim"
} {
  "@type": "MenuItemOffer",
  "@id": "4588",
  "sku": "offer-addon-skim-milk",
  "menuItemId": "18",
  "price": 0.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuSection",
  "@id": "5427",
  "name": "Straw Option",
  "menuItemId": ["22"],
  "parentMenuItemId": [{
    "@id": "17",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "22",
  "name": "Plastic Straw"
} {
  "@type": "MenuItemOffer",
  "@id": "4587",
  "sku": "offer-addon-plastic-straw",
  "menuItemId": "22",
  "price": 0.05,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
}

JSON

在本示例中,“Club Bagel”菜品预先选择了香肠和炒蛋选项。Chorizo 和 Chili Sauce 是默认的“额外菜”插件,而炒蛋是其默认的“鸡蛋选项”附加菜品。

{
  "@type": "Menu",
  "name": "Coffee Shop A",
  "@id": "1535"
} {
  "@type": "MenuSection",
  "@id": "4371",
  "menuId": {
    "@id": "1535",
    "displayOrder": 1
  },
  "name": "All day food",
  "menuItemId": ["1", "12"]
} {
  "@type": "MenuItem",
  "@id": "1",
  "name": "Mediterranean Bagel",
  "description": "rocket, scrambled egg, tomato relish, bacon ***Gluten free bagel available***",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png"
} {
  "@type": "MenuItemOffer",
  "@id": "6680262",
  "sku": "offer-mediterranean-bagel",
  "menuItemId": "1",
  "price": 17.60,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "362",
  "name": "Extras",
  "menuItemId": ["2"],
  "parentMenuItemId": [{
    "@id": "1",
    "displayOrder": 1
  }]
} {
  "@type": "MenuItem",
  "@id": "2",
  "name": "Chorizo"
} {
  "@type": "MenuItemOffer",
  "@id": "74",
  "sku": "offer-addon-chorizo",
  "menuItemId": "2",
  "price": 6.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuSection",
  "@id": "5374",
  "name": "Egg Options",
  "menuItemId": ["8", "9"],
  "parentMenuItemId": [{
    "@id": "1",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 2
} {
  "@type": "MenuItem",
  "@id": "8",
  "name": "No Extra Egg"
} {
  "@type": "MenuItemOffer",
  "@id": "4527",
  "sku": "offer-addon-no-egg",
  "menuItemId": "8",
  "price": 0.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "9",
  "name": "Extra Egg - Fried"
} {
  "@type": "MenuItemOffer",
  "@id": "99",
  "sku": "offer-addon-fried-egg",
  "menuItemId": "9",
  "price": 3.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "12",
  "name": "Club Bagel",
  "description": "grilled chicken, bacon, rocket, tomato relish ***Gluten Free Bagels Available***",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png"
} {
  "@type": "MenuItemOffer",
  "@id": "428",
  "sku": "offer-club-empire-bagel",
  "menuItemId": "12",
  "price": 18.90,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "3865",
  "name": "Extras",
  "menuItemId": ["2", "13", "25"],
  "parentMenuItemId": [{
    "@id": "12",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 0,
  "eligibleQuantityMax": 2,
  "defaultItemId": ["2", "25"]
} {
  "@type": "MenuItem",
  "@id": "13",
  "name": "Free Range Bacon"
} {
  "@type": "MenuItemOffer",
  "@id": "832",
  "sku": "offer-addon-bacon",
  "menuItemId": "13",
  "price": 6.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "25",
  "name": "Chili Sauce"
} {
  "@type": "MenuItemOffer",
  "@id": "7337",
  "sku": "offer-addon-chili-sauce",
  "menuItemId": "25",
  "price": 0.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuSection",
  "@id": "5428",
  "name": "Egg Options",
  "menuItemId": ["8", "9", "14"],
  "parentMenuItemId": [{
    "@id": "12",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 2,
  "defaultItemId": ["14"]
} {
  "@type": "MenuItem",
  "@id": "14",
  "name": "Scrambled Egg"
} {
  "@type": "MenuItemOffer",
  "@id": "546",
  "sku": "offer-scrambled-egg",
  "menuItemId": "14",
  "price": 3.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuSection",
  "@id": "27",
  "menuId": {
    "@id": "1535",
    "displayOrder": 3
  },
  "name": "Drinks",
  "menuItemId": ["17"]
} {
  "@type": "MenuItem",
  "@id": "17",
  "name": "Cappuccino",
  "description": "Milk Foam over a cup of espresso, topped with chocolate powder art",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png"
} {
  "@type": "MenuItemOffer",
  "@id": "1743",
  "sku": "offer-cappucino",
  "menuItemId": "17",
  "price": 6.50,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "4527",
  "name": "Milk",
  "menuItemId": ["18"],
  "parentMenuItemId": [{
    "@id": "17",
    "displayOrder": 1
  }, {
    "@id": "24",
    "displayOrder": 2
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "18",
  "name": "Skim"
} {
  "@type": "MenuItemOffer",
  "@id": "4588",
  "sku": "offer-addon-skim-milk",
  "menuItemId": "18",
  "price": 0.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuSection",
  "@id": "5427",
  "name": "Straw Option",
  "menuItemId": ["22"],
  "parentMenuItemId": [{
    "@id": "17",
    "displayOrder": 1
  }, {
    "@id": "24",
    "displayOrder": 2
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "22",
  "name": "Plastic Straw"
} {
  "@type": "MenuItemOffer",
  "@id": "4587",
  "sku": "offer-addon-plastic-straw",
  "menuItemId": "22",
  "price": 0.05,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
}

JSON

此示例包含了一份汉堡、薯条和饮品的组合餐。每种食物都可以配上不同的配料和配菜。

组合餐包含 1 个汉堡、1 个薯条和 1 杯饮料,可供用户选择。有 2 个汉堡选项,每个都有 2 个附加部分:“食谱”(两个菜单项,用户必须选择 0-1 个选项)和“ extra”(三个菜单项,用户必须选择 0-3 个选项)。

{
  "@type": "Menu",
  "name": "FastFood B",
  "@id": "1535"
} {
  "@type": "MenuSection",
  "@id": "4371",
  "menuId": {
    "@id": "1535",
    "displayOrder": 1
  },
  "name": "Combo Meals",
  "menuItemId": ["1"]
} {
  "@type": "MenuItem",
  "@id": "1",
  "name": "Burger Combo ABox",
  "description": "1 Burger, 1 Fries, 1 Drink",
  "image": "https://www.gstatic.com/mobilesdk/170329_assistant/assistant_color_28dp.png"
} {
  "@type": "MenuItemOffer",
  "@id": "6680262",
  "sku": "offer-burger-combo-a",
  "menuItemId": "1",
  "price": 16.95,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "362",
  "name": "Burger",
  "menuItemId": ["2", "3"],
  "parentMenuItemId": [{
    "@id": "1",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "2",
  "name": "Fillet Burger"
} {
  "@type": "MenuItemOffer",
  "@id": "74",
  "sku": "offer-burger-fillet",
  "menuItemId": "2",
  "price": 0.00,
  "priceCurrency": "AUD"
} {
  "@type": "MenuItem",
  "@id": "3",
  "name": "Zinger filler Burger"
} {
  "@type": "MenuItemOffer",
  "@id": "42",
  "sku": "offer-burger-zinger-filler",
  "menuItemId": "3",
  "price": 0.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 1
} {
  "@type": "MenuSection",
  "@id": "5374",
  "name": "Recipe",
  "menuItemId": ["13", "25"],
  "parentMenuItemId": [{
    "@id": "2",
    "displayOrder": 1
  }, {
    "@id": "3",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 0,
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "13",
  "name": "Lettuce"
} {
  "@type": "MenuItemOffer",
  "@id": "832",
  "sku": "offer-lettuce",
  "menuItemId": "13",
  "price": 0.00,
  "priceCurrency": "AUD"
} {
  "@type": "MenuItem",
  "@id": "25",
  "name": "Mayo"
} {
  "@type": "MenuItemOffer",
  "@id": "7337",
  "sku": "offer-mayo",
  "menuItemId": "25",
  "price": 0.00,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "3865",
  "name": "Extras",
  "menuItemId": ["22", "23", "24"],
  "parentMenuItemId": [{
    "@id": "2",
    "displayOrder": 1
  },
  {
    "@id": "3",
    "displayOrder": 1
  }],
  "eligibleQuantityMin": 0,
  "eligibleQuantityMax": 3
} {
  "@type": "MenuItem",
  "@id": "22",
  "name": "Bacon Slice"
} {
  "@type": "MenuItemOffer",
  "@id": "4588",
  "sku": "offer-extra-bacon-slice",
  "menuItemId": "22",
  "price": 0.50,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 10
} {
  "@type": "MenuItem",
  "@id": "23",
  "name": "Cheese Slice"
} {
  "@type": "MenuItemOffer",
  "@id": "53865",
  "sku": "offer-extra-cheese-slice",
  "menuItemId": "23",
  "price": 0.50,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 10
} {
  "@type": "MenuItem",
  "@id": "24",
  "name": "Coleslaw"
} {
  "@type": "MenuItemOffer",
  "@id": "3",
  "sku": "offer-extra-coleslaw",
  "menuItemId": "24",
  "price": 0.30,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 10
} {
  "@type": "MenuSection",
  "@id": "5428",
  "name": "Fries",
  "menuItemId": ["14"],
  "parentMenuItemId": [{
    "@id": "1",
    "displayOrder": 2
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "14",
  "name": "Regular Fries"
} {
  "@type": "MenuItemOffer",
  "@id": "546",
  "sku": "offer-fries",
  "menuItemId": "14",
  "price": 0.00,
  "priceCurrency": "AUD"
} {
  "@type": "MenuSection",
  "@id": "27",
  "name": "Drinks",
  "menuItemId": ["17", "18"],
  "parentMenuItemId": [{
    "@id": "1",
    "displayOrder": 3
  }],
  "eligibleQuantityMin": 1,
  "eligibleQuantityMax": 1
} {
  "@type": "MenuItem",
  "@id": "17",
  "name": "Regular Pepsi Max"
} {
  "@type": "MenuItemOffer",
  "@id": "1743",
  "sku": "offer-pepsi-max",
  "menuItemId": "17",
  "price": 0.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 2
} {
  "@type": "MenuItem",
  "@id": "18",
  "name": "Regular Pepsi"
} {
  "@type": "MenuItemOffer",
  "@id": "4587",
  "sku": "offer-pepsi",
  "menuItemId": "18",
  "price": 0.00,
  "priceCurrency": "AUD",
  "eligibleQuantityMax": 2
}

使用菜单项选项进行自定义

您可以通过在 MenuItemOptionmenuItemId 属性中引用 MenuItem 为其提供各种选项。

例如,如果披萨有多种尺寸,您可以针对每个尺寸创建一个 MenuItemOption,并在 menuItemId 属性中为每个 MenuItemOption 引用披萨菜单项。

用例 最佳做法
用例 1:不同尺寸的披萨 使用 MenuItemOptionMenuItemOffer
用例 2:配料和尺寸不同的定制披萨 使用 MenuItemOptionMenuItemOffer,根据披萨尺寸更改配价。
用例 3:左侧和右侧之间存在差异的可自定义披萨 使用 MenuItemOptionvalue 属性指定披萨的一侧。使用 MenuItemOfferpricepriceCurrency 属性可以指定每个披萨面的价格。

NDJSON

披萨有 3 种不同的尺寸,并且需要用户自行选择。每种尺寸的价格是不同的。

夏威夷披萨的费用是 10.00 美元(小号)、15.00 美元(中等);20.00 美元(大号披萨)

{"@type":"Menu","name":"A's Pizza","@id":"menu-1"}
{"@type":"MenuSection","@id":"pizza-section","menuId":{"@id":"menu-1","displayOrder":1},"name":"Pizzas","menuItemId":["piz-hwn"]}
{"@type":"MenuItem","@id":"piz-hwn","name":"Hawaiian Pizza"}
{"@type":"MenuItemOption","@id":"piz-hwn-opt-sml","menuItemId":{"@id":"piz-hwn","displayOrder":1}, "optionType": "SIZE", "value": "Small"}
{"@type":"MenuItemOption","@id":"piz-hwn-opt-med","menuItemId":{"@id":"piz-hwn","displayOrder":2}, "optionType": "SIZE", "value": "Medium"}
{"@type":"MenuItemOption","@id":"piz-hwn-opt-lge","menuItemId":{"@id":"piz-hwn","displayOrder":3}, "optionType": "SIZE", "value": "Large"}
{"@type":"MenuItemOffer","@id":"piz-hwn-off-sml","sku":"123456","menuItemOptionId":"piz-hwn-opt-sml","price":10.00,"priceCurrency":"USD"}
{"@type":"MenuItemOffer","@id":"piz-hwn-off-med","sku":"123457","menuItemOptionId":"piz-hwn-opt-med","price":15.00,"priceCurrency":"USD"}
{"@type":"MenuItemOffer","@id":"piz-hwn-off-lge","sku":"123458","menuItemOptionId":"piz-hwn-opt-lge","price":20.00,"priceCurrency":"USD"}

NDJSON

披萨配料的价格因披萨的大小而有所不同。

意大利香肠披萨价格为 10.00 美元(小号)、15.00 美元(中等);20.00 美元(大号)。小萨勒米牛肉配料为小号 1.00 美元,中号配菜 1.50 美元,大号小食 2.00 美元。

{"@type":"Menu","name":"A's Pizza","@id":"menu-1"}
{"@type":"MenuSection","@id":"pizza-section","menuId":{"@id":"menu-1","displayOrder":1},"name":"Pizzas","menuItemId":["piz-pep"]}
{"@type":"MenuItem","@id":"piz-pep","name":"Hawaiian Pizza"}
{"@type":"MenuItemOption","@id":"piz-pep-opt-sml","menuItemId":{"@id":"piz-pep","displayOrder":1}, "optionType": "SIZE", "value": "Small"}
{"@type":"MenuItemOption","@id":"piz-pep-opt-med","menuItemId":{"@id":"piz-pep","displayOrder":2}, "optionType": "SIZE", "value": "Medium"}
{"@type":"MenuItemOption","@id":"piz-pep-opt-lge","menuItemId":{"@id":"piz-pep","displayOrder":3}, "optionType": "SIZE", "value": "Large"}
{"@type":"MenuItemOffer","@id":"piz-pep-off-sml","sku":"123456","menuItemOptionId":"piz-pep-opt-sml","price":10.00,"priceCurrency":"USD"}
{"@type":"MenuItemOffer","@id":"piz-pep-off-med","sku":"123457","menuItemOptionId":"piz-pep-opt-med","price":15.00,"priceCurrency":"USD"}
{"@type":"MenuItemOffer","@id":"piz-pep-off-lge","sku":"123458","menuItemOptionId":"piz-pep-opt-lge","price":20.00,"priceCurrency":"USD"}
{"@type": "MenuSection","@id": "topping-section","menuId": {"@id": "menu-1","displayOrder": 2},"name": "Choice of toppings","menuItemId": ["top-bef-sal"],"parentMenuItemId": [{"@id": "piz-pep","displayOrder": 1}]}
{"@type": "MenuItem","@id": "top-bef-sal","name": "Beef Salami","parentMenuSectionId": {"@id": "topping-section","displayOrder": 1}}
{"@type": "MenuItemOption","@id": "opt-bef-sal-sml","menuItemId": {"@id": "top-bef-sal", "displayOrder": "1"},"applicableParentOptionValue": "Small"}
{"@type": "MenuItemOption","@id": "opt-bef-sal-med","menuItemId": {"@id": "top-bef-sal", "displayOrder": "2"},"applicableParentOptionValue": "Medium"}
{"@type": "MenuItemOption","@id": "opt-bef-sal-lge","menuItemId": {"@id": "top-bef-sal", "displayOrder": "3"},"applicableParentOptionValue": "Large"}
{"@type": "MenuItemOffer","@id": "bef-sal-off-sml","sku": "123561","menuItemOptionId": "opt-bef-sal-sml","price": 1.00,"priceCurrency": "USD"}
{"@type": "MenuItemOffer","@id": "bef-sal-off-med","sku": "123562","menuItemOptionId": "opt-bef-sal-med","price": 1.50,"priceCurrency": "USD"}
{"@type": "MenuItemOffer","@id": "bef-sal-off-lge","sku": "123563","menuItemOptionId": "opt-bef-sal-lge","price": 2.00,"priceCurrency": "USD"}

NDJSON

披萨配料可以添加到左半部分、右半部分或整个披萨中。价格因披萨的大小以及配料而异。

小型意大利香肠披萨为小号 $10.00,中号为 $15.00,大号 $20.00。该披萨有 2 种配料(牛肉萨拉米牛肉和马苏里拉奶酪),小份披萨的左右配料费用为 1.00 美元,但整份披萨的定价为 0.50 美元。对于中型披萨,左侧和右侧配料的费用为 $1.50,但对于整个中型披萨,配料费用为 $1.00。对于大份披萨,其配料费用为 $2.00 美元,而对于整个大份披萨,则费用为 $1.50 美元。

{"@type":"Menu","name":"A's Pizza","@id":"menu-1"}
{"@type":"MenuSection","@id":"pizza-section","menuId":{"@id":"menu-1","displayOrder":1},"name":"Pizzas","menuItemId":["piz-pep"]}
{"@type":"MenuItem","@id":"piz-pep","name":"Pepperoni Pizza"}
{"@type":"MenuItemOption","@id":"piz-pep-opt-sml","menuItemId":{"@id":"piz-pep","displayOrder":1}, "optionType": "SIZE", "value": "Small"}
{"@type":"MenuItemOption","@id":"piz-pep-opt-med","menuItemId":{"@id":"piz-pep","displayOrder":2}, "optionType": "SIZE", "value": "Medium"}
{"@type":"MenuItemOption","@id":"piz-pep-opt-lge","menuItemId":{"@id":"piz-pep","displayOrder":3}, "optionType": "SIZE", "value": "Large"}
{"@type":"MenuItemOffer","@id":"piz-pep-off-sml","sku":"123456","menuItemOptionId":"piz-pep-opt-sml","price":10.00,"priceCurrency":"USD"}
{"@type":"MenuItemOffer","@id":"piz-pep-off-med","sku":"123457","menuItemOptionId":"piz-pep-opt-med","price":15.00,"priceCurrency":"USD"}
{"@type":"MenuItemOffer","@id":"piz-pep-off-lge","sku":"123458","menuItemOptionId":"piz-pep-opt-lge","price":20.00,"priceCurrency":"USD"}
{"@type": "MenuSection","@id": "topping-section","name": "Choice of toppings","menuItemId": ["top-bef-sal", "top-moz"],"parentMenuItemId": [{"@id": "piz-pep",  "displayOrder": 1}]}
{"@type": "MenuItem","@id": "top-bef-sal","name": "Beef Salami","parentMenuSectionId": {"@id": "topping-section",  "displayOrder": 1}}
{"@type": "MenuItemOption","@id": "top-bef-sal-opt-left-sm","menuItemId": {"@id": "top-bef-sal","displayOrder": 1},"applicableParentOptionValue": "Small","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_LEFT"}
{"@type": "MenuItemOffer","@id": "bef-sal-off-left-sm","sku": "546","menuItemOptionId": "top-bef-sal-opt-left-sm","price": 1.00,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-bef-sal-opt-right-sm","menuItemId": {"@id": "top-bef-sal","displayOrder": 2},"applicableParentOptionValue": "Small","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_RIGHT"}
{"@type": "MenuItemOffer","@id": "bef-sal-off-right-sm","sku": "37","menuItemOptionId": "top-bef-sal-opt-right-sm","price": 1.00,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-bef-sal-opt-whole-sm","menuItemId": {"@id": "top-bef-sal","displayOrder": 3},"applicableParentOptionValue": "Small","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_WHOLE"}
{"@type": "MenuItemOffer","@id": "bef-sal-off-whole-sm","sku": "356","menuItemOptionId": "top-bef-sal-opt-whole-sm","price": 0.50,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-bef-sal-opt-left-med","menuItemId": {"@id": "top-bef-sal","displayOrder": 1},"applicableParentOptionValue": "Medium","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_LEFT"}
{"@type": "MenuItemOffer","@id": "bef-sal-off-left-medium","sku": "764","menuItemOptionId": "top-bef-sal-opt-left-med","price": 1.50,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-bef-sal-opt-right-med","menuItemId": {"@id": "top-bef-sal","displayOrder": 2},"applicableParentOptionValue": "Medium","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_RIGHT"}
{"@type": "MenuItemOffer","@id": "bef-sal-off-right-medium","sku": "476","menuItemOptionId": "top-bef-sal-opt-right-med","price": 1.50,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-bef-sal-opt-whole-med","menuItemId": {"@id": "top-bef-sal","displayOrder": 3},"applicableParentOptionValue": "Medium","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_WHOLE"}
{"@type": "MenuItemOffer","@id": "offer-beef-salami-whole-medium","sku": "2354","menuItemOptionId": "top-bef-sal-opt-whole-med","price": 1.00,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-bef-sal-opt-left-lg","menuItemId": {"@id": "top-bef-sal","displayOrder": 1},"applicableParentOptionValue": "Large","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_LEFT"}
{"@type": "MenuItemOffer","@id": "offer-beef-salami-left-large","sku": "56","menuItemOptionId": "top-bef-sal-opt-left-lg","price": 2.00,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-bef-sal-opt-right-lg","menuItemId": {"@id": "top-bef-sal","displayOrder": 2},"applicableParentOptionValue": "Large","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_RIGHT"}
{"@type": "MenuItemOffer","@id": "offer-beef-salami-right-large","sku": "35","menuItemOptionId": "top-bef-sal-opt-right-lg","price": 2.00,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-bef-sal-opt-whole-lg","menuItemId": {"@id": "top-bef-sal","displayOrder": 3},"applicableParentOptionValue": "Large","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_WHOLE"}
{"@type": "MenuItemOffer","@id": "offer-beef-salami-whole-large","sku": "243","menuItemOptionId": "top-bef-sal-opt-whole-lg","price": 1.50,"priceCurrency": "USD"}
{"@type": "MenuItem","@id": "top-moz","name": "Mozzarella","parentMenuSectionId": {"@id": "topping-section",  "displayOrder": 2}}
{"@type": "MenuItemOption","@id": "top-moz-opt-left-sm","menuItemId": {"@id": "top-moz","displayOrder": 1},"applicableParentOptionValue": "Small","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_LEFT"}
{"@type": "MenuItemOffer","@id": "off-mozz-left-sm","sku": "5643","menuItemOptionId": "top-moz-opt-left-sm","price": 1.00,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-moz-opt-right-sm","menuItemId": {"@id": "top-moz","displayOrder": 2},"applicableParentOptionValue": "Small","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_RIGHT"}
{"@type": "MenuItemOffer","@id": "off-mozz-right-sm","sku": "426","menuItemOptionId": "top-moz-opt-right-sm","price": 1.00,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-moz-opt-whole-sm","menuItemId": {"@id": "top-moz","displayOrder": 3},"applicableParentOptionValue": "Small","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_WHOLE"}
{"@type": "MenuItemOffer","@id": "off-mozz-whole-sm","sku": "7546","menuItemOptionId": "top-moz-opt-whole-sm","price": 0.50,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-moz-opt-left-med","menuItemId": {"@id": "top-moz","displayOrder": 1},"applicableParentOptionValue": "Medium","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_LEFT"}
{"@type": "MenuItemOffer","@id": "off-mozz-left-med","sku": "5465","menuItemOptionId": "top-moz-opt-left-med","price": 1.50,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-moz-opt-right-med","menuItemId": {"@id": "top-moz","displayOrder": 2},"applicableParentOptionValue": "Medium","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_RIGHT"}
{"@type": "MenuItemOffer","@id": "off-mozz-right-med","sku": "76","menuItemOptionId": "top-moz-opt-right-med","price": 1.50,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-moz-opt-whole-med","menuItemId": {"@id": "top-moz","displayOrder": 3},"applicableParentOptionValue": "Medium","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_WHOLE"}
{"@type": "MenuItemOffer","@id": "off-mozz-whole-med","sku": "34","menuItemOptionId": "top-moz-opt-whole-med","price": 1.00,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-moz-opt-left-lge","menuItemId": {"@id": "top-moz","displayOrder": 1},"applicableParentOptionValue": "Large","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_LEFT"}
{"@type": "MenuItemOffer","@id": "off-mozz-left-lge","sku": "5536","menuItemOptionId": "top-moz-opt-left-lge","price": 2.00,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-moz-opt-right-lge","menuItemId": {"@id": "top-moz","displayOrder": 2},"applicableParentOptionValue": "Large","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_RIGHT"}
{"@type": "MenuItemOffer","@id": "off-mozz-right-lge","sku": "545","menuItemOptionId": "top-moz-opt-right-lge","price": 2.00,"priceCurrency": "USD"}
{"@type": "MenuItemOption","@id": "top-moz-opt-whole-lge","menuItemId": {"@id": "top-moz","displayOrder": 3},"applicableParentOptionValue": "Large","optionType": "PIZZA_SIDE","value": "PIZZA_SIDE_WHOLE"}
{"@type": "MenuItemOffer","@id": "off-mozz-whole-lge","sku": "744","menuItemOptionId": "top-moz-opt-whole-lge","price": 1.50,"priceCurrency": "USD"}

服务

Service 实体定义了餐厅的订餐操作提供方式,例如服务类型。ServiceAreaServiceHoursOperationHoursFee 实体说明了服务时长、服务区域和费用。

一家餐馆可以定义多个 Service 对象(例如,如果餐馆同时支持送餐和外卖服务),但一个 Service 应通过该 Service 的 serviceType 属性唯一地连接到单个餐厅。

用例 最佳做法
用例 1:基本配送服务 使用 ServiceHoursOperationHours 中的 openscloses 属性可分别指定用户完成(完成)订单和下订单的开始时间和结束时间。如需指定交货期(自提/交货的预计时间),请使用 ServiceHoursleadTimeMinleadTimeMax 属性。

JSON

以下示例服务接受从 2016 年 2 月 1 日到 2016 年 3 月 1 日上午 8 点到下午 6 点(最新的订单可在下午 5:59:59 下达)的订单,并且最短等待时间为 1 小时,最长等待时间为 90 分钟。提供邮政编码的服务为美国邮政编码 94041。用户需支付 5 美元运费。

{
  "@type": "Service",
  "@id": "10824/delivery",
  "serviceType": "DELIVERY",
  "menuId": "10824",
  "restaurantId": "10824"
} {
  "@type": "ServiceArea",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "postalCode": 94041,
  "addressCountry": "US"
} {
  "@type": "OperationHours",
  "@id": "10824/deliveryOh",
  "serviceId": "10824/delivery",
  "validFrom": "2016-02-01T00:00:00-07:00",
  "validThrough": "2016-03-01T00:00:00-07:00",
  "opens": "T08:00",
  "closes": "T18:00"
} {
  "@type": "ServiceHours",
  "@id": "613741/delivery",
  "orderType": "ASAP",
  "serviceId": "10824/delivery",
  "leadTimeMin": 60,
  "leadTimeMax": 90
} {
  "@type": "Fee",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "USD",
  "price": 5.0
}

送货和自提时间

以下示例概述了如何定义服务的送货和自提时间。

用例 最佳做法
用例 1:送货时间配置 对于尽快订单,请使用 ServiceHoursleadTimeMinleadTimeMax 属性。对于提前下单,请使用 OperationHours。使用 ServiceHoursOperationHoursisSpecialHour 属性,在节假日期间提供特殊的送货和订购期限
用例 2:自提时段配置 对于尽快订单,请使用 ServiceHoursleadTimeMinleadTimeMax 属性。对于提前下单,请使用 OperationHours。使用 ServiceHoursOperationHoursisSpecialHour 属性,在节假日特殊自提和订购时段提供服务。

JSON

餐厅尽快接受外卖服务并提前下单。 同时还支持特殊的节假日送货时间。

在此示例中,用户可以随时下单。工作日送货时间:上午 9 点至晚上 11 点。周末送货上午 9 点至 9 点。具体而言,在 2019 年 12 月 24 日,送货时间为上午 9 点到下午 4 点。该服务最短等待时间为 1 小时,最长等待时间为 90 分钟。

对于任何日期(包括 2019 年 12 月 24 日),用户都可以提前 6 天(8640 分钟)到 1 小时下单。用户只能以 15 分钟为增量提前下单(例如,晚上 8:00、晚上 8:15、晚上 8:30)。配送服务在代码所述的多边形区域中提供,用户需要支付 $5 的运费。

{
  "@type": "Service",
  "@id": "10824/delivery",
  "serviceType": "DELIVERY",
  "menuId": "10824",
  "restaurantId": "10824"
} {
  "@type": "ServiceArea",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "polygon": ["-20.728777 116.804256 -20.736323 116.8161 -20.722997 116.86468 -20.725406 116.871547 -20.736323 116.873607 -20.7474 116.816444 -20.756871 116.819877 -20.757673 116.788291 -20.740497 116.786403"]
} {
  "@type": "OperationHours",
  "@id": "427/deliveryOh",
  "serviceId": "10824/delivery",
  "opens": "T00:00",
  "closes": "T23:59",
  "isSpecialHour": false
} {
  "@type": "ServiceHours",
  "@id": "613741/delivery",
  "orderType": "ASAP",
  "serviceId": "10824/delivery",
  "operationHoursId":["427/deliveryOh"],
  "opens": "T09:00",
  "closes": "T23:00",
  "dayOfWeek": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"],
  "leadTimeMin": 60,
  "leadTimeMax": 90,
  "isSpecialHour": false
} {
  "@type": "ServiceHours",
  "@id": "3654/delivery",
  "orderType": "ADVANCE",
  "serviceId": "10824/delivery",
  "operationHoursId":["427/deliveryOh"],
  "opens": "T09:00",
  "closes": "T23:00",
  "dayOfWeek": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"],
  "advanceBookingRequirementMin": 60,
  "advanceBookingRequirementMax": 8640,
  "advanceBookingSlotInterval": "PT15M",
  "isSpecialHour":false
} {
  "@type": "ServiceHours",
  "@id": "4694/delivery",
  "orderType": "ASAP",
  "serviceId": "10824/delivery",
  "operationHoursId":["427/deliveryOh"],
  "opens": "T09:00",
  "closes": "T21:00",
  "dayOfWeek": ["SATURDAY", "SUNDAY"],
  "leadTimeMin": 60,
  "leadTimeMax": 90,
  "isSpecialHour": false
} {
  "@type": "ServiceHours",
  "@id": "6479/delivery",
  "orderType": "ADVANCE",
  "serviceId": "10824/delivery",
  "operationHoursId":["427/deliveryOh"],
  "opens": "T09:00",
  "closes": "T21:00",
  "dayOfWeek": ["SATURDAY", "SUNDAY"],
  "advanceBookingRequirementMin": 60,
  "advanceBookingRequirementMax": 8640,
  "advanceBookingSlotInterval": "PT15M",
  "isSpecialHour":false
} {
  "@type": "ServiceHours",
  "@id": "3754/delivery",
  "orderType": "ASAP",
  "serviceId": "10824/delivery",
  "validFrom": "2019-12-24T00:00:00+10:00",
  "validThrough": "2019-12-24T23:59:59+10:00",
  "opens": "T09:00",
  "closes": "T16:00",
  "leadTimeMin": 60,
  "leadTimeMax": 90,
  "isSpecialHour": true
} {
  "@type": "Fee",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "USD",
  "price": 5.00
}

JSON

餐厅尽快接受订餐,并选择自取服务。它还支持特殊的节假日自提时段。

在此示例中,用户可以在服务开始前 2 小时开始在线订购。工作日的自提时段是上午 9 点到晚上 11 点。周末自提时段为上午 9 点至晚上 9 点。 具体而言,在 2019 年 12 月 24 日,自提时间是上午 9 点到下午 4 点。 自提的最短等待时间为 30 分钟,最长等待时间为 1 小时。

对于任何日期(包括 2019 年 12 月 24 日),用户都可以提前 2 天(2880 分钟)到 30 分钟之前下单。用户只能提前 15 分钟(例如,晚上 8:00、晚上 8:15、晚上 8:30)下自提订单。用户不收取自提费用。

{
  "@type": "Service",
  "@id": "10824/takeout",
  "serviceType": "TAKEOUT",
  "menuId": "10824",
  "restaurantId": "10824"
} {
  "@type": "OperationHours",
  "@id": "427/takeoutOh",
  "serviceId": "10824/takeout",
  "opens": "T07:00",
  "closes": "T23:00",
  "dayOfWeek": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"]
} {
  "@type": "OperationHours",
  "@id": "2652/takeoutOh",
  "serviceId": "10824/takeout",
  "opens": "T07:00",
  "closes": "T21:00",
  "dayOfWeek": ["SATURDAY", "SUNDAY"]
} {
  "@type": "ServiceHours",
  "@id": "613741/takeout",
  "orderType": "ASAP",
  "serviceId": "10824/takeout",
  "operationHoursId":["427/takeoutOh"],
  "opens": "T09:00",
  "closes": "T23:00",
  "dayOfWeek": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"],
  "leadTimeMin": 30,
  "leadTimeMax": 60,
  "isSpecialHour": false
} {
  "@type": "ServiceHours",
  "@id": "3654/takeout",
  "orderType": "ADVANCE",
  "serviceId": "10824/takeout",
  "operationHoursId":["427/takeoutOh", "2652/takeoutOh"],
  "opens": "T09:00",
  "closes": "T23:00",
  "dayOfWeek": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"],
  "advanceBookingRequirementMin": 30,
  "advanceBookingRequirementMax": 2880,
  "advanceBookingSlotInterval": "PT15M",
  "isSpecialHour": false
} {
  "@type": "ServiceHours",
  "@id": "4694/takeout",
  "orderType": "ASAP",
  "serviceId": "10824/takeout",
  "operationHoursId": ["2652/takeoutOh"],
  "opens": "T09:00",
  "closes": "T21:00",
  "dayOfWeek": ["SATURDAY", "SUNDAY"],
  "leadTimeMin": 30,
  "leadTimeMax": 60,
  "isSpecialHour": false
} {
  "@type": "ServiceHours",
  "@id": "6479/takeout",
  "orderType": "ADVANCE",
  "serviceId": "10824/takeout",
  "operationHoursId": ["427/takeoutOh", "2652/takeoutOh"],
  "opens": "T09:00",
  "closes": "T21:00",
  "dayOfWeek": ["SATURDAY", "SUNDAY"],
  "advanceBookingRequirementMin": 30,
  "advanceBookingRequirementMax": 2880,
  "advanceBookingSlotInterval": "PT15M",
  "isSpecialHour": false
} {
  "@type": "ServiceHours",
  "@id": "3754/takeout",
  "orderType": "ASAP",
  "serviceId": "10824/takeout",
  "validFrom": "2019-12-24T00:00:00+10:00",
  "validThrough": "2019-12-24T23:59:59+10:00",
  "opens": "T09:00",
  "closes": "T16:00",
  "leadTimeMin": 30,
  "leadTimeMax": 60,
  "isSpecialHour": true
}

节假日和特殊营业时间

您可以使用 ServiceHoursOperationHoursisSpecialHour 属性来替换现有服务时间和/或营业时间。通过这种方法,您可以只定义一次常规营业时间,并且可以在节假日和特殊活动期间选择性地替换营业时间。

您必须为服务履单指定两个单独的时间段:订购期限OperationHours,用于指定用户何时可以下单)和履单期限ServiceHours,用于指定何时可以履行订单)。

用例 最佳做法
用例 1:对当日订单开放,但对高级订单关闭 如需指定特殊营业时间的生效日期,请使用 ServiceHoursOperationHours 实体的 validFromvalidThrough 属性(isSpecialHour 属性设置为“true”)。

JSON

此示例指明该服务在圣诞节当天营业,但提前安排在当天下单。 餐厅尽快接受订餐,并选择自取服务。

常规的自提时段(包括订单和服务时段)是上午 9 点到晚上 9 点,2017 年平安夜是上午 9 点到下午 4 点。 自提的最短等待时间为 1 小时,最长等待时间为 90 分钟。对于任何一天,用户都可以提前 2 天(2880 分钟)到 30 分钟提前下单,但不能在关闭的日期/时段(例如圣诞节、7 月 4 日和平安夜 4 点以后)下订单。用户只能提前 15 分钟(例如,下午 2:00、下午 2:15、下午 2:30)提前下取餐订单。

用户不收取自提费用。此示例支持以下场景:

  • 用户在 12 月 25 日下单即可当天送达。
  • 用户可以在 12 月 25 日提前下单,配送时间为 12 月 27 日。
  • 用户无法在 12 月 22 日提前下单,且商品安排在 12 月 25 日送达。
  • 用户在 7 月 4 日既无法提前下单,也无法尽快下单。
{
  "@type": "Service",
  "@id": "10824/takeout",
  "serviceType": "TAKEOUT",
  "menuId": "10824",
  "restaurantId": "10824"
} {
  "@type": "OperationHours",
  "@id": "427/takeoutOh",
  "serviceId": "10824/takeout",
  "opens": "T09:00",
  "closes": "T21:00"
} {
  "@type": "ServiceHours",
  "@id": "613741/takeout",
  "orderType": "ASAP",
  "serviceId": "10824/takeout",
  "opens": "T09:00",
  "closes": "T21:00",
  "isSpecialHour": false,
  "leadTimeMin": 60,
  "leadTimeMax": 90
} {
  "@type": "ServiceHours",
  "@id": "37/takeout",
  "orderType": "ASAP",
  "serviceId": "10824/takeout",
  "operationHoursId": "427/takeoutOh",
  "opens": "T09:00",
  "closes": "T16:00",
  "validFrom": "2017-12-24T00:00:00-07:00",
  "validThrough": "2017-12-24T23:59:59-07:00",
  "isSpecialHour": true,
  "leadTimeMin": 60,
  "leadTimeMax": 90
} {
  "@type": "ServiceHours",
  "@id": "358/takeout",
  "orderType": "ASAP",
  "serviceId": "10824/takeout",
  "operationHoursId": "427/takeoutOh",
  "opens": "T00:00",
  "closes": "T00:00",
  "validFrom": "2017-12-25T00:00:00-07:00",
  "validThrough": "2017-12-25T23:59:59-07:00",
  "isSpecialHour": true,
  "leadTimeMin": 60,
  "leadTimeMax": 90
} {
  "@type": "ServiceHours",
  "@id": "4356/takeout",
  "orderType": "ASAP",
  "serviceId": "10824/takeout",
  "operationHoursId": "427/takeoutOh",
  "opens": "T00:00",
  "closes": "T00:00",
  "validFrom": "2017-07-04T00:00:00-07:00",
  "validThrough": "2017-07-04T23:59:59-07:00",
  "isSpecialHour": true,
  "leadTimeMin": 60,
  "leadTimeMax": 90
} {
  "@type": "ServiceHours",
  "@id": "3654/takeout",
  "orderType": "ADVANCE",
  "serviceId": "10824/takeout",
  "opens": "T09:00",
  "closes": "T21:00",
  "isSpecialHour": false,
  "advanceBookingRequirementMin": 30,
  "advanceBookingRequirementMax": 2880,
  "advanceBookingSlotInterval": "PT15M"
} {
  "@type": "ServiceHours",
  "@id": "54/takeout",
  "orderType": "ADVANCE",
  "serviceId": "10824/takeout",
  "opens": "T00:00",
  "closes": "T00:00",
  "validFrom": "2017-12-24T00:00:00-07:00",
  "validThrough": "2017-12-24T23:59:59-07:00",
  "isSpecialHour": true,
  "advanceBookingRequirementMin": 30,
  "advanceBookingRequirementMax": 2880,
  "advanceBookingSlotInterval": "PT15M"
} {
  "@type": "ServiceHours",
  "@id": "5436/takeout",
  "orderType": "ADVANCE",
  "serviceId": "10824/takeout",
  "opens": "T00:00",
  "closes": "T00:00",
  "validFrom": "2017-12-25T00:00:00-07:00",
  "validThrough": "2017-12-25T23:59:59-07:00",
  "isSpecialHour": true,
  "advanceBookingRequirementMin": 30,
  "advanceBookingRequirementMax": 2880,
  "advanceBookingSlotInterval": "PT15M"
} {
  "@type": "ServiceHours",
  "@id": "345/takeout",
  "orderType": "ADVANCE",
  "serviceId": "10824/takeout",
  "opens": "T00:00",
  "closes": "T00:00",
  "validFrom": "2017-07-04T00:00:00-07:00",
  "validThrough": "2017-07-04T23:59:59-07:00",
  "isSpecialHour": true,
  "advanceBookingRequirementMin": 30,
  "advanceBookingRequirementMax": 2880,
  "advanceBookingSlotInterval": "PT15M"
}

送货和自提费用

以下示例概述了如何定义服务的送货和自提费用。

用例 最佳做法
用例 1:运费配置 使用 Fee 实体定义运费类型。
使用场景 2:自提服务的服务费配置 使用 Fee 实体定义自提服务费用的类型。

JSON

餐厅支持不同类型的送餐费。

在本示例中,免费送货的最低订单金额为 30.00 美元,固定运费为 5.00 美元(没有最低订单金额),占总购物车金额的 3%。送货时间(包括订单和服务时间)是上午 9 点到晚上 11 点。传送的最短等待时间为 1 小时,最长等待时间为 90 分钟。

用户可以在任何日期提前 6 天(8640 分钟)到 30 分钟之前下单。用户只能以 15 分钟为增量提前下单(例如,下午 2:00、下午 2:15、下午 2:30)。 符合投放条件的区域在 ServiceArea 实体中指定。

{
  "@type": "Service",
  "@id": "10824/delivery",
  "serviceType": "DELIVERY",
  "menuId": "10824",
  "restaurantId": "10824"
} {
  "@type": "ServiceArea",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "polygon": ["-20.728777 116.804256 -20.736323 116.8161 -20.722997 116.86468 -20.725406 116.871547 -20.736323 116.873607 -20.7474 116.816444 -20.756871 116.819877 -20.757673 116.788291 -20.740497 116.786403"]
} {
  "@type": "OperationHours",
  "@id": "427/deliveryOh",
  "serviceId": "10824/delivery",
  "opens": "T09:00",
  "closes": "T23:00"
} {
  "@type": "ServiceHours",
  "@id": "613741/delivery",
  "orderType": "ASAP",
  "serviceId": "10824/delivery",
  "opens": "T09:00",
  "closes": "T23:00",
  "isSpecialHour": false,
  "leadTimeMin": 60,
  "leadTimeMax": 90
} {
  "@type": "ServiceHours",
  "@id": "3654/delivery",
  "orderType": "ADVANCE",
  "serviceId": "10824/delivery",
  "opens": "T09:00",
  "closes": "T23:00",
  "isSpecialHour": false,
  "advanceBookingRequirementMin": 30,
  "advanceBookingRequirementMax": 8640,
  "advanceBookingSlotInterval": "PT15M"
} {
  "@type": "Fee",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "AUD",
  "price": 0.00,
  "eligibleTransactionVolumeMin": 30
} {
  "@type": "Fee",
  "@id": "4326",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "AUD",
  "price": 5.00,
  "eligibleTransactionVolumeMax": 29.99
} {
  "@type": "Fee",
  "@id": "5432",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "AUD",
  "percentageOfCart": 3.00
}

JSON

餐厅支持不同类型的服务费。

在本示例中,最低服务费为 30.00 美元,固定服务费为 1.00 美元,最低购物车手续费为 2%,购物车总金额为 2%。自提时段(包括订单和服务时段)为上午 9 点至晚上 11 点。自提的最短等待时间为 1 小时,最长等待时间为 90 分钟。

用户只能以 15 分钟为增量提前下单(例如,下午 2:00、下午 2:15、下午 2:30)。

{
  "@type": "Service",
  "@id": "10824/takeout",
  "serviceType": "TAKEOUT",
  "menuId": "10824",
  "restaurantId": "10824"
} {
  "@type": "OperationHours",
  "@id": "427/takeoutOh",
  "serviceId": "10824/takeout",
  "opens": "T09:00",
  "closes": "T23:00"
} {
  "@type": "ServiceHours",
  "@id": "613741/takeout",
  "orderType": "ASAP",
  "serviceId": "10824/takeout",
  "opens": "T09:00",
  "closes": "T23:00",
  "isSpecialHour": false,
  "leadTimeMin": 60,
  "leadTimeMax": 90
} {
  "@type": "ServiceHours",
  "@id": "3654/takeout",
  "orderType": "ADVANCE",
  "serviceId": "10824/takeout",
  "opens": "T09:00",
  "closes": "T23:00",
  "isSpecialHour": false,
  "advanceBookingRequirementMin": 30,
  "advanceBookingRequirementMax": 8640,
  "advanceBookingSlotInterval": "PT15M"
} {
  "@type": "Fee",
  "@id": "28427",
  "serviceId": "10824/takeout",
  "feeType": "SERVICE",
  "priceCurrency": "AUD",
  "price": 0.00,
  "percentageOfCart": 2.00,
  "eligibleTransactionVolumeMin": 30
} {
  "@type": "Fee",
  "@id": "4326",
  "serviceId": "10824/takeout",
  "feeType": "SERVICE",
  "priceCurrency": "AUD",
  "price": 1.00,
  "percentageOfCart": 2.00,
  "eligibleTransactionVolumeMax": 29.99
}

动态配送费用

以下示例概述了如何根据不同的因素(例如区域、时段和商品数量)定义配送服务的费用。

用例 最佳做法
使用情形 1:按区域和距离计算送货费用 使用 FeeeligibleRegion 属性指定区域,并使用 pricepriceCurrency 属性指定价格。
使用情形 2:按时间划分的送餐费 您可以使用 FeevalidFromvalidThrough 属性指定运费的有效期。
使用情形 3:超出免费送货金额和订单金额 使用 FeeeligibleTransactionVolumeMineligibleTransactionVolumeMax 属性指定与配送价格关联的购物车金额下限和上限。

JSON

以下示例 Service 在 94087 的邮政编码中收取 5.00 美元的运费,在其他区域收取 2.00 美元的运费。

{
  "@type": "Fee",
  "@id": "4326",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "USD",
  "price": 5.00,
  "eligibleRegion": "28427"
} {
  "@type": "ServiceArea",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "postalCode": 94087,
  "addressCountry": "US"
} {
  "@type": "Fee",
  "@id": "5432",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "USD",
  "price": 2.00
}

JSON

以下示例 Service 从 2017 年 1 月 1 日到 2017 年 2 月 1 日收取 20 美元的运费,之后再收取 10 美元。

{
  "@type": "Fee",
  "@id": "4326",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "USD",
  "price": 10.00
} {
  "@type": "Fee",
  "@id": "5432",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "USD",
  "price": 20.00,
  "validFrom": "2017-01-01T00:00:00-07:00",
  "validThrough": "2017-02-01T00:00:00-07:00"
}

JSON

以下服务对金额不超过 100 美元的订单收取 10 美元的运费,否则收取运费。

{
  "@type": "Fee",
  "@id": "4326",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "USD",
  "price": 10.00,
  "eligibleTransactionVolumeMax": 99.99
} {
  "@type": "Fee",
  "@id": "5432",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "USD",
  "price": 0.00,
  "eligibleTransactionVolumeMin": 100
}

送货服务区域

以下示例概述了如何定义配送服务的可用服务区域。

用例 最佳做法
用例 1:服务区域定义

使用 ServiceArea 定义可以提供食物的地理区域。

使用情形 2:您设置了多边形服务区域。
用例 3:您有一个服务区域,但并不为其中的较小区域提供服务。
使用情形 4:您有多个服务区域。 创建多个 ServiceArea 实体来表示您的服务区域。

JSON

餐厅支持为不同的服务区域提供送餐服务。服务区域可以由多边形形状、邮政编码或圆形进行定义。

{
  "@type": "Service",
  "@id": "10824/delivery",
  "serviceType": "DELIVERY",
  "menuId": "10824",
  "restaurantId": "10824"
} {
  "@type": "ServiceArea",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "polygon": ["-20.728777 116.804256 -20.736323 116.8161 -20.722997 116.86468 -20.725406 116.871547 -20.736323 116.873607 -20.7474 116.816444 -20.756871 116.819877 -20.757673 116.788291 -20.740497 116.786403"]
} {
  "@type": "ServiceArea",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "postalCode": 6714,
  "addressCountry": "AU"
} {
  "@type": "ServiceArea",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "geoMidpointLatitude": -20.733575,
  "geoMidpointLongitude": 116.844931,
  "geoRadius": 1000
} {
  "@type": "OperationHours",
  "@id": "427/deliveryOh",
  "serviceId": "10824/delivery",
  "opens": "T09:00",
  "closes": "T23:00"
} {
  "@type": "ServiceHours",
  "@id": "613741/delivery",
  "orderType": "ASAP",
  "serviceId": "10824/delivery",
  "opens": "T09:00",
  "closes": "T23:00",
  "isSpecialHour": false,
  "leadTimeMin": 60,
  "leadTimeMax": 90
} {
  "@type": "ServiceHours",
  "@id": "3654/delivery",
  "orderType": "ADVANCE",
  "serviceId": "10824/delivery",
  "opens": "T09:00",
  "closes": "T23:00",
  "isSpecialHour": false,
  "advanceBookingRequirementMin": 30,
  "advanceBookingRequirementMax": 8640,
  "advanceBookingSlotInterval": "PT15M"
} {
  "@type": "Fee",
  "@id": "4326",
  "serviceId": "10824/delivery",
  "feeType": "DELIVERY",
  "priceCurrency": "AUD",
  "price": 5.00
}

JSON

{
  "@type": "ServiceArea",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "polygon": ["37.806000 -122.425592 37.775849 -122.419043 37.795547 -122.394046 37.808747 -122.412619"]
}

JSON

传递一个列表,其中包含表示多边形环的字符串。添加 ServiceAreapolygon 属性中排除的区域。 订餐服务会将重叠的区域解读为排除区域。

{
  "@type": "ServiceArea",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "polygon": ["37.771535 -122.506881 37.764289 -122.506669 37.766497 -122.453058", "37.791707 -122.447987 37.746676 -122.449433 37.736150 -122.505944 37.780924 -122.509729"]
}

JSON

{
  "@type": "ServiceArea",
  "@id": "28427",
  "serviceId": "10824/delivery",
  "polygon": ["37.785847 -122.484851 37.772757 -122.483983 37.774442 -122.458563 37.786876 -122.459474"]
} {
  "@type": "ServiceArea",
  "@id": "4356",
  "serviceId": "10824/delivery",
  "polygon": ["37.774804 -122.454774 37.766224 -122.452881 37.769087 -122.436043 37.773087 -122.437417"]
}

删除和停用实体

您可以从服务中移除不希望 Google 向用户公开的实体。如果您需要通知 Google 某餐馆或服务已永久或暂时停业,此流程会非常有用。

移除实体

要删除某个实体,请将其从 Feed 中删除;其服务等级协议承诺为 2 小时。如需重新引入某个实体,请在您的 Feed 中重新添加该实体。

暂时移除服务实体

您还可以针对特定时间段或未定义的时间段暂时停用 Service 实体。

如果您希望允许用户提前下单,但在特定时间段内(例如节假日期间)停用立即下单,那么在特定时间段停用某个时间段非常有用。

如果您希望禁止用户在某个未来的日期之前提前和立即下订单,在未定义的时间段停用 Service 实体会很有用。

暂时停用服务需要直接更新 Feed 文件,具体方法与永久移除服务一样。

使用以下方法为 Service 在预定义的时间段内停用或替换营业时间。

  • 如需提前将某个 Service 实体暂停已知的特定时间段(例如节假日营业时间),请使用 OperationHoursServiceHours 实体。

    使用 isSpecialHour 属性为 true 创建一个新的 ServiceHours 实体。当特殊营业时间有效时,必须使用 validFromvalidThrough 属性指定时间值。将 openscloses 时间设置为“00:00”。在特殊营业时间实体 validFromvalidThrough 值之外,服务将在正常营业时间 ServiceHours 实体之后的一小时内自动恢复。

    {
      "@type":"ServiceHours",
      "@id":"delivery_1_service_hours_holiday",
      "orderType":"ASAP",
      "serviceId":"delivery_1",
      "operationHoursId":"delivery_1_op_hours",
      "opens":"00:00",
      "closes":"00:00",
      "validFrom":"2022-12-25T00:00:00-05:00",
      "validThrough":"2022-12-26T00:00:00-05:00",
      "leadTimeMin":"20",
      "leadTimeMax":"20",
      "isSpecialHour":true
    }
    
  • 如需暂时移除未定义的时间段的 Service 实体,请将其 isDisabled 属性设置为“true”。如需重新启用,请从实体中移除该属性或将值设置为“false”。

    请注意,只有在不知道何时重新建立服务时,才应使用 isDisabled 属性。例如,将其用于意外事件,而不是将其用于节假日。