Menerapkan inventaris relasional lanjutan

Entitas Menu menjelaskan menu yang ditawarkan sebuah restoran kepada pelanggannya. Entity Menu harus ditentukan dalam entitas Restoran melalui properti menuId Restoran.

Objek lain yang menentukan menu (seperti deskripsi, gambar, add-on, dan informasi nutrisi) mencakup MenuItem dan MenuItemOffer, serta objek opsional MenuSection, Availability, dan MenuItemOption.

Anda dapat menggunakan objek MenuSection untuk mengatur beberapa objek MenuItem ke dalam kategori logis. Pendekatan ini berguna untuk restoran yang memiliki beberapa menu (seperti sarapan, makan siang, dan makan malam). Tambahkan setiap menu sebagai MenuSection terpisah.

Kasus penggunaan Praktik terbaik
Kasus penggunaan 1: Menu dasar Gunakan MenuItem, MenuItemOffer, dan MenuSection (opsional)

Contoh berikut cocok dengan kasus penggunaan "Menu dasar" dengan dua bagian menu ("Makanan sehari-hari" dan "Minuman"), yang masing-masing berisi dua item menu:

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"
}

Menu dengan waktu terbatas

Objek MenuItemOffer yang dikombinasikan dengan Availability dapat digunakan untuk membuat item menu berbatas waktu dan opsi item menu. Gunakan objek Availability untuk membuat bagian menu berbatas waktu.

Kasus penggunaan Praktik terbaik
Kasus penggunaan 1: Bagian menu berbatas waktu Gunakan Availability untuk menentukan waktu availabilityStarts dan availabilityEnds bagian.
Kasus penggunaan 2: Item menu berbatas waktu Gunakan menuItemId dari MenuItemOffer untuk menentukan MenuItem yang ditautkan dengan penawaran. Gunakan Availability untuk menentukan waktu availabilityStarts, availabilityEnds, dan availabilityDaykode> penawaran.
Kasus penggunaan 3: Item menu multi-penawaran Gunakan properti menuItemId dari MenuItemOffer dan tetapkan properti availabilityId untuk menentukan waktu berlakunya harga tersebut.

JSON

Menu dasar dengan bagian "Makanan sepanjang hari", "Makan siang", dan "Minuman".

Menu ini memiliki tiga bagian. Bagian "Makan Siang (Tersedia pukul 11.30 - 14.30)" hanya tersedia mulai pukul 11.30-14.30, seperti yang dijelaskan dalam objek 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

Menu dasar dengan bagian "Makanan sepanjang hari", "Makan siang", dan "Minuman".

Menu ini memiliki tiga bagian. Bagian "Makan Siang (Tersedia pukul 11.30 - 14.30)" hanya tersedia mulai pukul 11.30-14.30, seperti yang dijelaskan dalam objek Availability. Item menu "Bibimbap" hanya tersedia dari pukul 12.00-13.00, seperti yang dijelaskan oleh Availability yang direferensikan dalam objek MenuItemOffer yang sesuai.

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

Encoder dengan penawaran yang bervariasi menurut harga dan waktu.

Menu ini memiliki dua bagian. Item menu "Pasta" memiliki dua objek MenuItemOffer yang sesuai (satu untuk harga makan siang, satu untuk harga makan malam). Harga makan siang untuk pasta adalah $7,49, dan harga makan malamnya adalah $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

Penyesuaian menggunakan add-on

Item menu dapat memiliki opsi add-on tambahan. Tentukan add-on untuk MenuItem dengan mereferensikan objek MenuSection dengan menuAddOnId. Objek MenuSection tersebut harus berisi item menu yang digunakan untuk add-on Anda.

Anda dapat menyediakan objek MenuItem add-on default menggunakan properti defaultOptionId objek MenuSection add-on.

