How to display a combined booking calendar from multiple availabilities?

Currently, I have Data Types for Product Availability & User Availability.

I would like the timeslots to hide if the count of bookings for a given time range is greater than or equal to the count of User Availability for that same time period. I’ve set up a Product Availability because I want to give users control over what time this certain product is available. Still, of course, the product’s availability will also be dependent on the User Availability.

For example, I own a massage shop that offers Swedish Massage from 9am-11pm. I have 3 masseuses that have User Availabilities of 9am-11pm, 10am-5pm, and 3pm-12am respectively.
user sched

How would I merge all these availabilities into a repeating group showing the correct available time slots? Then, the timeslot should disappear if the count of bookings becomes greater than or equal to the count of intersections between Product Availability & User Availability. I’m also having trouble getting the proper start times based on the intersections of these two data types. Not sure if you can even evaluate the Product Availability against each User Availability.

I’m thinking it’s possible with nested repeating groups, in which, in my massage shop example, there will be 3 different sets of time slots for each of my 3 masseuses.

However, if it is possible to combine all 3 into 1, that would be much preferred.

Am I making sense? I feel like I’m complicating this more than I should. But I also believe this is possible on Bubble.

Any help would be greatly appreciated. Thanks!

Any solution to this I think would have to be extremely specific to how you have structured all of the scheduling from the ground up and how you are currently searching and displaying available times. So it’s hard for anyone to say without taking time to learn your app (hard to do through a forum, more of a consultation type of thing)

There are also some other structures you can check out to see if they might work for your app. My TopCal plugin helps you sort out time slots and availability, and there are some threads in the forum about how to use it with multiple people’s schedules if that helps:

Link to TopCal example and info page:

Link to Searching Availability for multiple schedules: