Triển khai khoảng không quảng cáo quan hệ nâng cao

Thực thể Thực đơn mô tả thực đơn mà nhà hàng phục vụ cho khách hàng. Thực thể Trình đơn phải được xác định trong một thực thể Nhà hàng thông qua thuộc tính menuId của Nhà hàng.

Các đối tượng khác xác định trình đơn (chẳng hạn như nội dung mô tả, hình ảnh, tiện ích bổ sung và thông tin dinh dưỡng) bao gồm MenuItemMenuItemOffer, cũng như các đối tượng không bắt buộc MenuSection, AvailabilityMenuItemOption.

Bạn có thể sử dụng các đối tượng MenuSection để sắp xếp nhiều đối tượng MenuItem thành các danh mục logic. Phương pháp này hữu ích cho các nhà hàng có nhiều thực đơn (như bữa sáng, bữa trưa và bữa tối). Thêm mỗi trình đơn dưới dạng một MenuSection riêng.

Trường hợp sử dụng Phương pháp hay nhất
Trường hợp sử dụng 1: Trình đơn cơ bản Sử dụng MenuItem, MenuItemOfferMenuSection (không bắt buộc)

Ví dụ sau đây phù hợp với trường hợp sử dụng "Thực đơn cơ bản" với hai phần trình đơn ("Đồ ăn cả ngày" và "Đồ uống"), mỗi phần chứa hai mục trong trình đơn:

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

Trình đơn có giới hạn thời gian

Bạn có thể sử dụng các đối tượng MenuItemOffer kết hợp với Availability để tạo các mục trong trình đơn và tuỳ chọn mục trong trình đơn có giới hạn thời gian. Thay vào đó, hãy sử dụng đối tượng Availability để tạo các mục trình đơn có giới hạn thời gian.

Trường hợp sử dụng Phương pháp hay nhất
Trường hợp sử dụng 1: Mục trình đơn có giới hạn thời gian Sử dụng Availability để chỉ định thời gian availabilityStartsavailabilityEnds của phần đó.
Trường hợp sử dụng 2: Mục trong trình đơn có giới hạn thời gian Sử dụng menuItemId của MenuItemOffer để chỉ định MenuItem nào liên kết với ưu đãi. Sử dụng Availability để chỉ định thời gian availabilityStarts, availabilityEndsavailabilityDay mã> của ưu đãi.
Trường hợp sử dụng 3: Mục trong trình đơn nhiều mặt hàng Sử dụng thuộc tính menuItemId của MenuItemOffer và đặt thuộc tính availabilityId để chỉ định thời gian giá có hiệu lực.

JSON

Thực đơn cơ bản có các mục "Đồ ăn cả ngày", "Bữa trưa" và "Đồ uống".

Trình đơn này có 3 phần. Mục "Ăn trưa (11:30 sáng – 2:30 chiều)" chỉ có từ 11:30 sáng đến 2:30 chiều, như mô tả trong đối tượng 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

Thực đơn cơ bản có các mục "Đồ ăn cả ngày", "Bữa trưa" và "Đồ uống".

Trình đơn này có 3 phần. Mục "Ăn trưa (11:30 sáng – 2:30 chiều)" chỉ có từ 11:30 sáng đến 2:30 chiều, như mô tả trong đối tượng Availability. Mục trong trình đơn "Bibimbap" chỉ có từ 12:00 chiều đến 1:00 chiều, như mô tả bởi Availability được tham chiếu trong đối tượng MenuItemOffer tương ứng.

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

Các món ăn trong thực đơn có ưu đãi thay đổi theo giá cả và thời gian.

Trình đơn có hai phần. Mục "pasa" trong trình đơn có hai đối tượng MenuItemOffer tương ứng (một đối tượng cho giá bữa trưa, một đối tượng cho giá bữa tối). Giá bữa trưa của mì ống là 7,49 đô la và giá bữa tối là 10,49 đô la.

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

Tuỳ chỉnh bằng tiện ích bổ sung

