選單
菜單實體說明餐廳提供給顧客的菜單。菜單實體必須透過餐廳的 menuId
屬性定義於餐廳實體中。
定義選單的其他物件 (例如說明、圖片、外掛程式和營養資訊) 包括 MenuItem
和 MenuItemOffer
,以及選用物件 MenuSection
、Availability
和 MenuItemOption
。
菜單專區
您可以使用 MenuSection
物件,將多個 MenuItem
物件整理成邏輯類別。此方法對於提供多種菜單 (例如早餐、午餐和晚餐) 的餐廳非常實用。將每個選單新增為個別的 MenuSection
。
用途 | 最佳做法 |
---|---|
用途 1:基本選單 | 使用 MenuItem 、MenuItemOffer 和 MenuSection (選用) |
以下範例符合「基本選單」用途與兩個選單部分 (「全天食」和「Drinks」) 兩個選單部分,每個部分都包含兩個選單項目:
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 指定區段的 availabilityStarts 和 availabilityEnds 時間。 |
用途 2:限時選單項目 | 使用 MenuItemOffer 的 menuItemId 指定要連結優惠的 MenuItem 。使用 Availability 指定優惠的 availabilityStarts 、availabilityEnds 和 availabilityDay code> 時間。 |
用途 3:多優惠選單項目 | 使用 MenuItemOffer 的 menuItemId 屬性並設定 availabilityId 屬性,以指定價格的有效期間。 |
JSON
基本選單,包含「全天餐飲」、「午餐」和「小菜」。
選單分為三個部分。「午餐 (供應時間:上午 11:30 至下午 2:30)」部分,時段為上午 11:30 到下午 2:30,如 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": "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
基本選單,包含「全天餐飲」、「午餐」和「小菜」。
選單分為三個部分。「午餐 (供應時間:上午 11:30 至下午 2:30)」部分,時段為上午 11:30 到下午 2:30,如 Availability
物件所述。選單項目「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
提供依價格和時間區分的菜單項目。
選單分為兩個部分。選單項目「Ita」有兩個對應的 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 物件的 eligibleQuantityMin 和 eligibleQuantityMax 屬性,指定外掛程式區段中可選取的外掛程式項目數量下限和上限。 |
用途 2:預設外掛程式 | 請使用外掛程式 MenuSection 物件的 defaultOptionId 來提供預設外掛程式選項。 |
用途 3:綜合/包裝餐點 | 使用 MenuSection 物件說明使用者在選取餐點/組合時可以做出的選擇。 |
JSON
在這個範例中,您可以使用繪圖選項自訂「Cappuccino」選單項目。
「全天食物」菜單區段的「地中海貝果」項目還有一個額外加購選項,另外還有兩個蛋類加購選項。
在同一個選單區段中的「Club Bagel」項目提供相同的額外附加項目,以及一個 Scrambled egg 的「Egg Options」附加選項。
飲料專區中有一個提供「牛奶」加購選項的商品,以及一個「Straw 選項」加購選項。
{ "@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 和 Scrambled egg 選項。「Chorizo 和 Chili Sauce」是預設的「Extras」(額外內容) 外掛程式,而重組的雞蛋是預設的「蛋選項」(Egg Option) 外掛程式。
{ "@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 個選項) 和「額外項目」(三個選單項目,使用者須選擇 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 }
使用選單項目選項自訂
您可以在 MenuItemOption
的 menuItemId
屬性中參照 MenuItem
,藉此提供多個選項。
舉例來說,如果披薩有多種大小,您可以為每種尺寸建立 MenuItemOption
,並在每個 MenuItemOption
的 menuItemId
屬性中參照披薩選單項目。
用途 | 最佳做法 |
---|---|
用途 1:不同尺寸的披薩 | 使用MenuItemOption 和MenuItemOffer |
用途 2:提供不同配料和尺寸的客製化披薩 | 使用 MenuItemOption 和 MenuItemOffer 即可根據披薩尺寸變更配料價格。 |
用途 3:可自訂的披薩,左側和右側有所不同 | 請使用 MenuItemOption 的 value 屬性指定披薩的側面。使用 MenuItemOffer 的 price 和 priceCurrency 屬性來指定每披薩邊的價格。 |
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 美元,中型 $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
實體會定義從餐廳傳遞訂餐動作 (例如服務類型)。ServiceArea
、ServiceHours
、OperationHours
和 Fee
實體皆說明服務時間、服務範圍和費用。
一家餐廳可以定義多個 Service 物件 (例如,如果餐廳同時支援外送和外帶服務),但一個 Service 應透過 Service 的 serviceType
屬性明確連結單一餐廳。
用途 | 最佳做法 |
---|---|
用途 1:基本運送服務 | 使用 ServiceHours 和 OperationHours 中的 opens 和 closes 屬性分別指定使用者能夠完成 (完成) 訂單及下單的開始和結束時間。如要指定運送時間 (預計取貨/外送的預估時間),請使用 ServiceHours 的 leadTimeMin 和 leadTimeMax 屬性。 |
JSON
下列服務範例接受自 2016 年 2 月 1 日至 2016 年 3 月 1 日下午 8 點至 6 點之間接受的訂單 (最新訂單可在 2016 年 2 月 1 日下午 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:運送時間設定 | 針對「ASAP」訂單,請使用 ServiceHours 的 leadTimeMin 和 leadTimeMax 屬性。使用 OperationHours 預訂餐點。使用 ServiceHours 和 OperationHours 的 isSpecialHour 屬性,提供特殊的節日送貨與訂餐回溯期 |
用途 2:取貨時間設定 | 針對「ASAP」訂單,請使用 ServiceHours 的 leadTimeMin 和 leadTimeMax 屬性。使用 OperationHours 預訂餐點。請使用 ServiceHours 和 OperationHours 的 isSpecialHour 屬性,設定假日特別取貨和訂購回溯期。 |
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 小時。
使用者可以提前 2 天 (2880 分鐘) 到 30 分鐘之前 (包括 2019 年 12 月 24 日) 下單。使用者只能以 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 }
假日和特殊營業時間
您可以使用 ServiceHours
和 OperationHours
的 isSpecialHour
屬性覆寫現有的服務時間和/或營業時間。這種方法可讓您定義一般營業時間一次,並選擇性覆寫假日和特殊事件。
您必須針對服務執行要求指定兩個獨立的時間範圍:訂購時間範圍 (OperationHours
,指定使用者可下單的時間) 和「執行要求期」 (ServiceHours
,會指定訂單可履行的時間)。
用途 | 最佳做法 |
---|---|
用途 1:適用於當日訂單,但不適用於進階訂單 | 如要指定特殊營業時間的生效日期,請使用 ServiceHours 和 OperationHours 實體的 validFrom 和 validThrough 屬性 (請將 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% 服務費。取貨時間 (包括訂單和服務時間) 為上午 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:按區域和距離區分的運費 | 請使用 Fee 的 eligibleRegion 屬性指定區域,並使用 price 和 priceCurrency 屬性指定價格。 |
使用案例 2:按時間劃分的運費 | 請使用 Fee 的 validFrom 和 validThrough 屬性指定運費有效期間。 |
用途 3:以上免運費和訂單金額 | 請使用 Fee 的 eligibleTransactionVolumeMin 和 eligibleTransactionVolumeMax 屬性,指定與運送價格相關聯的最低和最高購物車價值。 |
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
下列「服務」會收取訂單金額 $10 美元的運費,金額最多 $100 美元,否則不會收取運費。
{ "@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:服務範圍定義 |
使用 |
使用案例 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
傳送清單,其中包含代表多邊形迴圈的字串。包括在 ServiceArea
的 polygon
屬性中排除的區域。
「訂餐」功能會將重疊區域解讀為排除區域。
{ "@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 知道餐廳或服務已永久或暫時關閉,這項程序就非常實用。
移除實體
如要移除實體,請從動態饋給中刪除實體 (服務水準協議為 2 小時)。如要重新導入實體,請將其加回動態饋給。
暫時移除服務實體
您也可以針對特定或未定義的時間範圍暫時停用 Service
實體。
如果您要讓使用者預先下單,但在特定時間範圍內 (例如節日期間) 停用立即訂單功能,停用特定時間範圍會很實用。
如要停用使用者提前下單和立即下單,直到某些未指定的未來日期為止,停用 Service
實體就相當實用。
要暫時停用服務,必須直接更新動態饋給檔案,方法與永久移除動態饋給檔案相同。
您可以使用下列技巧,在預先定義的時間範圍內停用或覆寫 Service
的時數。
如要將
Service
實體暫停一段時間 (例如假日營業時間),請使用OperationHours
和ServiceHours
實體。透過
isSpecialHour
屬性建立新的 ServiceHours 實體,並將該實體設為true
。您必須使用validFrom
和validThrough
屬性來指定特殊營業時間的有效時間值。將opens
和closes
次設為 "00:00"。服務將在一般營業時間ServiceHours
實體的validFrom
和validThrough
值以外,自動恢復正常營業時間的營業時間。{ "@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
屬性。例如用於非預期事件,且不要用於假日)。