餐廳通常會設有不同的座位區,例如酒吧或露台,並提供不同的體驗,例如五道菜的試吃菜單或品酒。Actions Center 支援這項區別,並允許使用者指定訂位區域。
提供附有房名的空房時段
如要進行這類廣告空間區隔,請在 Availability resources 訊息中設定 room_id、room_name 和 resources 欄位。如要加入會議室說明,請在 Resources 訊息中使用 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;
}
這項資訊是運算單元定義不可或缺的一部分,必須納入動態饋給,以及所有預訂和即時更新作業。如要查看指定 room_id 和 room_name 的範例,請參閱餐飲直向專屬動態饋給範例。
使用體驗的會議室名稱預約時段
如果您已導入或正在導入預訂付款重新導向,可以使用 room_name 和 room_descriptions 提供預付餐飲體驗。以下螢幕截圖詳細說明網頁上顯示的體驗。
房間樣本
{
"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,
}
}]
}確保動態饋給大小維持在較小範圍
如果座位區數量眾多,且每個座位區都有房間說明,你可以在其中一個時段中加入房間說明,藉此縮減動態饋給大小。我們會在所有位置使用 room_name 和 room_id,並從其中一個位置新增 room_description。
管理動態饋給大小時,請參考「壓縮動態饋給檔案」和「分割動態饋給檔案」一文中的最佳做法。
聊天室說明範例
{
"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
}
}]
}