Các món trong thực đơn có thể có thêm các lựa chọn bổ sung. Xác định tiện ích bổ sung cho MenuItem bằng cách tham chiếu các đối tượng MenuSection bằng menuAddOnId. Các đối tượng MenuSection đó phải chứa các mục trong trình đơn được dùng cho tiện ích bổ sung của bạn.

Bạn có thể cung cấp các đối tượng MenuItem của tiện ích bổ sung mặc định bằng cách sử dụng thuộc tính defaultOptionId của đối tượng tiện ích bổ sung MenuSection.

Trường hợp sử dụng Phương pháp hay nhất
Trường hợp sử dụng 1: Tiện ích bổ sung cơ bản Sử dụng các thuộc tính eligibleQuantityMineligibleQuantityMax của đối tượng tiện ích bổ sung MenuSection để chỉ định số lượng tối thiểu và tối đa của tiện ích bổ sung có thể chọn trong phần tiện ích bổ sung.
Trường hợp sử dụng 2: Tiện ích bổ sung mặc định Sử dụng defaultOptionId của đối tượng tiện ích bổ sung MenuSection để cung cấp các tuỳ chọn tiện ích bổ sung mặc định.
Trường hợp sử dụng 3: Gói bữa ăn kết hợp/trọn gói Sử dụng các đối tượng MenuSection để mô tả lựa chọn mà người dùng có thể đưa ra khi chọn món ăn/combo.

JSON

Trong ví dụ này, mục trong trình đơn "Cappuchno" có thể tuỳ chỉnh được bằng tuỳ chọn ống hút.

Chúng tôi có thêm một lựa chọn bổ sung cho món "Bánh mì vòng Địa Trung Hải" trong mục thực đơn "Đồ ăn cả ngày" và 2 món ăn kèm với trứng.

Mục "Club Bagel" (Club Bagel) trong cùng phần trình đơn có cùng các tiện ích bổ sung có sẵn, cộng thêm tuỳ chọn tiện ích bổ sung "Tuỳ chọn trứng" làm trứng bác.

Trong phần đồ uống, có một mặt hàng với lựa chọn tiện ích bổ sung "Sữa" và tiện ích bổ sung "Lựa chọn ống hút".

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

Trong ví dụ này, mục trong trình đơn "Club Bagel" (Bánh mì vòng) được chọn sẵn bằng tuỳ chọn chorizo và trứng bác. Chorizo và sốt ớt là các tiện ích bổ sung mặc định và trứng bác là tiện ích bổ sung "Tuỳ chọn trứng" mặc định.

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

Ví dụ này cho thấy một bữa ăn kết hợp gồm bánh mì kẹp thịt, khoai tây chiên và đồ uống. Mỗi món ăn đều có thể tuỳ chỉnh được với nhiều món ăn kèm và món ăn khác nhau.

Món ăn kết hợp bắt buộc phải có 1 bánh mì kẹp thịt, 1 khoai tây chiên và 1 đồ uống để người dùng lựa chọn. Có 2 lựa chọn về bánh mì kẹp thịt và mỗi lựa chọn có 2 phần bổ sung: "Công thức" (hai mục trong thực đơn, người dùng phải chọn 0-1 tuỳ chọn) và "Extras" (ba mục trong thực đơn, người dùng phải chọn 0-3 lựa chọn).

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

Tuỳ chỉnh bằng các lựa chọn cho mục trong trình đơn

Bạn có thể đưa ra nhiều tuỳ chọn cho MenuItem bằng cách tham chiếu đến thuộc tính này trong thuộc tính menuItemId của MenuItemOption.

Ví dụ: nếu pizza có nhiều kích thước, bạn có thể tạo MenuItemOption cho từng kích thước và tham chiếu đến mục pizza trong trình đơn trong thuộc tính menuItemId cho mỗi MenuItemOption.

