เมนู
เอนทิตีเมนูอธิบายเมนูที่ร้านอาหารนำเสนอแก่ลูกค้า ต้องกำหนดเอนทิตีเมนูภายในเอนทิตีร้านอาหารผ่านพร็อพเพอร์ตี้ menuId
ของร้านอาหาร
ออบเจ็กต์อื่นๆ ที่กำหนดเมนู (เช่น คำอธิบาย รูปภาพ ส่วนเสริม และข้อมูลโภชนาการ) ได้แก่ MenuItem
และ MenuItemOffer
รวมถึงออบเจ็กต์ที่ไม่บังคับ MenuSection
, Availability
และ MenuItemOption
ส่วนเมนู
คุณใช้ออบเจ็กต์ MenuSection
เพื่อจัดระเบียบออบเจ็กต์ MenuItem
หลายรายการเป็นหมวดหมู่เชิงตรรกะได้ วิธีนี้มีประโยชน์สำหรับร้านอาหารที่มีหลายเมนู (เช่น อาหารเช้า อาหารกลางวัน และอาหารค่ำ) เพิ่มแต่ละเมนูเป็น MenuSection
แยกกัน
Use Case | แนวทางปฏิบัติแนะนำ |
---|---|
กรณีการใช้งาน 1: เมนูพื้นฐาน | ใช้ MenuItem , MenuItemOffer และ MenuSection (ไม่บังคับ) |
ตัวอย่างต่อไปนี้ตรงกับกรณีการใช้งาน "เมนูพื้นฐาน" ที่มีส่วนเมนู 2 ส่วน ("อาหารตลอดวัน" และ "เครื่องดื่ม") แต่ละส่วนมีรายการเมนู 2 รายการ
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
เพื่อสร้างส่วนเมนูแบบจํากัดเวลาแทน
Use Case | แนวทางปฏิบัติแนะนำ |
---|---|
กรณีการใช้งานที่ 1: ส่วนเมนูแบบจำกัดเวลา | ใช้ Availability เพื่อระบุเวลา availabilityStarts และ availabilityEnds ของส่วนนี้ |
กรณีการใช้งานที่ 2: รายการในเมนูแบบจํากัดเวลา | ใช้menuItemId ของMenuItemOffer เพื่อระบุว่าข้อเสนอลิงก์กับ MenuItem ใด ใช้ Availability เพื่อระบุเวลา availabilityStarts , availabilityEnds และ availabilityDay ของข้อเสนอ |
กรณีการใช้งานที่ 3: รายการในเมนูหลายข้อเสนอ | ใช้พร็อพเพอร์ตี้ menuItemId ของ MenuItemOffer และตั้งค่าพร็อพเพอร์ตี้ availabilityId เพื่อระบุเวลาที่ราคาถูกต้อง |
JSON
เมนูพื้นฐานที่มีส่วน "อาหารตลอดทั้งวัน" "อาหารกลางวัน" และ "เครื่องดื่ม"
เมนูมี 3 ส่วน ส่วน "อาหารกลางวัน (ให้บริการ 11:30 น. - 14:30 น.)" พร้อมให้บริการเฉพาะเวลา 11:30 น. - 14: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
เมนูพื้นฐานที่มีส่วน "อาหารตลอดทั้งวัน" "อาหารกลางวัน" และ "เครื่องดื่ม"
เมนูมี 3 ส่วน ส่วน "อาหารกลางวัน (ให้บริการ 11:30 น. - 14:30 น.)" พร้อมให้บริการเฉพาะเวลา 11:30 น. - 14:30 น. ตามที่อธิบายไว้ในออบเจ็กต์ Availability
รายการในเมนู "Bibimbap" มีเฉพาะตั้งแต่เวลา 12:00 น. - 13:00 น. ตามที่ Availability
อ้างอิงในออบเจ็กต์ 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
รายการเมนูที่มีข้อเสนอซึ่งแตกต่างกันไปตามราคาและเวลา
เมนูมี 2 ส่วน รายการในเมนู "พาสต้า" มีออบเจ็กต์ MenuItemOffer
ที่ตรงกัน 2 รายการ (ราคามื้อกลางวันสำหรับมื้อเย็น 1 รายการ) ราคาอาหารกลางวันสำหรับพาสต้าคือ $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
โดยการอ้างอิงออบเจ็กต์ MenuSection
ด้วย menuAddOnId
ออบเจ็กต์ MenuSection
เหล่านั้นต้องมีรายการเมนูที่ใช้สำหรับส่วนเสริม
คุณระบุออบเจ็กต์ MenuItem
ของส่วนเสริมเริ่มต้นได้โดยใช้พร็อพเพอร์ตี้ defaultOptionId
ของออบเจ็กต์ MenuSection
ของส่วนเสริม
Use Case | แนวทางปฏิบัติแนะนำ |
---|---|
กรณีการใช้งานที่ 1: ส่วนเสริมพื้นฐาน | ใช้พร็อพเพอร์ตี้ eligibleQuantityMin และ eligibleQuantityMax ของออบเจ็กต์ MenuSection ของส่วนเสริมเพื่อระบุจำนวนรายการส่วนเสริมขั้นต่ำและสูงสุดที่เลือกได้ในส่วนส่วนเสริม |
กรณีการใช้งาน 2: ส่วนเสริมเริ่มต้น | ใช้ defaultOptionId ของออบเจ็กต์ MenuSection ของส่วนเสริมเพื่อระบุตัวเลือกส่วนเสริมเริ่มต้น |
กรณีการใช้งานที่ 3: ชุดอาหารแบบรวม/แพ็กเกจ | ใช้ออบเจ็กต์ MenuSection เพื่ออธิบายตัวเลือกที่ผู้ใช้จะทำได้เมื่อเลือกอาหาร/เมนูผสม |
JSON
ในตัวอย่างนี้ รายการในเมนู "คาปูชิโน" ปรับแต่งได้ด้วยตัวเลือกหลอด
มีตัวเลือกเสริม 1 รายการสำหรับ "เบเกิลเมดิเตอร์เรเนียน" ในส่วนเมนู "อาหารทั้งวัน" และตัวเลือกเสริมไข่ 2 รายการ
รายการ "เบเกิลในคลับ" ในส่วนเมนูเดียวกันจะมีส่วนเสริมเสริมแบบเดียวกัน รวมถึงเมนูเสริม "ไข่คน" ด้วย
ในส่วนเครื่องดื่ม จะมี 1 อย่างที่มาพร้อมตัวเลือกเสริม "นม" และตัวเลือกเสริม "Straw 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"], "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
ในตัวอย่างนี้ เมนู "คลับเบเกิล" ถูกเลือกมาล่วงหน้าโดยมีตัวเลือกไส้กรอกโชริโซและไข่คน โชริโซและซอสพริกเป็นส่วนเสริมของ "เอ็กซ์ตรา" และไข่คน ซึ่งเป็นส่วนเสริมของ "ตัวเลือกไข่" ที่เป็นค่าเริ่มต้น
{ "@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 ส่วน ได้แก่ "สูตรอาหาร" (รายการในเมนู 2 รายการ ผู้ใช้ต้องเลือก 0-1 ตัวเลือก) และ "เพิ่มเติม" (รายการในเมนู 3 รายการ ผู้ใช้ต้องเลือก 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
ได้โดยอ้างอิงในพร็อพเพอร์ตี้ menuItemId
ของ MenuItemOption
ตัวอย่างเช่น หากพิซซ่ามีให้บริการหลายขนาด คุณอาจสร้าง MenuItemOption
สำหรับแต่ละขนาดและอ้างอิงรายการเมนูพิซซ่าในพร็อพเพอร์ตี้ menuItemId
สำหรับ MenuItemOption
แต่ละรายการ
Use Case | แนวทางปฏิบัติแนะนำ |
---|---|
กรณีการใช้งานที่ 1: พิซซ่าขนาดต่างๆ | ใช้ MenuItemOption และ MenuItemOffer |
กรณีการใช้งานที่ 2: พิซซ่าแบบปรับแต่งได้พร้อมด้วยท็อปปิ้งและขนาดต่างๆ | ใช้ MenuItemOption และ MenuItemOffer เพื่อเปลี่ยนราคาสูงสุดตามขนาดพิซซ่า |
กรณีการใช้งานที่ 3: พิซซ่าแบบปรับแต่งได้มีความแตกต่างระหว่างด้านซ้ายและด้านขวา | ใช้พร็อพเพอร์ตี้ value ของ MenuItemOption เพื่อระบุด้านข้างของพิซซ่า ใช้พร็อพเพอร์ตี้ price และ priceCurrency ของ MenuItemOffer เพื่อระบุราคาต่อพิซซ่า |
NDJSON
พิซซ่ามี 3 ขนาดและผู้ใช้ต้องเลือก ราคาของแต่ละขนาดจะแตกต่างกันไป
พิซซ่าฮาวายเอียนราคา 100.00 THB สำหรับขนาดเล็ก 15.00 ดอลลาร์สำหรับขนาดกลาง และ 200.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
ราคาของท็อปปิ้งพิซซ่าจะแตกต่างกันไปตามขนาดของพิซซ่า
พิซซ่าเปปเปอโรนีราคา 100.00 THB สำหรับขนาดเล็ก 15.00 ดอลลาร์สำหรับขนาดกลาง และ 200.00 ดอลลาร์สำหรับขนาดใหญ่ ซาลามิเนื้อวัวราดหน้าราคา ฿10.00 ชิ้นเล็ก กลางๆ ราคากลางๆ 60 บาท และโต๊ะเล็กขนาดใหญ่ ราคา 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-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
คุณจะเพิ่มท็อปปิ้งพิซซ่าที่ครึ่งซ้าย ครึ่งขวา หรือทั้งพิซซ่าก็ได้ ราคาแตกต่างกันไปตามขนาดของพิซซ่าและตำแหน่งที่ใช้ใส่ท็อปปิ้ง
พิซซ่าเปปเปอโรนีขนาดเล็กราคา 100.00 THB สำหรับขนาดเล็ก 15.00 ดอลลาร์สำหรับขนาดกลาง และ 200.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
ร้านอาหารแห่งเดียวจะกำหนดออบเจ็กต์บริการได้หลายอย่าง (เช่น หากร้านอาหารรองรับทั้งบริการส่งถึงบ้านและสั่งกลับบ้าน) แต่บริการหนึ่งควรเชื่อมโยงกับร้านอาหาร 1 แห่งอย่างไม่ซ้ำกันภายในพร็อพเพอร์ตี้ serviceType
ของบริการนั้น
Use Case | แนวทางปฏิบัติแนะนำ |
---|---|
กรณีการใช้งานที่ 1: บริการนำส่งพื้นฐาน | ใช้พร็อพเพอร์ตี้ opens และ closes ใน ServiceHours และ OperationHours เพื่อระบุเวลาเริ่มต้นและเวลาสิ้นสุดที่ผู้ใช้สามารถดำเนินการตาม (เสร็จสิ้น) คำสั่งซื้อและสั่งซื้อได้ตามลำดับ หากต้องการระบุเวลาในการส่งมอบสินค้า (เวลาโดยประมาณในการรับสินค้า/การนำส่ง) ให้ใช้พร็อพเพอร์ตี้ leadTimeMin และ leadTimeMax ของ ServiceHours |
JSON
บริการตัวอย่างต่อไปนี้จะรับคำสั่งซื้อทุกวันตั้งแต่เวลา 08:00 น. - 18:00 น. (สามารถสั่งซื้อครั้งล่าสุดได้เวลา 17.59.59 น.) ตั้งแต่วันที่ 1 กุมภาพันธ์ 2016 ถึงวันที่ 1 มีนาคม 2016 โดยมีเวลารออย่างน้อย 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 }
เวลาจัดส่งและรับสินค้า
ตัวอย่างด้านล่างแสดงวิธีกำหนดเวลานำส่งและรับสินค้าของบริการ
Use Case | แนวทางปฏิบัติแนะนำ |
---|---|
กรณีการใช้งาน 1: การกำหนดค่าเวลานำส่ง | ใช้พร็อพเพอร์ตี้ leadTimeMin และ leadTimeMax ของ ServiceHours สำหรับคำสั่งซื้อ ASAP ใช้ OperationHours สำหรับการสั่งล่วงหน้า ใช้พร็อพเพอร์ตี้ isSpecialHour ของ ServiceHours และ OperationHours สำหรับการจัดส่งในวันหยุดพิเศษและเวลาทำการสำหรับกรอบเวลาการสั่งซื้อ |
กรณีการใช้งาน 2: การกำหนดค่าเวลารับสินค้า | ใช้พร็อพเพอร์ตี้ leadTimeMin และ leadTimeMax ของ ServiceHours สำหรับคำสั่งซื้อ ASAP ใช้ OperationHours สำหรับการสั่งล่วงหน้า ใช้พร็อพเพอร์ตี้ isSpecialHour ของ ServiceHours และ OperationHours สำหรับช่วงเวลารับของในวันหยุดและช่วงเวลาสั่งซื้อพิเศษ |
JSON
ร้านรับบริการจัดส่งถึงบ้านโดยเร็วที่สุดและสั่งอาหารล่วงหน้า และยังรองรับเวลานำส่งแบบพิเศษในวันหยุดอีกด้วย
ในตัวอย่างนี้ ผู้ใช้จะสั่งซื้อออนไลน์ได้ทุกเมื่อ เวลานำส่งวันธรรมดาคือตั้งแต่ 9.00 น. ถึง 23.00 น. เวลาจัดส่งช่วงสุดสัปดาห์คือตั้งแต่ 9.00 น. ถึง 21.00 น. วันที่ 24 ธันวาคม 2019 เวลานำส่งโดยเฉพาะคือตั้งแต่ 9.00 น. ถึง 16.00 น. บริการนำส่งโดยต้องรออย่างน้อย 1 ชั่วโมงและต้องรอไม่เกิน 90 นาที
ผู้ใช้สั่งจองล่วงหน้าได้ตั้งแต่ 6 วัน (8640 นาที) ถึง 1 ชั่วโมงล่วงหน้าในทุกวัน รวมถึงวันที่ 24 ธันวาคม 2019 ผู้ใช้อาจสั่งซื้อบริการจัดส่งล่วงหน้าได้ทีละ 15 นาทีเท่านั้น (เช่น 20:00 น., 20:15 น., 20: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:00 น. ถึง 23:00 น. เวลารับสินค้าในวันสุดสัปดาห์คือตั้งแต่ 9:00 น. ถึง 21:00 น. วันที่ 24 ธันวาคม 2019 เวลารับสินค้าคือเวลา 09:00 น. ถึง 16:00 น. เวลาในการรอรับอย่างน้อย 30 นาทีและรอนานสูงสุด 1 ชั่วโมง
ผู้ใช้สั่งจองล่วงหน้าได้ 2 วัน (2880 นาที) ถึง 30 นาทีในทุกวัน รวมถึงวันที่ 24 ธันวาคม 2019 ผู้ใช้จะ สั่งซื้อแบบไปรับเองล่วงหน้าได้ทีละ 15 นาทีเท่านั้น (เช่น 20:00 น., 20:15 น., 20: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 }
วันหยุดและเวลาทำการพิเศษ
คุณใช้พร็อพเพอร์ตี้ isSpecialHour
ของ ServiceHours
และ OperationHours
เพื่อลบล้างเวลาทำการและ/หรือเวลาทำการที่มีอยู่ได้ วิธีนี้ช่วยให้คุณกำหนดเวลาทำการปกติเพียงครั้งเดียวและเลือกลบล้างเวลาทำการสำหรับวันหยุดและกิจกรรมพิเศษได้
คุณต้องระบุกรอบเวลาสำหรับการดำเนินการตามบริการ 2 ช่วงแยกกัน ได้แก่ กรอบเวลาการสั่งซื้อ (OperationHours
ระบุเวลาที่ผู้ใช้สั่งซื้อได้) และกรอบเวลาการดำเนินการตามคำสั่งซื้อ (ServiceHours
ระบุช่วงเวลาที่ดำเนินการตามคำสั่งซื้อได้)
Use Case | แนวทางปฏิบัติแนะนำ |
---|---|
กรณีการใช้งานที่ 1: เปิดรับคำสั่งซื้อในวันเดียวกัน แต่ปิดคำสั่งซื้อขั้นสูง | หากต้องการระบุวันที่ที่เวลาทำการพิเศษจะใช้ได้ ให้ใช้พร็อพเพอร์ตี้ validFrom และ validThrough ของเอนทิตี ServiceHours และ OperationHours (โดยตั้งค่าพร็อพเพอร์ตี้ isSpecialHour เป็น "จริง") |
JSON
ตัวอย่างนี้ระบุว่าบริการเปิดทําการสําหรับวันเดียวกันในวันคริสต์มาส แต่ปิดคําสั่งซื้อล่วงหน้าในวันดังกล่าว ร้านอาหารจะรับบริการโดยเร็วที่สุดและสั่งอาหารล่วงหน้าสำหรับบริการแบบไปรับที่ร้าน
เวลารับสินค้าแบบปกติ (รวมเวลาสั่งอาหารและเวลารับบริการ) คือตั้งแต่ 9:00 น. ถึง 21:00 น. และวันคริสต์มาสอีฟปี 2017 จะให้บริการตั้งแต่ 9.00 น. ถึง 16.00 น. เวลารอขั้นต่ำสำหรับการรับสินค้าคือ 1 ชั่วโมงและต้องรอไม่เกิน 90 นาที ผู้ใช้สั่งจองล่วงหน้าได้ตั้งแต่ 2 วัน (2880 นาที) ถึง 30 นาทีล่วงหน้าในวันใดวันหนึ่ง แต่จะสั่งซื้อไม่ได้ในช่วงเวลาปิดทำการ (เช่น วันคริสต์มาส วันที่ 4 กรกฎาคม และหลัง 16:00 น. ในวันคริสต์มาสอีฟ) ผู้ใช้จะสั่งซื้อแบบไปรับเองล่วงหน้าได้ทีละ 15 นาทีเท่านั้น (เช่น 14:00 น., 14:15 น., 14:30 น.)
ทั้งนี้ จะไม่มีการเรียกเก็บเงินผู้ใช้ ตัวอย่างนี้รองรับสถานการณ์ต่อไปนี้
- ผู้ใช้จะสั่งซื้อได้ในวันที่ 25 ธันวาคมสำหรับการนำส่งวันเดียวกัน
- ผู้ใช้สั่งจองล่วงหน้าได้ในวันที่ 25 ธันวาคมสำหรับการนำส่งตามกำหนดการในวันที่ 27 ธันวาคม
- ผู้ใช้ไม่สามารถสั่งซื้อล่วงหน้าในวันที่ 22 ธันวาคมสำหรับการนำส่งตามกำหนดการในวันที่ 25 ธันวาคม
- ผู้ใช้ไม่สามารถสั่งล่วงหน้าหรือสั่งซื้อโดยเร็วที่สุดในวันที่ 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" }
ค่าธรรมเนียมการจัดส่งและการรับสินค้า
ตัวอย่างด้านล่างแสดงวิธีกำหนดค่าธรรมเนียมในการจัดส่งและการรับสินค้าสำหรับบริการ
Use Case | แนวทางปฏิบัติแนะนำ |
---|---|
กรณีการใช้งานที่ 1: การกำหนดค่าค่าธรรมเนียมการนำส่ง | ใช้เอนทิตี Fee เพื่อกำหนดประเภทของค่าบริการนำส่ง |
กรณีการใช้งานที่ 2: การกำหนดค่าค่าบริการสำหรับบริการรับสินค้า | ใช้เอนทิตี Fee เพื่อกำหนดประเภทของค่าบริการแบบมารับที่ร้าน |
JSON
ร้านอาหารมีค่าธรรมเนียมการจัดส่งประเภทต่างๆ
ในตัวอย่างนี้ จัดส่งฟรีเมื่อสั่งซื้อขั้นต่ำ $30.00 และมีค่าธรรมเนียมการนำส่งแบบคงที่ $5.00 แบบไม่มีจำนวนคำสั่งซื้อขั้นต่ำ และค่าธรรมเนียมร้อยละ 3% จากจำนวนเงินในรถเข็นทั้งหมด เวลานำส่ง (รวมเวลาสั่งอาหารและให้บริการ) เริ่มตั้งแต่ 9:00 น. ถึง 23:00 น. เวลาในการรอขั้นต่ำคือ 1 ชั่วโมงและรอได้สูงสุด 90 นาที
ผู้ใช้สั่งจองล่วงหน้าได้ตั้งแต่ 6 วัน (8,640 นาที) ถึง 30 นาทีในทุกวัน ผู้ใช้จะสั่งซื้อการจัดส่งล่วงหน้าได้ทีละ 15 นาทีเท่านั้น (เช่น 14:00 น., 14:15 น., 14: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:00 น. ถึง 23:00 น. เวลารอขั้นต่ำสำหรับการรับสินค้า 1 ชั่วโมงและจะต้องรอสูงสุด 90 นาที
ผู้ใช้จะสั่งซื้อการนำส่งล่วงหน้าได้ทีละ 15 นาทีเท่านั้น (เช่น 14:00 น., 14:15 น., 14: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 }
ค่าธรรมเนียมการนำส่งแบบไดนามิก
ตัวอย่างด้านล่างแสดงวิธีกำหนดค่าธรรมเนียมสำหรับบริการนำส่งที่ขึ้นอยู่กับปัจจัยต่างๆ เช่น ภูมิภาค ช่วงเวลาของวัน และจำนวนสินค้า
Use Case | แนวทางปฏิบัติแนะนำ |
---|---|
กรณีการใช้งานที่ 1: ค่าจัดส่งตามภูมิภาคและระยะทาง | ใช้พร็อพเพอร์ตี้ eligibleRegion ของ Fee เพื่อระบุภูมิภาค รวมถึงพร็อพเพอร์ตี้ price และ priceCurrency เพื่อระบุราคา |
กรณีการใช้งาน 2: ค่าธรรมเนียมการนำส่งตามเวลา | ใช้พร็อพเพอร์ตี้ validFrom และ validThrough ของ Fee เพื่อระบุเวลาที่ค่าธรรมเนียมการนำส่งมีผล |
กรณีการใช้งานที่ 3: บริการจัดส่งฟรีด้านบนและมูลค่าการสั่งซื้อ | ใช้พร็อพเพอร์ตี้ eligibleTransactionVolumeMin และ
eligibleTransactionVolumeMax ของ
Fee
เพื่อระบุค่ารถเข็นขั้นต่ำและสูงสุดที่เชื่อมโยงกับราคานำส่ง |
JSON
บริการตัวอย่างต่อไปนี้เรียกเก็บค่าธรรมเนียมการนำส่ง $5.00 ในรหัสไปรษณีย์ 94087 และค่าธรรมเนียม $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
บริการตัวอย่างต่อไปนี้เรียกเก็บค่าธรรมเนียมการนำส่ง $20 ตั้งแต่วันที่ 1 มกราคม 2017 ถึง 1 กุมภาพันธ์ 2017 และเรียกเก็บ $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 }
พื้นที่ให้บริการจัดส่ง
ตัวอย่างด้านล่างแสดงวิธีกำหนดพื้นที่ให้บริการที่ใช้ได้สำหรับบริการนำส่ง
Use Case | แนวทางปฏิบัติแนะนำ |
---|---|
กรณีการใช้งาน 1: คำจำกัดความของพื้นที่ให้บริการ |
ใช้ |
กรณีการใช้งานที่ 2: คุณมีพื้นที่ให้บริการรูปหลายเหลี่ยม | |
กรณีการใช้งานที่ 3: คุณมีพื้นที่ให้บริการ 1 แห่ง แต่ไม่ได้ให้บริการในพื้นที่ขนาดเล็ก | |
กรณีการใช้งานที่ 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
ส่งรายการที่มีสตริงซึ่งแสดงถึงลูปรูปหลายเหลี่ยม รวมพื้นที่ที่ยกเว้นในพร็อพเพอร์ตี้ polygon
ของ ServiceArea
การสั่งอาหารถือว่าพื้นที่ที่ทับซ้อนกันเป็นพื้นที่ที่ยกเว้น
{ "@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 ทราบว่าร้านอาหารหรือบริการปิดชั่วคราวหรือถาวร
นำเอนทิตีออก
หากต้องการนำเอนทิตีออก ให้ลบเอนทิตีออกจากฟีด ซึ่งมี SLA ที่ 2 ชั่วโมง หากต้องการแนะนำเอนทิตีอีกครั้ง ให้เพิ่มเอนทิตีกลับเข้าไปในฟีด
นำเอนทิตีบริการออกชั่วคราว
คุณยังปิดใช้เอนทิตี Service
ชั่วคราวในระยะเวลาที่กำหนดหรือที่ไม่ได้กำหนดได้ด้วย
การปิดใช้คำสั่งซื้อในช่วงเวลาที่เจาะจงจะมีประโยชน์หากต้องการให้ผู้ใช้สั่งซื้อล่วงหน้าได้ แต่ปิดใช้คำสั่งซื้อทันทีภายในระยะเวลาที่กำหนด (เช่น ในช่วงวันหยุด)
การปิดใช้เอนทิตี Service
ในช่วงเวลาที่ไม่ได้ระบุมีประโยชน์ในกรณีที่ต้องการปิดใช้ไม่ให้ผู้ใช้สั่งซื้อทั้ง 2 รายการล่วงหน้าและสั่งซื้อทันทีจนกว่าจะถึงวันที่ในอนาคตที่ไม่ได้ระบุไว้
การปิดใช้บริการชั่วคราวเกี่ยวข้องกับการอัปเดตไฟล์ฟีดโดยตรงเนื่องจากคุณจะนำออกโดยถาวร
ใช้เทคนิคด้านล่างเพื่อปิดใช้หรือลบล้างเวลาทำการของ Service
ในระยะเวลาที่กำหนดไว้ล่วงหน้า
หากต้องการระงับเอนทิตี
Service
ชั่วคราวในระยะเวลาที่ทราบล่วงหน้า (เช่น เวลาทำการในวันหยุด) ให้ใช้เอนทิตีOperationHours
และServiceHours
สร้างเอนทิตี ServiceHours ใหม่ด้วยแอตทริบิวต์
isSpecialHour
เป็น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" หากต้องการเปิดใช้อีกครั้ง ให้นำพร็อพเพอร์ตี้ออกจากเอนทิตีหรือตั้งค่าเป็น "เท็จ"โปรดทราบว่าคุณควรใช้พร็อพเพอร์ตี้
isDisabled
เฉพาะในกรณีที่ไม่ทราบว่าระบบจะคืนสถานะบริการอีกครั้งเมื่อใด เช่น ใช้สำหรับเหตุการณ์ที่ไม่คาดคิด และอย่าใช้สำหรับวันหยุด)