添加用餐座位部分

餐厅通常会设有不同的就餐区(例如酒吧或露台)并提供不同的体验,例如五道菜的品尝菜单或品酒。Action Center 支持此区分,并允许用户指定订位的区域。

包含会议室名称的可用时段

图 1:设有座位区的餐厅的预订时段选择示例

您可以通过在可用性时段的 resources 消息中设置 room_idroom_name 和字段来采用这种广告资源分离方式。如需添加会议室说明,请使用“资源”消息中的 room_description 字段。

// A resource is used to disambiguate availability slots from one another when
// different staff, room or party_size values are part of the service.
// Multiple slots for the same service and time interval can co-exist when they
// have different resources.
message Resources {
  // One of staff_id, room_id, or party_size must be set.

  // Optional ID for a staff member providing the service. This field identifies
  // the staff member across all merchants, services, and availability records.
  // It also needs to be stable over time to allow correlation with past
  // bookings. (optional but required if staff_name is present)
  string staff_id = 1;

  // Optional name of a staff member providing the service. This field will be
  // displayed to users making a booking, and should be human-readable, as
  // opposed to an opaque identifier. (optional but required if staff_id is
  // present)
  string staff_name = 2;

  // An optional ID for the room the service is located in. This field
  // identifies the room across all merchants, services, and availability
  // records. It also needs to be stable over time to allow correlation with
  // past bookings. (optional but required if room_name is present)
  string room_id = 3;

  // An optional name for the room the service is located in or experience of
  // of the service. This field will be displayed to users making a booking,
  // and should be human readable, as opposed to an opaque identifier.
  // A room name should only be used for seating areas or prepaid experiences.
  // Examples of room names include "Bar", "Patio", "Dining Room". Examples of
  // dining experiences using room names include "Five-Course Tasting Menu",
  // "Chef Omakase". It is strongly recommended that the default seating area
  // does not have a room associated with it.
  string room_name = 4;

  // Applicable only for Dining: The party size that can be accommodated
  // during this time slot. A restaurant can be associated with multiple Slots
  // for the same time, each specifying a different party_size, if for instance
  // 2, 3, or 4 people can be seated with a reservation. (optional)
  int32 party_size = 5;

  // Localized room description with a limit of 500 characters. If set,
  // a default value must be provided, it is preferred to use the common
  // languages for the merchant's locale.
  Text room_description = 7;
}

此信息是 slot 定义不可或缺的一部分,需要包含在 Feed 以及所有预订和实时更新操作中。您可以在餐饮垂直专用 Feed 示例中查看指定 room_idroom_name 的示例。

使用体验的会议室名称的空闲时段

如果您已实现或正在实现预订付款重定向,则可以使用 room_nameroom_descriptions 来支持预付费餐饮体验。以下屏幕截图详细展示了该体验在网页上的显示方式。

图 1:包含房间说明的餐厅的座位区域示例时段选择

Room 示例

{
  "availability": [{
    "merchant_id": "dining-A",
    "service_id": "reservation",
    "start_sec": 1535853600,
    "duration_sec": 2700,
    "spots_total": 2,
    "spots_open": 2,
    "resources": {
      "room_id": "A-dining-room",
      "room_name": "Bar",
      "party_size": 2,
      }
  }]
}

体验示例

{
  "availability": [{
    "merchant_id": "dining-A",
    "service_id": "reservation",
    "start_sec": 1535853600,
    "duration_sec": 2700,
    "spots_total": 2,
    "spots_open": 2,
    "resources": {
      "room_id": "experience-1",
      "room_name": "Wine Tasting Menu Pair",
      "description": "This Wine Tasting Menu Pair showcases American cuisine rooted in the nostalgic flavors of the 20th century American experience. Each experience is hand-crafted, with a progression from small bites to more substantial plates.",
      "party_size": 2,
      }
    }]
}

确保 Feed 的大小保持较小

如果您有大量座位区域,每个区域都有房间说明,那么您只需在一个位置中添加房间说明,即可减小 Feed 的大小。我们在所有 slot 中使用 room_nameroom_id,并从其中一个 slot 中添加 room_description

在管理 Feed 大小时,请考虑遵循压缩 Feed 文件分片 Feed 文件中所述的最佳实践

聊天室说明示例

{
  "availability": [
    {
    "merchant_id": "dining-A",
    "service_id": "reservation",
    "start_sec": 1535853600,
    "duration_sec": 2700,
    "spots_total": 2,
    "spots_open": 2,
    "resources": {
      "room_id": "experience-1",
      "room_name": "Wine Tasting Menu Pair",
      "description": "This Wine Tasting Menu Pair showcases American cuisine rooted in the nostalgic flavors of the 20th century American experience. Each experience is hand-crafted, with a progression from small bites to more substantial plates.",
      "party_size": 2
      }
  },
  {
    "merchant_id": "dining-A",
    "service_id": "reservation",
    "start_sec": 1535854600,
    "duration_sec": 2700,
    "spots_total": 4,
    "spots_open": 4,
    "resources": {
      "room_id": "experience-1",
      "room_name": "Wine Tasting Menu Pair",
      "party_size": 6
      }
  }]
}