Trường hợp sử dụng Phương pháp hay nhất
Trường hợp sử dụng 1: Pizza có nhiều kích cỡ Sử dụng MenuItemOptionMenuItemOffer
Trường hợp sử dụng 2: Bánh pizza tuỳ chỉnh được với nhiều thành phần bên trên và kích cỡ Sử dụng MenuItemOptionMenuItemOffer để thay đổi giá phủ dựa trên kích thước của pizza.
Trường hợp sử dụng 3: Bánh pizza có thể tuỳ chỉnh với sự khác biệt giữa bên trái và bên phải Sử dụng thuộc tính value của MenuItemOption để chỉ định phần bánh pizza. Sử dụng các thuộc tính pricepriceCurrency của MenuItemOffer để chỉ định giá cho mỗi bên bánh pizza.

NDJSON

Bánh pizza có 3 cỡ khác nhau và cần người dùng lựa chọn. Giá của mỗi kích thước là khác nhau.

Pizza Hawaii có giá 10 USD cho loại nhỏ, 15 USD cho loại vừa và 20 USD cho loại pizza lớn.

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

Giá pizza phủ bên trên thay đổi tuỳ theo kích cỡ của pizza.

Một chiếc pizza Pepperoni có giá 10 USD cho loại nhỏ, 15 USD cho loại vừa và 20 USD cho loại lớn. Nước sốt Salami thịt bò có giá 1 đô la Mỹ đối với loại nhỏ, 1, 5 đô la Mỹ đối với loại nhỏ và 2 đô la Mỹ đối với loại nhỏ.

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

Lớp phủ bên trên pizza có thể được thêm vào nửa trái, nửa bên phải hoặc toàn bộ pizza. Giá cả thay đổi theo kích cỡ của pizza, cũng như tuỳ thuộc vào vị trí phủ món ăn.

Pizza Pepperoni cỡ nhỏ có giá 10 USD cho loại nhỏ, 15 USD cho loại vừa và 20 USD cho loại lớn. Bánh pizza có 2 lớp phủ (Beef Salami và Mozzarella) gồm có lớp trên cùng bên trái và bên phải của một chiếc bánh pizza nhỏ có giá 1 USD mỗi mặt, nhưng 0, 5 USD cho toàn bộ chiếc bánh pizza nhỏ. Lớp phủ bên trên có giá 1,5 đô la mỗi bên cho phần bên trái và bên phải của một chiếc pizza cỡ trung bình, nhưng thay vào đó là 1 USD cho toàn bộ chiếc pizza cỡ trung bình. Lớp phủ bên trên có giá 2 đô la cho mỗi bên cho hai bên trái và phải của một chiếc bánh pizza lớn, nhưng 1,5 đô la cho toàn bộ chiếc bánh pizza lớn.

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

Dịch vụ

Thực thể Service xác định việc phân phối một Hành động đặt món ăn từ một nhà hàng, chẳng hạn như loại dịch vụ. Giờ dịch vụ, khu vực phục vụ và các khoản phí được mô tả trong các thực thể ServiceArea, ServiceHours, OperationHoursFee.

Một nhà hàng có thể xác định nhiều đối tượng Dịch vụ (ví dụ: nếu một nhà hàng hỗ trợ cả dịch vụ giao hàng và mang đi), nhưng một Dịch vụ phải được kết nối riêng với một Nhà hàng do thuộc tính serviceType của Dịch vụ đó.

Trường hợp sử dụng Phương pháp hay nhất
Trường hợp sử dụng 1: Dịch vụ giao hàng cơ bản Sử dụng các thuộc tính openscloses trong ServiceHoursOperationHours để chỉ định thời gian bắt đầu và thời gian kết thúc mà người dùng có thể thực hiện (hoàn tất) đơn đặt hàng và đặt hàng, tương ứng. Để chỉ định thời gian thực hiện giao hàng (thời gian đến lấy hàng/giao hàng dự kiến), hãy sử dụng các thuộc tính leadTimeMinleadTimeMax của ServiceHours.

JSON

