ใช้พื้นที่โฆษณาเชิงสัมพันธ์ขั้นสูง

เอนทิตีเมนูอธิบายถึงเมนูที่ร้านอาหารนำเสนอต่อลูกค้า ต้องกำหนดเอนทิตีเมนูภายในเอนทิตีร้านอาหารผ่านพร็อพเพอร์ตี้ menuId ของร้านอาหาร

ออบเจ็กต์อื่นๆ ที่กําหนดเมนู (เช่น คําอธิบาย รูปภาพ ส่วนเสริม และข้อมูลโภชนาการ) ได้แก่ MenuItem และ MenuItemOffer รวมถึงออบเจ็กต์ที่ไม่บังคับ MenuSection, Availability และ MenuItemOption

คุณสามารถใช้ออบเจ็กต์ MenuSection เพื่อจัดระเบียบออบเจ็กต์ MenuItem หลายรายการเป็นหมวดหมู่ตามตรรกะ แนวทางนี้มีประโยชน์สําหรับร้านอาหารที่มีเมนูหลายรายการ (เช่น อาหารเช้า กลางวัน และเย็น) เพิ่มเมนูแต่ละรายการเป็น MenuSection แยกต่างหาก

กรณีการใช้งาน แนวทางปฏิบัติแนะนำ
Use Case 1: เมนูพื้นฐาน ใช้ MenuItem, MenuItemOffer และ MenuSection (ไม่บังคับ)

ตัวอย่างต่อไปนี้จับคู่ Use Case "เมนูพื้นฐาน" กับส่วนเมนู 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 เพื่อสร้างส่วนเมนูแบบจำกัดเวลาแทน

กรณีการใช้งาน แนวทางปฏิบัติแนะนำ
กรณีการใช้งานที่ 1: ส่วนเมนูแบบจำกัดเวลา ใช้ Availability เพื่อระบุเวลา availabilityStarts และ availabilityEnds ของส่วน
Use case 2: รายการเมนูแบบจำกัดเวลา ใช้ menuItemId ของ MenuItemOffer เพื่อระบุ MenuItem ที่ข้อเสนอลิงก์อยู่ ใช้ Availability เพื่อระบุเวลาของ availabilityStarts, availabilityEnds และ availabilityDaycode> ของข้อเสนอ
Use Case 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 รายการในเมนู "บิบิมบับ" พร้อมให้บริการตั้งแต่เวลา 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 รายการ (รายการหนึ่งสำหรับราคาอาหารกลางวัน อีกรายการสำหรับราคาอาหารเย็น) ราคาพาสต้าสำหรับมื้อกลางวันคือ 220 บาท และราคาสำหรับมื้อค่ำคือ 310 บาท

