Sample Flows

This article presents a use case and corresponding sample flow that you can support. It provides a useful starting point as you plan your implementation.

Provide custom time slot configurations during booking

This flow shows what happens when a customer views available booking times, including when they select service variants or add-ons.

Prerequisite: Resources must exist for the services being booked. The merchant may also have configured services with service options and variants or add-ons.

  1. A customer opens the Bookings calendar on a site.
  2. The customer selects a service, and optionally chooses a duration variant and/or add-ons.
  3. Wix calls your List Availability Time Slot Configurations implementation with services.serviceId for each service. If the customer made choices, the request also includes services.customerChoices with:
  4. Your implementation returns a configuration for each service, specifying duration, bufferTimeInMinutes, splitIntervalInMinutes, resourceTypes, and locations.
  5. To set duration.defaultInMinutes, your implementation must calculate the correct value based on the customer choices. The Time Slots API forwards customer choices to your implementation without processing them, so your implementation is responsible for using them to calculate the correct duration:
  6. Wix calculates available time slots based on your configuration, resource schedules, and existing bookings.
  7. The customer selects a slot and proceeds to book.
Did this help?