Dịch vụ mẫu sau đây nhận đơn đặt hàng từ 8:00 đến 18:00 hằng ngày (bạn có thể đặt đơn hàng mới nhất lúc 17:59:59) từ ngày 1 tháng 2 năm 2016 đến ngày 1 tháng 3 năm 2016, với thời gian chờ tối thiểu là 1 giờ và thời gian chờ tối đa là 90 phút. Dịch vụ giao hàng được cung cấp theo mã bưu chính 94041 ở Hoa Kỳ. Người dùng tính phí giao hàng 5 đô la Mỹ.

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

Giờ giao hàng và đến lấy hàng

Các ví dụ dưới đây trình bày cách xác định giờ giao hàng và đến lấy hàng của một dịch vụ.

Trường hợp sử dụng Phương pháp hay nhất
Trường hợp sử dụng 1: Việc thiết lập giờ giao hàng Sử dụng thuộc tính leadTimeMinleadTimeMax của ServiceHours cho các đơn đặt hàng sớm nhất có thể. Sử dụng OperationHours cho các đơn đặt món trước. Sử dụng thuộc tính isSpecialHour của ServiceHoursOperationHours đối với khung giờ giao hàng và đặt hàng đặc biệt vào ngày lễ
Trường hợp sử dụng 2: Thiết lập giờ đến lấy hàng Sử dụng thuộc tính leadTimeMinleadTimeMax của ServiceHours cho các đơn đặt hàng sớm nhất có thể. Sử dụng OperationHours cho các đơn đặt món trước. Hãy sử dụng thuộc tính isSpecialHour của ServiceHoursOperationHours đối với khung giờ đặc biệt cho thời hạn đến lấy hàng và đặt hàng trong mùa lễ.

JSON

Nhà hàng chấp nhận dịch vụ giao hàng và đặt món càng sớm càng tốt. Hộp cát về quyền riêng tư cũng hỗ trợ giờ giao hàng đặc biệt vào ngày lễ.

Trong ví dụ này, người dùng có thể đặt hàng trực tuyến bất cứ lúc nào. Giờ giao hàng trong tuần là từ 9 giờ sáng đến 11 giờ tối. Giờ giao hàng vào cuối tuần là từ 9:00 đến 21:00. Cụ thể, ngày 24 tháng 12 năm 2019, giờ giao hàng sẽ từ 9:00 đến 16:00. Dịch vụ cung cấp với thời gian chờ tối thiểu là 1 giờ và thời gian chờ tối đa là 90 phút.

Người dùng có thể đặt hàng trước 6 ngày (8640 phút) đến trước 1 giờ cho bất kỳ ngày nào, kể cả ngày 24 tháng 12 năm 2019. Người dùng chỉ có thể đặt trước đơn đặt hàng giao hàng theo mức tăng 15 phút (ví dụ: 20:00, 20:15, 20:30). Dịch vụ giao hàng được cung cấp trong một khu vực đa giác được mô tả trong mã và người dùng tính phí giao hàng 5 USD.

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

Nhà hàng chấp nhận dịch vụ đến lấy hàng và đặt món càng sớm càng tốt. Thuộc tính này cũng hỗ trợ giờ lấy hàng đặc biệt vào ngày lễ.

Trong ví dụ này, người dùng có thể bắt đầu đặt hàng trực tuyến 2 giờ trước khi giờ phục vụ bắt đầu. Giờ nhận hàng trong tuần là từ 9 giờ sáng đến 11 giờ tối. Giờ lấy hàng vào cuối tuần là từ 9 giờ sáng đến 9 giờ tối. Riêng ngày 24/12/2019, giờ đón khách là từ 9 giờ sáng đến 4 giờ chiều. Thời gian chờ tối thiểu là 30 phút và thời gian chờ tối đa là 1 giờ.

Người dùng có thể đặt hàng trước 2 ngày (2880 phút) đến trước 30 phút cho bất kỳ ngày nào, kể cả ngày 24 tháng 12 năm 2019. Người dùng chỉ có thể đặt hàng trước đơn đặt hàng tự đến lấy theo mức tăng 15 phút (ví dụ: 8:00 tối, 8:15 tối, 8:30 tối). Người dùng không mất phí đến lấy hàng.

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

