Create a customer from a reservation
Capture a guest's name and phone inside the reservation editor at Harbor Soho. When the booking is saved, Antylogic creates or reuses the customer record and links it to the reservation.
In this article
Front-of-house operators can handle a phone booking without leaving the reservation workflow: open the service occurrence, start the booking, enter the guest details and save.
The customer is created or reused from the entered phone number before the reservation is saved with the returned customer id. This guide covers the internal reservation editor, not the public booking route.
Before you start
- Sign in with an organisation and location selected, for example Harbor Demo Group and Harbor Soho.
- Open an accessible service occurrence such as `BOOKING_MANUAL_OCCURRENCE_ID` for the Soho lunch service.
- Use an operator with `reservation:manage`; the inline customer save also needs `customer:manage`, and the screen uses `customer:view` to load existing customers.
- For the edit path, the reservation must not already have `customer_id`; reservations with an existing customer follow the update-customer flow instead.
Instructions
- 1.
Open the service occurrence
Go to `/:orgId/:locationId/reservations/:occurrenceId?returnRoute=LocationReservationsCalendar&returnMode=week` from the reservations calendar or a deep link. The occurrence detail loads the service context, reservations and customer list, then shows `Nueva reserva` when the operator can manage reservations.
- 2.
Start the reservation editor
Select `Nueva reserva` for a new booking, or open an existing reservation without `customer_id` and choose edit. If an automatic occurrence opens an optimiser step first, continue until the manual reservation editor is shown.
- 3.
Enter the customer details
Fill `Nombre cliente` and `Teléfono cliente` in the reservation form. This editor does not provide a customer picker; it creates or reuses the customer from those two fields.
- 4.
Complete the booking details
Set the number of people, status, time, duration and table preference or assignment. If the table mode is not indifferent, choose at least one valid table before saving.
- 5.
Save the reservation
Press `Crear` for a new reservation or `Guardar` for an unlinked reservation being edited. Antylogic posts the customer first, reuses a matching local customer when the same `phone_e164` already exists, then saves the reservation with `customer_id` set to the returned id.
- 6.
Check the linked customer
After a successful save, the occurrence context and customer list refresh and the editor closes. The reservation list or timeline should show the entered customer name and phone for the saved booking.
Validations and limits
- Missing `orgId`, `locationId` or `occurrenceId` leaves the screen in a not-found state.
- The occurrence detail needs `reservation:view` or `reservation:manage`; submitting the editor needs `reservation:manage`.
- `Nombre cliente` and `Teléfono cliente` are required after trimming whitespace; no frontend E.164 format validation was found beyond the phone keyboard.
- Party size must be a number greater than 0 before the customer or reservation request is sent.
- If the table mode is not indifferent, at least one valid table must be selected.
- `POST /api/app/{orgId}/{locationId}/customers` requires `customer:manage`; if that permission is missing, the inline save can fail even though the reservation editor opened.
- Customer and reservation saves are separate calls, so a failed reservation save can leave the customer record created without the booking link.
- The reservation backend accepts `customer_id` only when the customer exists and belongs to the same location or is global.
- If the app asks to save and switch the occurrence to manual mode, the reservation link persists only after the confirmation save succeeds.
Expected result
Harbor Soho ends with a reservation linked to the created or reused customer record, and the refreshed occurrence view shows the customer details for the booking.