{
  "@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 ของส่วนเสริม

กรณีการใช้งาน แนวทางปฏิบัติแนะนำ
กรณีการใช้งานที่ 1: ส่วนเสริมพื้นฐาน ใช้พร็อพเพอร์ตี้ eligibleQuantityMin และ eligibleQuantityMax ของออบเจ็กต์MenuSectionส่วนเสริมเพื่อระบุจำนวนรายการส่วนเสริมขั้นต่ำและสูงสุดที่เลือกได้ในส่วนส่วนเสริม
Use Case 2: ส่วนเสริมเริ่มต้น ใช้MenuSectionออบเจ็กต์ของส่วนเสริม defaultOptionId เพื่อระบุตัวเลือกส่วนเสริมเริ่มต้น
Use Case 3: ชุดอาหาร/แพ็กเกจอาหาร ใช้ออบเจ็กต์ MenuSection เพื่ออธิบายตัวเลือกที่ผู้ใช้เลือกได้เมื่อเลือกอาหาร/คอมโบ

JSON

ในตัวอย่างนี้ รายการเมนู "คาปูชิโน" ปรับแต่งได้ด้วยตัวเลือกหลอดดูด

รายการ "เบเกิลเมดิเตอร์เรเนียน" ในส่วนเมนู "อาหารตลอดทั้งวัน" มีตัวเลือกส่วนเสริมเพิ่มเติม 1 รายการ รวมถึงตัวเลือกส่วนเสริมไข่ 2 รายการ

รายการ "Club Bagel" ในส่วนเมนูเดียวกันมีอาหารเสริมเพิ่มเติมเดียวกัน พร้อมตัวเลือก "ตัวเลือกไข่" สำหรับไข่คน

ในส่วนเครื่องดื่ม มีสินค้า 1 รายการที่มีตัวเลือกส่วนเสริม "นม" และตัวเลือกส่วนเสริม "หลอดดูด"

{
  "@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 เป็นส่วนเสริม "พิเศษ" เริ่มต้น ส่วนไข่คนเป็นส่วนเสริม "ตัวเลือกไข่" เริ่มต้น

{
  "@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 แต่ละรายการ

กรณีการใช้งาน แนวทางปฏิบัติแนะนำ
กรณีการใช้งานที่ 1: พิซซ่าขนาดต่างๆ ใช้ MenuItemOption และ MenuItemOffer
Use Case 2: พิซซ่าที่ปรับแต่งได้พร้อมท็อปปิ้งและขนาดต่างๆ ใช้ MenuItemOption และ MenuItemOffer เพื่อเปลี่ยนราคาของส่วนเพิ่มตามขนาดของพิซซ่า
Use Case 3: พิซซ่าที่ปรับแต่งได้โดยมีความแตกต่างระหว่างด้านซ้ายและด้านขวา ใช้พร็อพเพอร์ตี้ value ของ MenuItemOption เพื่อระบุด้านของพิซซ่า ใช้พร็อพเพอร์ตี้ price และ priceCurrency ของ MenuItemOffer เพื่อระบุราคาต่อข้างของพิซซ่า

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

คุณสามารถเพิ่มเครื่องเคียงของพิซซ่าลงครึ่งซ้าย ครึ่งขวา หรือทั้งพิซซ่า ราคาจะแตกต่างกันไปตามขนาดของพิซซ่า รวมถึงตำแหน่งที่จะใส่ท็อปปิ้ง

พิซซ่าเปปเปอโรนีขนาดเล็กราคา 300 บาท พิซซ่าขนาดกลางราคา 450 บาท และพิซซ่าขนาดใหญ่ราคา 600 บาท พิซซ่ามี 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 แห่งสามารถกำหนดออบเจ็กต์บริการได้หลายรายการ (เช่น หากร้านอาหารรองรับทั้งบริการจัดส่งและบริการซื้อกลับบ้าน) แต่บริการ 1 รายการควรเชื่อมต่อกับร้านอาหารเพียงแห่งเดียวโดยใช้พร็อพเพอร์ตี้ serviceType ของบริการ

กรณีการใช้งาน แนวทางปฏิบัติแนะนำ
กรณีการใช้งาน 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
}

เวลานำส่งและรับสินค้า

ตัวอย่างด้านล่างแสดงวิธีกำหนดเวลานำส่งและรับสินค้าของบริการ

กรณีการใช้งาน แนวทางปฏิบัติแนะนำ
กรณีการใช้งานที่ 1: การกําหนดค่าเวลานำส่ง ใช้พร็อพเพอร์ตี้ leadTimeMin และ leadTimeMax ของ ServiceHours สำหรับคำสั่งซื้อ ASAP ใช้ OperationHours สำหรับคำสั่งซื้อล่วงหน้า ใช้พร็อพเพอร์ตี้ isSpecialHour ของ ServiceHours และ OperationHours สำหรับเวลาทำการพิเศษและเวลารับคำสั่งซื้อในช่วงวันหยุด
กรณีการใช้งาน 2: การกําหนดค่าเวลารับสินค้า ใช้พร็อพเพอร์ตี้ leadTimeMin และ leadTimeMax ของ ServiceHours สำหรับคำสั่งซื้อ ASAP ใช้ OperationHours สำหรับคำสั่งซื้อล่วงหน้า ใช้พร็อพเพอร์ตี้ isSpecialHour ของ ServiceHours และ OperationHours สำหรับเวลาทำการพิเศษในช่วงวันหยุดและช่วงเวลาที่รับคำสั่งซื้อ

JSON

ร้านอาหารรับคำสั่งซื้อแบบด่วนและสั่งล่วงหน้าสำหรับบริการจัดส่ง รวมถึงรองรับเวลานำส่งพิเศษในช่วงวันหยุดด้วย

ในตัวอย่างนี้ ผู้ใช้สามารถสั่งซื้อออนไลน์ได้ทุกเมื่อ เวลานำส่งวันธรรมดาคือ 09:00-23:00 น. เวลานำส่งในช่วงสุดสัปดาห์คือ 09:00-21:00 น. ในวันที่ 24 ธันวาคม 2019 เวลานำส่งจะอยู่ที่ 09: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 ชั่วโมงก่อนที่เวลาทำการจะเริ่มต้น เวลารับพัสดุวันธรรมดาคือ 09:00-23:00 น. เวลารับพัสดุในช่วงสุดสัปดาห์คือ 09: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 เป็น "true")

JSON

ตัวอย่างนี้ระบุว่าบริการจะเปิดรับคำสั่งซื้อวันเดียวกันในวันคริสต์มาส แต่ปิดรับคำสั่งซื้อล่วงหน้าที่กำหนดเวลาไว้สำหรับวันนั้น ร้านอาหารรับบริการรับสินค้าทันทีและสั่งล่วงหน้า

เวลารับพัสดุตามปกติ (ทั้งเวลาทำการและเวลารับพัสดุ) คือตั้งแต่ 09:00 น. ถึง 21:00 น. และเวลารับพัสดุในวันก่อนวันคริสต์มาสปี 2017 คือตั้งแต่ 09: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"
}