Ngày lễ và giờ đặc biệt

Bạn có thể sử dụng thuộc tính isSpecialHour của ServiceHoursOperationHours để ghi đè giờ phục vụ và/hoặc giờ hoạt động hiện có. Phương pháp này cho phép bạn xác định giờ hoạt động thông thường một lần và ghi đè một cách có chọn lọc giờ hoạt động cho các ngày lễ và sự kiện đặc biệt.

Có hai khoảng thời gian riêng biệt mà bạn phải chỉ định để thực hiện dịch vụ: thời lượng đặt hàng (OperationHours, chỉ định thời điểm người dùng có thể đặt hàng) và khoảng thời gian thực hiện đơn hàng (ServiceHours, chỉ định thời điểm có thể thực hiện đơn đặt hàng).

Trường hợp sử dụng Phương pháp hay nhất
Trường hợp sử dụng 1: Áp dụng cho các đơn đặt hàng trong cùng ngày nhưng không áp dụng cho các đơn đặt hàng nâng cao Để chỉ định ngày có giờ đặc biệt, hãy sử dụng thuộc tính validFromvalidThrough của thực thể ServiceHoursOperationHours (trong đó thuộc tính isSpecialHour được đặt thành "true").

JSON

Ví dụ này chỉ định rằng dịch vụ mở cửa cho các đơn đặt hàng cùng ngày vào ngày Giáng sinh nhưng đóng cửa đối với các đơn đặt hàng được lên lịch trước cho ngày đó. Nhà hàng chấp nhận dịch vụ đến lấy hàng và đặt món càng sớm càng tốt.

Giờ nhận hàng thông thường (bao gồm cả giờ đặt hàng và phục vụ) là từ 9 giờ sáng đến 9 giờ tối, còn giờ lấy hàng vào đêm Giáng sinh năm 2017 là từ 9 giờ sáng đến 4 giờ chiều. Thời gian chờ tối thiểu là 1 giờ và thời gian chờ tối đa là 90 phút. Người dùng có thể đặt hàng trước 2 ngày (2880 phút) đến 30 phút cho bất kỳ ngày nào, nhưng không thể đặt hàng vào các ngày/giờ đã đóng cửa (như ngày Giáng sinh, ngày 4 tháng 7 và sau 4 giờ chiều trong đêm Giáng sinh). Người dùng chỉ có thể đặt hàng trước các đơn đặt hàng tự đến lấy theo mức tăng 15 phút (ví dụ: 2:00 chiều, 2:15 chiều, 2:30 chiều).

Người dùng không mất phí đến lấy hàng. Ví dụ này hỗ trợ các trường hợp sau:

  • Người dùng có thể đặt hàng vào ngày 25 tháng 12 để được giao hàng trong cùng ngày.
  • Người dùng có thể đặt hàng trước vào ngày 25 tháng 12 để được giao hàng vào ngày 27 tháng 12.
  • Người dùng không thể đặt hàng trước vào ngày 22 tháng 12 để giao hàng theo lịch vào ngày 25 tháng 12.
  • Người dùng không thể đặt hàng trước hoặc đặt hàng sớm nhất có thể vào ngày 4 tháng 7.
{
  "@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"
}

Phí giao hàng và đến lấy hàng

Các ví dụ dưới đây trình bày cách xác định phí giao hàng và đến lấy hàng của một dịch vụ.

Trường hợp sử dụng Phương pháp hay nhất
Trường hợp sử dụng 1: Cấu hình phí giao hàng Sử dụng thực thể Fee để xác định các loại phí giao hàng.
Trường hợp sử dụng 2: Chế độ thiết lập phí dịch vụ cho dịch vụ đến lấy hàng Sử dụng thực thể Fee để xác định các loại phí dịch vụ đến lấy hàng.

JSON

Nhà hàng hỗ trợ nhiều loại phí giao hàng.

