实现高级关系型广告资源

Menu 实体描述了餐馆向客户提供的菜单。菜单实体必须通过餐馆的 menuId 属性在餐馆实体中定义。

其他定义菜单的对象(例如说明、图片、插件和营养信息)包括 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 提供。如相应 MenuItemOffer 对象中引用的 Availability 所述,菜单项“Bibimbap”仅在中午 12:00 至下午 1:00 之间提供。

{
  "@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

在此示例中,“俱乐部百吉饼”菜单项是预先选中的,带有西班牙香肠和炒蛋选项。西班牙香肠和辣椒酱是默认的“Extras”附加项,而炒鸡蛋是其默认的“鸡蛋选项”附加项。

{
  "@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 个选项)和“Extras”(三个菜单项,用户必须选择 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,并在每个 MenuItemOptionmenuItemId 属性中引用披萨菜单项。

使用场景 最佳实践
用例 1:不同尺寸的披萨 使用 MenuItemOptionMenuItemOffer
用例 2:具有不同浇头和尺寸的可定制披萨 使用 MenuItemOptionMenuItemOffer 根据披萨尺寸更改浇头价格。
用例 3:左右两侧不同的自定义披萨 使用 MenuItemOptionvalue 属性指定披萨的一侧。使用 MenuItemOfferpricepriceCurrency 属性指定每个披萨面的价格。

NDJSON

披萨有 3 种不同尺寸,需要用户选择。每种大小的价格都不同。

夏威夷披萨的价格为 10.00 美元,小号为 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 美元,小号为 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 美元即可免运费;没有最低订单金额要求,则固定运费为 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% 的服务费。自提时间(包括下单和服务时间)为上午 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
}

Dynamic Delivery 费用

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

使用场景 最佳实践
使用场景 1:按区域和距离显示送货费用 使用 FeeeligibleRegion 属性指定区域,并使用 pricepriceCurrency 属性指定价格。
使用场景 2:送货费用(按时间) 使用 FeevalidFromvalidThrough 属性指定运费的有效期。
用例 3:超出免费送货范围且订单金额为免费 使用 FeeeligibleTransactionVolumeMineligibleTransactionVolumeMax 属性指定与运费关联的最低和最高购物车价值。

JSON

以下示例在邮政编码为 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

以下示例在 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 中删除;其服务等级协议 (SLA) 为 2 小时。如需重新引入某个实体,请将其重新添加到 Feed 中。

暂时移除服务实体

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

如果您希望用户提前下单,但在指定时间段(例如节假日期间)停用立即下单功能,则为特定时间段停用一个脚本非常有用。

如果您想禁止用户在某个未指定的未来日期之前提前和立即下单,则对于未定义的时间段停用 Service 实体会非常有用。

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

您可以使用以下技巧在预定义的时间段内停用或替换 Service 的营业时间。

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

    创建一个新的 ServiceHours 实体,将 isSpecialHour 属性设为 true。您需要使用 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 属性。例如,将其用于意外事件,而不要将其用于节假日)。