ค่าจัดส่งและค่าบริการรับสินค้า

ตัวอย่างด้านล่างแสดงวิธีกำหนดค่าบริการนำส่งและค่าบริการรับสินค้า

กรณีการใช้งาน แนวทางปฏิบัติแนะนำ
กรณีการใช้งานที่ 1: การกําหนดค่าค่าจัดส่ง ใช้เอนทิตี Fee เพื่อกำหนดประเภทค่าธรรมเนียมการนำส่ง
Use Case 2: การกําหนดค่าค่าบริการสําหรับบริการรับสินค้า ใช้เอนทิตี Fee เพื่อกำหนดประเภทค่าบริการรับสินค้า

JSON

ร้านอาหารรองรับค่าธรรมเนียมการนำส่งประเภทต่างๆ

ในตัวอย่างนี้ จะมีการนําส่งฟรีเมื่อสั่งซื้อขั้นต่ำ $30.00 ค่าธรรมเนียมการนำส่งคงที่ $5.00 โดยไม่ต้องมียอดสั่งซื้อขั้นต่ำ และค่าธรรมเนียม 3% จากยอดรวมในรถเข็น เวลานำส่ง (ทั้งเวลาทำการของคำสั่งซื้อและบริการ) คือ 09:00 น. ถึง 23:00 น. การนำส่งมีเวลารอขั้นต่ำ 1 ชั่วโมงและเวลารอสูงสุด 90 นาที

ผู้ใช้สามารถสั่งซื้อล่วงหน้าได้ตั้งแต่ 6 วัน (8640 นาที) ไปจนถึง 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% จากยอดรวมในรถเข็น เวลารับสินค้า (ทั้งเวลาสำหรับคำสั่งซื้อและบริการ) คือ 09: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
}

ค่าจัดส่งแบบไดนามิก

ตัวอย่างด้านล่างแสดงวิธีกำหนดค่าธรรมเนียมสำหรับบริการนำส่งที่ขึ้นอยู่กับปัจจัยต่างๆ เช่น ภูมิภาค เวลาของวัน และจำนวนสินค้า

กรณีการใช้งาน แนวทางปฏิบัติแนะนำ
กรณีการใช้งานที่ 1: ค่าธรรมเนียมการนำส่งตามภูมิภาคและระยะทาง ใช้พร็อพเพอร์ตี้ eligibleRegion ของ Fee เพื่อระบุภูมิภาค และพร็อพเพอร์ตี้ price และ priceCurrency เพื่อระบุราคา
Use Case 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
}

พื้นที่ให้บริการจัดส่ง

ตัวอย่างด้านล่างแสดงวิธีกำหนดพื้นที่ให้บริการของบริการจัดส่ง

กรณีการใช้งาน แนวทางปฏิบัติแนะนำ
กรณีการใช้งาน 1: คําจํากัดความของพื้นที่ให้บริการ

ใช้ ServiceArea เพื่อกำหนดภูมิภาคทางภูมิศาสตร์ที่สามารถนำส่งอาหารได้

กรณีการใช้งาน 2: คุณมีพื้นที่ให้บริการแบบรูปหลายเหลี่ยม
Use Case 3: คุณมีพื้นที่ให้บริการ 1 แห่ง แต่ไม่ได้ให้บริการในพื้นที่ที่เล็กกว่าภายในพื้นที่ให้บริการนั้น
Use Case 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 เป็นระยะเวลาที่ไม่ระบุจะมีประโยชน์ในกรณีที่คุณต้องการปิดใช้ไม่ให้ผู้ใช้ทำการสั่งซื้อทั้งล่วงหน้าและสั่งซื้อทันทีจนกว่าจะถึงวันที่ในอนาคตที่ระบุไว้

การปิดใช้บริการชั่วคราวเกี่ยวข้องกับการอัปเดตไฟล์ฟีดโดยตรงเช่นเดียวกับการนำออกอย่างถาวร

ใช้เทคนิคด้านล่างเพื่อปิดใช้หรือลบล้างเวลาทําการของ 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 เฉพาะในกรณีที่ไม่ทราบว่าบริการจะกลับมาใช้งานได้เมื่อใด เช่น ใช้สำหรับเหตุการณ์ที่ไม่คาดคิดและอย่าใช้สำหรับวันหยุด)