Trong ví dụ này, dịch vụ giao hàng miễn phí với đơn đặt hàng tối thiểu là 300.000 VND, phí giao hàng cố định là 50.000 VND không áp dụng giá trị đặt hàng tối thiểu và phí giao hàng theo tỷ lệ phần trăm là 3% tổng số tiền trong giỏ hàng. Thời gian giao hàng (bao gồm cả giờ đặt hàng và giờ phục vụ) là từ 9 giờ sáng đến 11 giờ đêm. Thời gian chờ tối thiểu là 1 giờ và thời gian chờ tối đa là 90 phút.

Người dùng có thể đặt hàng trước 6 ngày (8640 phút) đến trước 30 phút cho bất kỳ ngày nào. Người dùng chỉ có thể đặt hàng giao hàng trước theo mức tăng 15 phút (ví dụ: 2:00 chiều, 2:15 chiều, 2:30 chiều). Khu vực đủ điều kiện để phân phối được chỉ định trong thực thể 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

Nhà hàng hỗ trợ nhiều loại phí dịch vụ.

Trong ví dụ này, chúng tôi áp dụng phí dịch vụ miễn phí cho đơn đặt hàng tối thiểu là 30 USD, phí dịch vụ cố định là 1 USD nếu không đặt đơn hàng tối thiểu và 2% phí dịch vụ từ tổng số tiền trong giỏ hàng. Thời gian đến lấy hàng (bao gồm cả giờ đặt hàng và giờ phục vụ) là từ 9 giờ sáng đến 11 giờ đêm. Thời gian chờ tối thiểu là 1 giờ và thời gian chờ tối đa là 90 phút.

Người dùng chỉ có thể đặt hàng giao trước theo mức tăng 15 phút (ví dụ: 2:00 chiều, 2:15 chiều, 2:30 chiều).

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

Phí phân phối linh động

Các ví dụ dưới đây trình bày cách xác định phí cho một dịch vụ giao hàng phụ thuộc vào nhiều yếu tố, chẳng hạn như khu vực, thời gian trong ngày và số lượng mặt hàng.

Trường hợp sử dụng Phương pháp hay nhất
Trường hợp sử dụng 1: Phí giao hàng theo khu vực và khoảng cách Sử dụng thuộc tính eligibleRegion của Fee để chỉ định khu vực và các thuộc tính pricepriceCurrency để chỉ định giá.
Trường hợp sử dụng 2: Phí giao hàng theo thời gian Sử dụng thuộc tính validFromvalidThrough của Fee để chỉ định thời gian phí giao hàng hợp lệ.
Trường hợp sử dụng 3: Miễn phí giao hàng ở trên và số tiền của đơn đặt hàng Sử dụng các thuộc tính eligibleTransactionVolumeMineligibleTransactionVolumeMax của Fee để chỉ định giá trị giỏ hàng tối thiểu và tối đa được liên kết với giá giao hàng.

JSON

Dịch vụ mẫu sau đây tính phí giao hàng 5 đô la cho mã ZIP 94087 và phí 2 đô la cho các khu vực khác.

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

Dịch vụ mẫu sau đây tính phí giao hàng là 20 USD từ ngày 1 tháng 1 năm 2017 đến ngày 1 tháng 2 năm 2017 và 10 USD vào bất kỳ thời điểm nào khác.

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

Dịch vụ sau đây tính phí giao hàng là 10 USD cho các đơn đặt hàng có giá trị tối đa 100 USD và không tính phí giao hàng.

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

Khu vực kinh doanh giao hàng

Các ví dụ dưới đây trình bày cách xác định khu vực kinh doanh hiện có của một dịch vụ phân phối.

Trường hợp sử dụng Phương pháp hay nhất
Trường hợp sử dụng 1: Định nghĩa khu vực kinh doanh

Hãy sử dụng ServiceArea để xác định khu vực địa lý nơi bạn có thể giao đồ ăn.

