How to book appointments with no double-booking, time buffers, no conflicts and more..?

So I’ve made a booking app and nearly done. But, after seeing @Jeff_Hager response to @Roldy recent post, it made me wonder if my approach to my use case was efficient or it just works.

I’m interested to see how people would approach creating an app for booking services from multiple people for different services - and to see if what I created is overkill :sweat_smile:

Here is the criteria I worked with:

  • Providers can list a number of services that can have different durations (30 min, 90 min, etc.)
  • Providers can set their available hours per day of the week, so users can only book during those times (i.e. Shop A is open on weekdays from 9:00am - 5:00pm)
  • Users can book multiple appointments but shouldn’t be able to double book a provider once a slot of time is taken (i.e. if Sally books with Shop A from 10:00am - 12:00pm, then Brooke can’t book anything with Shop A between that time, but can book before or after that appointment is finished
  • Providers can also add buffer times in between appointments (Shop A wants an hour in between each appointment, so the earliest Brooke could book with Shop A is 1:00pm)
  • Users can’t book with less than 24 hours notice
  • Users can’t book more than 30 days out from the current day

I’ve accomplished the above by creating an “hours” column in 15 minute intervals and associating times and durations (i.e. 12:00am, 12:15am, 90 minutes etc.) to their decimal equivalent, then adding the decimal to the date a user selects. Once an appointment is made, a relation on the booking screen is made to check if appointments are on the same day that the current user has selected.

Times (or the decimal equivalent) that are in conflict with already made appointments will not show in a choice component where users select a time slot for booking an appointment.

There is also lengthy IFTHEN that also checks for other factors (if the time slot is during the shops hours, if the time slot is on a day the provider has marked not available, etc.).

I know many have created booking apps and apps that leverage date/time features in general. Curious if this method is overdone, or helpful, or confusing?!

6 Likes

This is EXACTLY how I did it for my Meet with Me template.

3 Likes

Well in that case, I feel validated lol

3 Likes

+1 for this. I did this for one of my booking apps as well, starting from @Robert_Petitto and @Jeff_Hager 's exchange about the idea of using decimal equivalents. Well done to you all and thanks a lot!

3 Likes

I did a booking app for our outrigger canoe club. Basically the criteria is there are 4 types of canoes with different counts of canoes. You can book in fixed windows of times at 5 min intervals. The problem is that you have to track boats that can be going out later in the time windows, account for boats that are coming back in. It gets ugly and I ended up using a spread sheet that would sum up the number of boats in the time window and when the count went to zero it disallows the booking of that type of boat. It is limited in scope so I just brute forced the tracking of each type of boat.It is not easy to add more types of boats, fortunately, that does not happen ever. One of the hardest parts was making the app have the boat type disappear from the choosers when the count went to zero

1 Like