Cómo agregar secciones de asientos en el restaurante

Es común que los restaurantes tengan áreas de asientos distintas, como un bar o un patio, y diferentes experiencias, como un menú de degustación de cinco platos o una degustación de vinos. El Centro de acciones admite esta distinción y permite que el usuario especifique el área para reservar una mesa.

Ranuras de disponibilidad con nombres de habitaciones

Figura 1: Ejemplo de selección de espacios para un restaurante con secciones de asientos

Esta separación del inventario se puede aplicar configurando los campos room_id, room_name y resources en el mensaje resources de un intervalo de Availability. Para incluir descripciones de las habitaciones, usa el campo room_description dentro del mensaje Resources.

// 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;
}

Esta información es una parte integral de la definición de las ranuras y deberá incluirse en los feeds, así como en todas las operaciones de reserva y actualización en tiempo real. Puedes ver ejemplos de cómo se especifican room_id y room_name en el ejemplo de feed específico para restaurantes.

Espacios de disponibilidad con nombres de salas para experiencias

Si implementaste o estás en proceso de implementar Reservations Payments Redirect, puedes usar room_name y room_descriptions para potenciar las experiencias gastronómicas prepagadas. En la siguiente captura de pantalla, se detalla cómo se muestra la experiencia en la Web.

Figura 1: Ejemplo de selección de espacios para un restaurante con secciones de asientos que incluyen descripciones de las salas

Muestra de 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,
      }
  }]
}

Muestra de experiencias

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

Asegúrate de que el tamaño de tu feed siga siendo pequeño

Si tienes una gran cantidad de secciones de asientos, cada una con descripciones de la sala, puedes reducir el tamaño de tu feed incluyendo las descripciones de la sala solo en uno de los espacios. Usamos room_name y room_id en todos los espacios y agregamos room_description de uno de los espacios.

Cuando administres el tamaño de tu feed, considera seguir las prácticas recomendadas que se describen en Cómo comprimir archivos de feed y Cómo fragmentar archivos de feed.

Ejemplo de descripción de habitación

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