Trường hợp sử dụng 2: Bạn có khu vực kinh doanh Đa giác.
Trường hợp sử dụng 3: Bạn có một khu vực kinh doanh nhưng không cung cấp dịch vụ ở một khu vực nhỏ hơn trong đó.
Trường hợp sử dụng 4: Bạn có nhiều khu vực kinh doanh. Tạo nhiều thực thể ServiceArea để đại diện cho khu vực kinh doanh của bạn.

JSON

Nhà hàng có hỗ trợ dịch vụ giao hàng đến các khu vực kinh doanh khác nhau. Bạn có thể xác định các khu vực kinh doanh bằng hình đa giác, mã bưu chính hoặc hình tròn.

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

Truyền một danh sách chứa các chuỗi đại diện cho các vòng lặp đa giác. Bao gồm các vùng không được bao gồm trong thuộc tính polygon của ServiceArea. Dịch vụ Đặt món ăn hiểu rằng các khu vực trùng lặp là khu vực bị loại trừ.

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

Xoá và vô hiệu hoá thực thể

Bạn có thể xoá các thực thể mà bạn không muốn Google cho người dùng thấy khỏi dịch vụ của mình nữa. Quá trình này sẽ hữu ích nếu bạn cần thông báo cho Google rằng một nhà hàng hoặc dịch vụ đã đóng cửa vĩnh viễn hoặc tạm thời.

Xoá thực thể

Để loại bỏ một thực thể, hãy xoá thực thể đó khỏi nguồn cấp dữ liệu của bạn; việc này có SLA là 2 giờ. Để giới thiệu lại một thực thể, hãy thêm lại thực thể đó vào nguồn cấp dữ liệu.

Tạm thời xoá các thực thể dịch vụ

Bạn cũng có thể tạm thời tắt một thực thể Service trong một khoảng thời gian cụ thể hoặc không xác định.

Việc tắt một tuỳ chọn trong một khoảng thời gian cụ thể sẽ hữu ích nếu bạn muốn cho phép người dùng đặt hàng trước nhưng tắt các đơn đặt hàng ngay lập tức trong một khoảng thời gian nhất định (chẳng hạn như trong dịp lễ).

Việc vô hiệu hoá thực thể Service trong khoảng thời gian không xác định sẽ hữu ích nếu bạn muốn không cho phép người dùng đặt cả hai đơn đặt hàng trước và ngay lập tức cho đến một ngày không xác định nào đó trong tương lai.

Để tạm thời vô hiệu hoá một dịch vụ, bạn cần cập nhật trực tiếp các tệp nguồn cấp dữ liệu giống như khi xoá vĩnh viễn.

Hãy sử dụng các kỹ thuật bên dưới để tắt hoặc ghi đè giờ cho Service trong một khoảng thời gian được xác định trước.

  • Để tạm ngưng một thực thể Service trong một khoảng thời gian cụ thể mà bạn đã biết trước (ví dụ: giờ nghỉ lễ), hãy sử dụng các thực thể OperationHoursServiceHours.

    Tạo một thực thể ServiceHours mới có thuộc tính isSpecialHourtrue. Bạn phải chỉ định các thuộc tính validFromvalidThrough để chỉ định giá trị thời gian khi giờ đặc biệt hợp lệ. Đặt openscloses lần thành "00:00". Dịch vụ sẽ tự động tiếp tục sau những giờ trong thực thể ServiceHours giờ thông thường một lần bên ngoài các giá trị validFromvalidThrough của thực thể giờ đặc biệt.

    {
      "@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
    }
    
  • Để tạm thời xoá một thực thể Service trong một khoảng thời gian không xác định, hãy đặt thuộc tính isDisabled của thực thể đó thành "true". Để bật lại, hãy xoá thuộc tính khỏi thực thể hoặc đặt giá trị thành "false".

    Xin lưu ý rằng bạn chỉ nên sử dụng thuộc tính isDisabled khi không biết thời điểm dịch vụ được thiết lập lại. Ví dụ: sử dụng thuộc tính này cho các sự kiện không mong muốn và không sử dụng cho ngày lễ).