選單
「菜單」實體會描述餐廳提供給顧客的菜單。A 罩杯
你必須在餐廳實體中,透過餐廳的
menuId
屬性。
其他定義選單的物件 (例如說明、圖片、附加元件及
營養資訊) 包含MenuItem
和MenuItemOffer
,以及
MenuSection
、Availability
和 MenuItemOption
可選用物件。
菜單專區
您可以使用 MenuSection
物件,將多個 MenuItem
物件整理成
邏輯類別。對於擁有多家
菜單 (例如早餐、午餐和晚餐)。新增各個菜單
MenuSection
。
用途 | 最佳做法 |
---|---|
用途 1:基本選單 | 使用MenuItem 、MenuItemOffer 和
MenuSection (選填) |
以下範例與「基本選單」相符包含兩個選單專區的用途 (「全日食物」和「飲品」),每個都含有兩個菜單項目:
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" }
限時菜單
結合 Availability
的 MenuItemOffer
物件可用於建立
限時提供的選單項目和選單項目選項。使用 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」僅
服務時間為「Availability
」中午 12:00 至下午 1:00
會在對應的 MenuItemOffer
物件中參照。
{ "@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
內含優惠且價格和時間的菜單品項。
菜單分成兩部分。菜單項目「義大利麵」有兩個對應的
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
使用外掛程式進行自訂
選單項目可以有其他外掛程式選項。定義 MenuItem
的外掛程式
透過 menuAddOnId
參照 MenuSection
物件。這些 MenuSection
物件必須包含
適合各種外掛程式
您可以使用 defaultOptionId
提供預設的外掛程式 MenuItem
物件
請務必留意外掛程式 MenuSection
物件的屬性。
用途 | 最佳做法 |
---|---|
用途 1:基本外掛程式 | 使用外掛程式 MenuSection 物件的
eligibleQuantityMin 和 eligibleQuantityMax
屬性來指定外掛程式項目的最小和最大數量
可以選取位於外掛程式部分 |
用途 2:預設外掛程式 | 使用外掛程式 MenuSection 物件的
defaultOptionId 提供預設外掛程式選項。 |
使用案例 3:組合/套裝餐點 | 請使用 MenuSection 物件,說明使用者選取餐點/組合時可以做出的選項。 |
JSON
在這個範例中,「卡布奇諾」可使用吸管自訂菜單品項 如果有需要 SQL 指令的分析工作負載 則 BigQuery 可能是最佳選擇
「地中海貝格」還有一個額外加購選項 「全天食物」中的項目還有兩個「雞蛋」外掛程式 只要設定成「自動重新啟動」 和「在主機維護期間」選項即可
「俱樂部貝果」相同的選單部分含有相同的額外項目 提供外掛程式,加上「蛋類選項」加入打亂蛋的附加選項。
「飲料」部分中有一個商品標示「密克」外掛程式 和「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 預先選取選單項目 和打亂的蛋選項Chorizo 和 Chili Sauce 為預設的「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 個選項) 和 「花絮內容」(三個選單項目,使用者必須選擇 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 }
使用選單項目選項進行自訂
您能夠為 MenuItem
提供多個選項,方法是參照
MenuItemOption
的 menuItemId
屬性。
舉例來說,假設披薩有多種尺寸可供選擇,你可以建立
每個尺寸各 MenuItemOption
,並參照
每個 MenuItemOption
的 menuItemId
屬性。
用途 | 最佳做法 |
---|---|
用途 1:各種尺寸的披薩 | 使用MenuItemOption 和MenuItemOffer |
用途 2:使用不同配料的客製化披薩 和大小 | 使用 MenuItemOption 和 MenuItemOffer 即可變更
根據披薩量的大小決定配料 |
用途 3:可訂製披薩,搭配不同之處 左右兩側 | 使用 MenuItemOption 的 value 屬性,即可:
指定披薩的側面使用 price 和
「MenuItemOffer 」的 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.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 種配料,例如薩拉米 (Beef Salami) 和莫札瑞拉起司 而每一杯小披薩左右兩側的每一杯都的價格為 $1.00 美元 ,但整個小披薩的台幣是 NT $15 元。配料費用 $1.50 美元 中等披薩左右兩側的兩側,但 NT $30 元 估算整個中等披薩左側的配料成本為每邊 $2.00 美元, 大披薩右側,但大範圍的披薩是 NT $45 元 「披薩」,
{"@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
實體。
一間餐廳可以定義多個服務物件 (例如餐廳是
同時支援外送和外帶服務,但每項服務都應該
由「服務」的 serviceType
資源連結到單一餐廳。
用途 | 最佳做法 |
---|---|
用途 1:基本配送服務 | 在以下位置使用 opens 和 closes 屬性:
ServiceHours 和 OperationHours 用於指定
使用者能完成 (完成) 訂單的開始和結束時間
並分別下單如何指定交貨前置時間 (
預計到貨/到貨時間),請使用 leadTimeMin 和
ServiceHours 的 leadTimeMax 屬性。 |
JSON
以下範例「服務」會在每天上午 8 點至下午 6 點接受訂單 (最新訂單可在 2016 年 2 月 1 日下午 5:59:59 下單) 2016 年 1 月 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 }
外送和取貨時段
以下範例說明如何定義 課程中也會快速介紹 Memorystore 這是 Google Cloud 的全代管 Redis 服務
用途 | 最佳做法 |
---|---|
用途 1:運送時間設定 | 使用 leadTimeMin 和 leadTimeMax 屬性
的合格訂單金額為 ServiceHours 。使用
預訂訂單金額為 OperationHours 。使用
「ServiceHours 」和「isSpecialHour 」的房源
可享節日宅配及訂餐服務:OperationHours
回溯期小時數 |
用途 2:取貨時段設定 | 使用 leadTimeMin 和 leadTimeMax 屬性
的合格訂單金額為 ServiceHours 。使用
預訂訂單金額為 OperationHours 。使用
「ServiceHours 」和「isSpecialHour 」的房源
OperationHours 適用於特殊節日取貨和訂購時段
所以客戶只會在 TAM 當地的服務時間獲得回應 |
JSON
餐廳「盡快接受」,並提前訂購外送服務。 也支援特殊節日到貨時間。
在本範例中,使用者可以隨時提交線上訂單,平日送達時間為上午 9 點至晚上 11 點。週末到貨時間:上午 9 點至晚上 9 點 具體來說,2019 年 12 月 24 日的送達時間為上午 9 點到 4 點 這項服務提供至少 1 小時的等待時間 30 分鐘的等待時間。
使用者可以提前 6 天 (8640 分鐘) 到 1 小時下單 ,包括 2019 年 12 月 24 日。使用者只能將 提前訂購外送訂單,以 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:當天訂單允許,但已開放進階客戶使用 訂單數 | 如要指定特殊營業時間的有效日期,請使用
應用程式的 validFrom 和 validThrough 屬性
ServiceHours 和 OperationHours 個實體
(其中 isSpecialHour 屬性設為「true」)。 |
JSON
這個範例指定在當天 聖誕節期間,但當天排定的訂單提前關閉。 餐廳會盡快接受並預訂取貨服務。
一般取貨時段 (包含訂單和服務時間) 皆為 2017 年聖誕夜的上車時間為上午 9 點到晚上 9 點和聖誕夜,從上午 9 點到下午 4 點。 上車地點的等待時間最短為 1 小時,最長等待時間 90 分鐘。使用者可提前 2 天下單 (2880 分鐘) 提前 30 分鐘到 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" }
外送和取貨費用
以下範例說明如何定義 課程中也會快速介紹 Memorystore 這是 Google Cloud 的全代管 Redis 服務
用途 | 最佳做法 |
---|---|
用途 1:運費設定 | 使用 Fee
實體來定義運費類型。 |
用途 2:取貨服務的服務費設定 | 使用 Fee
實體,用來定義取貨服務費用類型。 |
JSON
餐廳支援不同類型的外送費用。
在這個例子中,訂單滿 $30.00 美元可享免運費 運費固定為 $5.00 美元 (沒有最低訂單門檻),以及 3% 的百分比 手續費。運送時間 (包括訂單和 服務時間為上午 9 點到晚上 11 點。配送的最短等待時間: 1 小時,最長 90 分鐘。
使用者可以提前 6 天 (8640 分鐘) 至 30 天下單
提前幾分鐘。使用者只能在
(例如下午 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:按區域和距離列出的外送費 | 使用 eligibleRegion 屬性
Fee
指定區域和 price
priceCurrency 屬性來指定價格。 |
用途 2:到貨時間的運費 | 使用 validFrom 和 validThrough 屬性
/Fee
指定運費的有效時間。 |
用途 3:滿額免運費,且訂單金額達到上限 | 使用 eligibleTransactionVolumeMin 和
eligibleTransactionVolumeMax 屬性
Fee 敬上
,指定與運送方式相關的最低和最高價值
價格。 |
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
下列「服務」範例會從 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 美元的運費,金額最高可達 $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 }
配送服務範圍
下列範例概述如何定義 Pod 中可用的服務範圍 外送服務
用途 | 最佳做法 |
---|---|
用途 1:服務範圍定義 |
使用 |
用途 2:貴商家有 Polygon 服務範圍。 | |
用途 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
實體。建立新的 ServiceHours 實體,並將
isSpecialHour
屬性設為true
。您必須使用validFrom
和validThrough
屬性來指定特殊營業時間的有效時間值。將opens
和closes
時間設為「00:00」。這項服務會在特殊營業時間實體的validFrom
和validThrough
值以外的一般營業時間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
屬性 重新建立時間舉例來說 但不要用於節日活動)。