Kasus penggunaan Praktik terbaik
Kasus penggunaan 1: Add-on dasar Gunakan properti eligibleQuantityMin dan eligibleQuantityMax dari objek MenuSection add-on untuk menentukan jumlah minimum dan maksimum item add-on yang dapat dipilih di bagian add-on.
Kasus penggunaan 2: Add-on default Gunakan defaultOptionId objek MenuSection add-on untuk menyediakan opsi add-on default.
Kasus penggunaan 3: Makanan kombinasi/paket Gunakan objek MenuSection untuk menjelaskan pilihan yang dapat dibuat pengguna saat memilih hidangan/kombo.

JSON

Dalam contoh ini, item menu "Cappuccino" dapat disesuaikan dengan opsi sedotan.

Terdapat satu opsi add-on tambahan yang tersedia untuk item " Bagel Mediterania" di bagian menu "Makanan sepanjang hari" serta dua opsi add-on telur.

Item "Club Bagel" di bagian menu yang sama memiliki add-on tambahan yang sama, ditambah opsi add-on "Telur" untuk telur dadar.

Di bagian minuman, ada satu item yang tersedia dengan opsi add-on "Susu" dan opsi add-on "Opsi Sedotan".

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

Dalam contoh ini, item menu "Club Bagel" dipilih sebelumnya dengan chorizo dan opsi telur acak. Chorizo dan Chili Sauce adalah add-on "Ekstra" default dan telur orak adalah add-on "Opsi Telur" defaultnya.

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

Contoh ini berisi kombinasi makanan yang terdiri dari burger, kentang goreng, dan minuman. Setiap item makanan dapat disesuaikan dengan topping dan add-on yang berbeda.

Item makanan kombinasi memiliki 1 burger, 1 kentang goreng, dan 1 minuman sebagai persyaratan untuk dipilih pengguna. Ada 2 opsi burger dan masing-masing memiliki 2 bagian add-on: "Resep" (dua item menu, pengguna harus memilih 0-1 opsi) dan "Tambahan" (tiga item menu, pengguna harus memilih 0-3 opsi).

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

Penyesuaian menggunakan opsi item menu

Anda dapat memberikan berbagai opsi untuk MenuItem dengan mereferensikannya di properti menuItemId pada MenuItemOption.

Misalnya, jika pizza tersedia dalam berbagai ukuran, Anda dapat membuat MenuItemOption untuk setiap ukuran dan mereferensikan item menu pizza di properti menuItemId untuk setiap MenuItemOption.

Kasus penggunaan Praktik terbaik
Kasus penggunaan 1: Pizza dengan ukuran berbeda Gunakan MenuItemOption dan MenuItemOffer
Kasus penggunaan 2: Pizza yang dapat disesuaikan dengan berbagai topping dan ukuran Gunakan MenuItemOption dan MenuItemOffer untuk mengubah harga topping berdasarkan ukuran pizza.
Kasus penggunaan 3: Pizza yang dapat disesuaikan dengan perbedaan antara sisi kiri dan kanan Gunakan properti value dari MenuItemOption untuk menentukan sisi pizza. Gunakan properti price dan priceCurrency dari MenuItemOffer untuk menentukan harga per sisi pizza.

NDJSON

Piza ini memiliki 3 ukuran berbeda dan memerlukan pilihan pengguna. Harga setiap ukuran berbeda.

Hawaiian Pizza dikenai biaya $10,00 untuk pizza kecil, $15,00 untuk medium, dan $20,00 untuk pizza besar.

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

Harga topping pizza bervariasi menurut ukuran pizza.

Piza Pepperoni berharga $10,00 untuk yang kecil, $15,00 untuk yang sedang, dan $20,00 untuk yang besar. Topping Beef Salami adalah $1,00 untuk topping kecil, $1,50 untuk medium, dan $2,00 untuk porsi kecil.

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

Topping pizza dapat ditambahkan ke setengah sisi kiri, separuh kanan, atau seluruh pizza. Harga bervariasi berdasarkan ukuran pizza, serta tempat topping berlaku.

