Public booking pages: how customers book and cancel
Describes Bookings 0.2.0.
Every active service gets a public booking page. Customers pick a time, enter their details and get a confirmation by email, with a private link to look at or cancel their booking later. No account is needed unless the service asks for one.
Where to find it
/bookings: Book with us, a card for every active service with a Book button. With no active services it says Nothing is open for booking right now./book/<slug>: the booking page of one service. Inactive and trashed services show This booking page does not exist or is no longer taking bookings./bookings/manage/<token>: the customer’s own booking page, linked from their emails.
When the Languages module is on, the same pages also work under a language prefix, such as /et/bookings.
If you can edit the service, its booking page gives you an Edit service link to its admin form.
What visitors see at /bookings.
Picking a time
The top of the page shows the service name, description, booking shape, price and, for stays, the check-in and check-out times. What follows depends on the service:
- Fixed slots: pick a Date, then one of the free start times. Taken times are not shown. When none are left, the page says No free times on this date — try another day.
- Free-form: enter a Date, From and To, then Continue.
- Nights or days: enter Check-in and Check-out (or First day and Day after the last day), then Check availability.
If a choice breaks a rule of the service (too short, too soon, outside opening hours, already taken), a message above the form says why.
Moving on to the details form holds the chosen time for 5 minutes, so nobody else can take it while the customer types.
Entering details and booking
The details form asks for Your name, Email, Phone (optional) and Notes (optional), and shows the Total: for priced services. For a logged-in visitor, the name (taken from their username) and email are filled in.
- Confirm booking books it straight away: Booked! … is yours.
- Request booking appears when the service needs approval: Request received for …. You’ll hear back once it’s approved. The request is listed as pending in the admin.
- Back returns to the picker.
After booking, the page shows the link to the customer’s own booking page.
If the service is set to Login required, visitors who aren’t signed in are asked to log in.
The waitlist
When a date is full, the page offers Fully booked? Join the waitlist and get an email when a spot frees up. with Date, Name, Email and Join waitlist. When a booking on that date is cancelled, everyone waiting for it gets an email; whoever books first gets the spot.
Emails the customer gets
- Booking confirmed or Booking request received, right after booking, with the manage link. The confirmation has a calendar file (
.ics) attached. - Booking approved, when an admin approves a request, with the calendar file.
- Booking cancelled, when the booking is cancelled, with a link to book again.
- A reminder, when the service has a reminder time set.
Emails go through the site’s regular mailer. If one fails, the booking itself still goes through.
The customer’s booking page
The manage link shows Your booking: the service, time, status, name and email, the unit assigned and the total. Cancel booking asks Cancel this booking? This cannot be undone. and cancels it. The button only shows while the service’s cancellation window is open; after that, only an admin can cancel. A wrong or broken link shows This link is invalid or has expired.
What it doesn’t do
- It doesn’t take payment; the total is shown and stored only.
- Customers can’t move a booking to another time. They cancel and book again.
- There is no list of all of a customer’s bookings; each booking has its own link.
For developers
The booking form can be placed on any page of the host app by mounting PhoenixKitBookings.Web.Public.BookingWidgetLive with live_render/3; its moduledoc lists the session keys it needs.