This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.
Your custom booking app could prevent customers from booking more than 7 days in advance. The app implements the Booking Policy service plugin to enforce this limit.
- A customer visits the booking page to view available times.
- Wix calls your implementation of List Booking Policies with the relevant service IDs.
- Your implementation returns a policy with
limitEarlyBooking.enabled set to true and limitEarlyBooking.earliestBookingInMinutes set to 10080 (7 days).
- Wix calculates which time slots violate this policy and populates the
bookingPolicyViolations property.
- The booking calendar displays only time slots within the 7-day window as available.
A fitness studio wants to allow customers to book classes until the exact start time. Your app implements the Booking Policy service plugin to disable late booking restrictions.
- A customer visits the class schedule to book an upcoming class.
- Wix calls your implementation of List Booking Policies with the class service IDs.
- Your implementation returns a policy with
limitLateBooking.enabled set to false.
- Wix calculates time slot availability without late booking restrictions.
- The booking calendar allows customers to book any class that hasn't started yet.
A salon offers certain premium services that require phone booking only. Your app implements the Booking Policy service plugin to disable online booking for these services.
- A customer browses the salon's services.
- Wix calls your implementation of List Booking Policies with the service IDs.
- For premium services, your implementation returns a policy with
onlineBooking.enabled set to false.
- Wix marks these time slots with a policy violation.
- The booking calendar indicates that online booking is unavailable for premium services.