Piza Pepperoni kecil adalah $10,00 untuk yang kecil, $15,00 untuk yang sedang, dan $20,00 untuk yang besar. Pizzanya memiliki 2 topping (Beef Salami dan Mozzarella), dan setiap topping untuk sisi kiri dan kanan pizza kecil berharga $1,00 per sisi, tetapi $0,50 untuk seluruh pizza kecil. Topping berharga $1,50 per sisi untuk sisi kiri dan kanan pizza sedang, tetapi $1,00 untuk seluruh pizza sedang. Topping berharga $2,00 per sisi untuk sisi kiri dan kanan pizza besar, tetapi $1,50 untuk seluruh pizza besar .

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

Layanan

Entitas Service menentukan pengiriman Tindakan pemesanan makanan dari restoran, seperti jenis layanan. Jam layanan, area yang ditayangkan, dan biaya dijelaskan dalam entitas ServiceArea, ServiceHours, OperationHours, dan Fee.

Satu Restoran dapat menentukan beberapa objek Layanan (misalnya, jika restoran mendukung layanan pesan-antar dan bawa pulang), tetapi satu Layanan harus terhubung secara unik ke satu Restoran berdasarkan properti serviceType Layanan.

Kasus penggunaan Praktik terbaik
Kasus penggunaan 1: Layanan pengiriman dasar Gunakan properti opens dan closes di ServiceHours dan OperationHours untuk menentukan waktu mulai dan berakhir di mana pengguna dapat memenuhi (menyelesaikan) pesanan dan memesan. Untuk menentukan lama pengerjaan pengiriman (perkiraan waktu pengambilan/pengantaran), gunakan properti leadTimeMin dan leadTimeMax dari ServiceHours.

JSON

Contoh layanan berikut menerima pesanan setiap hari dari pukul 08.00-18.00 (pesanan terbaru dapat dilakukan pada pukul 17.59.59) dari 1 Februari 2016 hingga 1 Maret 2016, dan dikirim dengan waktu tunggu minimum 1 jam dan waktu tunggu maksimum selama 90 menit. Layanan pengiriman disediakan dalam kode pos 94041 di AS. Ada biaya pengiriman sebesar $5 untuk pengguna.

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

Jam pengiriman dan pengambilan

Contoh di bawah menjelaskan cara menentukan waktu pengiriman dan pengambilan layanan.

Kasus penggunaan Praktik terbaik
Kasus penggunaan 1: Konfigurasi jam pengiriman Gunakan properti leadTimeMin dan leadTimeMax dari ServiceHours untuk pesanan SEGERA. Gunakan OperationHours untuk pesanan di muka. Gunakan properti isSpecialHour dari ServiceHours dan OperationHours untuk pengiriman khusus musim liburan dan pemesanan jam buka
Kasus penggunaan 2: Konfigurasi jam pengambilan Gunakan properti leadTimeMin dan leadTimeMax dari ServiceHours untuk pesanan SEGERA. Gunakan OperationHours untuk pesanan di muka. Gunakan properti isSpecialHour dari ServiceHours dan OperationHours untuk khusus jam buka di hari libur dan pemesanan.

JSON

Restoran menerima pesanan dan pesanan di awal untuk layanan pengiriman. Fitur ini juga mendukung jam pengiriman khusus di hari libur.

Dalam contoh ini, pengguna dapat melakukan pemesanan online kapan saja. Jam pengiriman pada hari kerja adalah dari pukul 09.00-23.00. Jam pengiriman akhir pekan mulai pukul 09.00 hingga 21.00. Khusus pada 24 Desember 2019, jam pengiriman adalah dari pukul 09.00 hingga 16.00. Layanan ini menyediakan waktu tunggu minimum 1 jam dan waktu tunggu maksimum 90 menit.

