TimeSlotFinder
Finds available time slots for a given reservation.
For each dimension that a reservation can be related to (through either a lookup or a junction), this class supports two use cases:
Simple - The exact related record is already known. I.e. the resource lookup has already been populated with the id of room one.
Complex - The related record can be any out of a pool of records. I.e. we have a pool of resources (let’s say all rooms in building one), for which we want to know all the possible time slots.
These use cases can be mixed in a single call to the method. For example the resource is fixed but the staff can be any from a pool of staff members.
Example use cases for lookups
Simple use case
The reservation I want to make has to be in room one, with staff Alex. I pass this reservation to the method, with the resource and staff lookups populated. The method result gives me a simple list of time slots when both the room and the staff are available.
Complex use case
The reservation I want to make has to be in building one (so in any of the rooms there), with any of the staff that work at building one. I pass the reservation to the method, without the resource and staff lookups populated. I separately pass the allowed room ids and staff ids. The method result gives me a more complex list of time slots, each with all the possible room and staff combinations available at that time.
We have some handy utilities for finding the ids to pass to this method!
To get all the room ids in a specific building, use the DimensionHierarchy global class.
To get all the staff that work in building one (defined through availability records), use the MdaLinkedDimensions global class.
Example use cases for junctions
Simple use case
The reservation I want to make has to have two reservation contacts: John and Alex. I pass this reservation to the method, with two reservation contact records (one for John, one for Alex) in the separate junctions property. The method result gives me a simple list of time slots when both John and Alex are available.
Complex use case
The reservation I want to make has to have two participants (reservation contacts) out of five possible participants. I pass five reservation contact records (one for each possible participant) in the junctions property. In the requestedNumberOfJunctions property, I specify that I need two reservation contacts to be available. The method result gives me a complex list of time slots, each with all the possible combinations of participants available at that time.
Methods
Inner Classes
Example
Simple use case
This example shows the simple use case (both for lookups and junctions).
Complex use case
This example shows the complex use case for lookups:
GoMeddo Rest API
In the GoMeddo Rest API, there is a similar function called /timeSlots that displays available timeslots based on a given reservation.
https://apidocs.gomeddo.com/#/availability/post_timeSlots