Pengguna dapat memesan mulai dari 6 hari sebelumnya (8.640 menit) hingga 1 jam di awal untuk hari apa pun, termasuk 24 Desember 2019. Pengguna hanya dapat melakukan pesanan pengiriman dengan penambahan 15 menit sebelumnya (misalnya, 20.00, 20.15, 20.30). Layanan pengiriman disediakan di area poligon yang dijelaskan dalam kode, dan ada biaya pengiriman sebesar $5 untuk pengguna.

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

Restoran menerima ASAP dan memesan di muka untuk layanan pengambilan. Fitur ini juga mendukung jam pengambilan khusus untuk hari libur.

Dalam contoh ini, pengguna dapat mulai memesan secara online 2 jam sebelum jam layanan dimulai. Jam pengambilan pada hari kerja dimulai pukul 09.00-23.00. Jam pengambilan akhir pekan mulai pukul 09.00 hingga 21.00. Khusus pada 24 Desember 2019, waktu pengambilan mulai pukul 09.00 hingga 16.00. Pengambilan memiliki waktu tunggu minimum 30 menit dan waktu tunggu maksimum 1 jam.

Pengguna dapat memesan 2 hari sebelumnya (2.880 menit) hingga 30 menit sebelumnya untuk hari apa pun, termasuk 24 Desember 2019. Pengguna hanya dapat memesan di awal dengan kelipatan 15 menit (misalnya, pukul 20.00, 20.15, 20.30). Tidak ada biaya pengambilan untuk pengguna tersebut.

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

Hari libur dan jam khusus

Anda dapat menggunakan properti isSpecialHour dari ServiceHours dan OperationHours untuk mengganti jam layanan dan/atau jam operasional yang ada. Pendekatan ini memungkinkan Anda menentukan jam operasional reguler sekali, dan secara selektif menggantinya untuk hari libur dan acara khusus.

Ada dua periode waktu terpisah yang harus Anda tentukan untuk fulfillment layanan: periode pemesanan (OperationHours, menentukan kapan pengguna dapat melakukan pemesanan) dan periode fulfillment (ServiceHours, menentukan kapan pesanan dapat dipenuhi).

Kasus penggunaan Praktik terbaik
Kasus penggunaan 1: Terbuka untuk pesanan di hari yang sama, tetapi ditutup untuk pesanan lanjutan Untuk menentukan tanggal validitas jam khusus, gunakan properti validFrom dan validThrough dari entitas ServiceHours dan OperationHours (dengan properti isSpecialHour yang ditetapkan ke "true").

JSON

Contoh ini menunjukkan bahwa layanan terbuka untuk pesanan pada hari yang sama di hari Natal, tetapi ditutup untuk pesanan yang dijadwalkan sebelumnya untuk hari tersebut. Restoran menerima ASAP dan memesan di muka untuk layanan pengambilan.

Jam pengambilan reguler (termasuk jam pemesanan dan layanan) dimulai dari pukul 09.00 hingga 21.00 dan Malam Natal tahun 2017 dengan waktu pengambilan mulai pukul 09.00 hingga 16.00. Pengambilan memiliki waktu tunggu minimum 1 jam dan waktu tunggu maksimum 90 menit. Pengguna dapat memesan dari 2 hari sebelumnya (2.880 menit) hingga 30 menit sebelumnya untuk hari apa pun, tetapi tidak dapat memesan pada hari/jam tutup (seperti hari Natal, 4 Juli, dan setelah pukul 16.00 pada Malam Natal). Pengguna hanya dapat melakukan pemesanan pesanan lebih awal dengan kelipatan 15 menit (misalnya, 14.00, 14.15, 14.30).

Tidak ada biaya pengambilan untuk pengguna tersebut. Contoh ini mendukung skenario berikut:

  • Pengguna dapat melakukan pemesanan pada tanggal 25 Desember untuk pengiriman di hari yang sama.
  • Pengguna dapat melakukan pemesanan di awal pada tanggal 25 Desember untuk pengiriman yang dijadwalkan pada tanggal 27 Desember.
  • Pengguna tidak dapat memesan di awal pada 22 Desember untuk pengiriman yang dijadwalkan pada 25 Desember.
  • Pengguna tidak dapat melakukan pemesanan di awal atau segera pada tanggal 4 Juli.
{
  "@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"
}

Biaya pengiriman dan pengambilan

Contoh di bawah ini menguraikan cara menentukan biaya pengiriman dan pengambilan untuk layanan.

Kasus penggunaan Praktik terbaik
Kasus penggunaan 1: Konfigurasi biaya pengiriman Gunakan entitas Fee untuk menentukan jenis biaya pengiriman.
Kasus penggunaan 2: Konfigurasi tarif layanan untuk layanan pengambilan Gunakan entitas Fee untuk menentukan jenis biaya layanan pengambilan.

JSON

Restoran mendukung berbagai jenis biaya pengiriman.

Dalam contoh ini, ada pengiriman gratis dengan pesanan minimum $30,00, biaya pengiriman tetap sebesar $5,00 tanpa pesanan minimum, dan biaya persentase 3% dari total jumlah keranjang. Jam pengiriman (termasuk jam pemesanan dan layanan) dimulai dari pukul 09.00 hingga 23.00. Pengiriman memiliki waktu tunggu minimum 1 jam dan waktu tunggu maksimum 90 menit.

Pengguna dapat memesan dari 6 hari sebelumnya (8.640 menit) hingga 30 menit sebelumnya untuk hari apa pun. Pengguna hanya dapat melakukan pemesanan pengiriman di awal dengan penambahan 15 menit (misalnya, 14.00, 14.15, 14.30). Area yang memenuhi syarat untuk pengiriman ditentukan dalam entitas 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

Restoran mendukung berbagai jenis tarif layanan.

Dalam contoh ini, ada tarif layanan gratis dengan pesanan minimum $30,00, tarif layanan tetap $1,00 tanpa pesanan minimum, dan tarif layanan 2% dari total jumlah keranjang. Jam pengambilan (termasuk jam pemesanan dan layanan) dimulai dari pukul 09.00 hingga 23.00. Pengambilan memiliki waktu tunggu minimal 1 jam dan waktu tunggu maksimum 90 menit.

Pengguna hanya dapat melakukan pemesanan pengiriman di awal dengan penambahan 15 menit (misalnya, 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
}

Biaya pengiriman dinamis

Contoh di bawah ini menguraikan cara menentukan biaya untuk layanan pengiriman yang bergantung pada berbagai faktor, seperti wilayah, waktu, dan jumlah item.

Kasus penggunaan Praktik terbaik
Kasus penggunaan 1: Biaya pengiriman berdasarkan wilayah dan jarak Gunakan properti eligibleRegion Fee untuk menentukan wilayah serta properti price dan priceCurrency untuk menentukan harga.
Kasus penggunaan 2: Biaya pengiriman berdasarkan waktu Gunakan properti validFrom dan validThrough dari Fee untuk menentukan waktu berlakunya biaya pengiriman.
Kasus penggunaan 3: Pengiriman gratis di atas dan jumlah pesanan Gunakan properti eligibleTransactionVolumeMin dan eligibleTransactionVolumeMax dari Fee untuk menentukan nilai keranjang minimum dan maksimum yang dikaitkan dengan harga pengiriman.

JSON

Contoh Layanan berikut mengenakan biaya pengiriman sebesar $5,00 dalam kode pos 94087, dan biaya $2,00 untuk wilayah lain.

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

Layanan contoh berikut mengenakan biaya pengiriman sebesar $20 dari 1 Januari 2017 hingga 1 Februari 2017, dan $10 di waktu lain.

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

Layanan berikut mengenakan biaya pengiriman sebesar $10 untuk pesanan hingga $100, dan tanpa biaya pengiriman jika sebaliknya.

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

Area layanan pesan-antar

Contoh di bawah ini menguraikan cara menentukan area layanan yang tersedia dari layanan pengiriman.

Kasus penggunaan Praktik terbaik
Kasus penggunaan 1: Definisi area layanan

Gunakan ServiceArea untuk menentukan wilayah geografis tujuan pengiriman makanan.

Kasus penggunaan 2: Anda memiliki area layanan Polygon.
Kasus penggunaan 3: Anda memiliki satu area layanan, tetapi tidak melayani area yang lebih kecil di dalamnya.
Kasus penggunaan 4: Anda memiliki beberapa area layanan. Buat beberapa entity ServiceArea untuk mewakili area layanan Anda.

JSON

Restoran mendukung layanan pengiriman ke berbagai area layanan. Area layanan dapat ditentukan berdasarkan bentuk poligon, kode pos, atau lingkaran.

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

Teruskan daftar yang berisi string yang mewakili loop poligon. Menyertakan area yang dikecualikan dalam properti polygon dari ServiceArea. Pemesanan Makanan menafsirkan area yang tumpang-tindih sebagai area yang dikecualikan.

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

Menghapus dan menonaktifkan entitas

Anda dapat menghapus entity dari layanan yang tidak ingin lagi ditampilkan ke pengguna di Google. Proses ini berguna jika Anda perlu memberi tahu Google bahwa restoran atau layanan telah tutup permanen atau sementara.

Menghapus entity

Untuk menghapus entitas, hapus entitas dari feed; ini memiliki SLA selama 2 jam. Untuk memperkenalkan kembali entity, tambahkan kembali entitas tersebut ke feed Anda.

Menghapus entity layanan untuk sementara

Anda juga dapat menonaktifkan entitas Service untuk sementara selama jangka waktu tertentu atau belum ditentukan.

Menonaktifkannya untuk jangka waktu tertentu akan berguna jika Anda ingin memungkinkan pengguna memesan di awal, tetapi menonaktifkan pesanan langsung dalam jangka waktu tertentu (misalnya selama hari libur).

Menonaktifkan entity Service selama jangka waktu yang tidak ditentukan berguna jika Anda ingin menonaktifkan pengguna agar tidak memesan dan melakukan pemesanan lebih awal hingga beberapa tanggal di masa mendatang yang tidak ditentukan.

Untuk menonaktifkan layanan sementara waktu, Anda harus memperbarui file feed secara langsung, seperti yang dilakukan dengan penghapusan permanen.

Gunakan teknik di bawah untuk menonaktifkan atau mengganti jam buka untuk Service selama jangka waktu yang telah ditentukan.

  • Untuk menangguhkan entitas Service sementara waktu selama jangka waktu tertentu yang diketahui sebelumnya (misalnya, jam buka hari libur), gunakan entitas OperationHours dan ServiceHours.

    Buat entity ServiceHours baru dengan atribut isSpecialHour ke true. Atribut validFrom dan validThrough diperlukan untuk menentukan nilai waktu saat jam khusus valid. Tetapkan waktu opens dan closes ke "00:00". Layanan akan otomatis dilanjutkan setelah jam dari entitas ServiceHours jam reguler setelah berada di luar nilai validFrom dan validThrough dari entitas jam khusus.

    {
      "@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
    }
    
  • Untuk menghapus sementara entitas Service selama jangka waktu yang tidak ditentukan, tetapkan properti isDisabled ke "true". Untuk mengaktifkannya kembali, hapus properti dari entity Anda atau tetapkan nilainya ke "false".

    Perhatikan bahwa Anda hanya boleh menggunakan properti isDisabled jika tidak mengetahui kapan layanan akan ditetapkan kembali. Misalnya, gunakan untuk acara yang tidak terduga dan jangan gunakan untuk hari libur).