Blueprint Time Slot Picker Flow

This page shows how the GoMeddo - Template - Screen flow - Default Blueprint Time Slot Picker Example flow template works for users, and how admins can customize it.

Overview

This template lets a user pick a resource and a blueprint. Next, the user picks a time slot in which one or more reservations can be made, based on the selected resource and blueprint. Finally, the flow creates the reservations.

For more information about blueprints, see Reservation Blueprints for Parent Child.

For more information about parent/child reservations, see Parent & Child Reservations.

The flow in action (for users)

Pick a resource and a blueprint

First, the flow asks the user to pick a resource and a blueprint. By default, the Resource list shows all resources of the type Building, and the Blueprint list shows all blueprints that are not a child blueprint. Blueprints that select their dimension records with Records matching condition don't need a resource, so for those you can remove the Resource list entirely.

First screen of the flow with the Resource and Blueprint lists

Pick a time slot

Next, the flow calculates all time slots in which at least one of the blueprint combinations is possible. The user clicks the arrows on either side to move through the time range, clicks a slot to select it, and then clicks Next.

The time slot picker looks like this:

Time slot picker showing a week of slots with one slot selected

Create reservations

After the user picks a slot and clicks Next, the default flow template inserts one of the combinations that are possible in that slot, and the flow ends.

You can customize this step, for example to let the user choose one of the possible collections when more than one is available in the selected slot, or to show the user more information after the reservations are inserted.

The flow in the builder (for admins)

In Flow Builder, the flow looks like this:

The Default Blueprint Time Slot Picker flow in Flow Builder

Get parent resource type (Get Records)

First, the flow uses a Get Records element to fetch the parent resource type. It uses this type to fill the Resource list on the first screen. By default, it queries the Building type, but you can change this to another resource type. If your blueprints produce parent/child reservations, make sure this is a parent resource, with child resources below it to hold the child reservations.

Pick resource and blueprint (Screen)

This is the first screen, where the user picks a resource and a blueprint. You can change the labels of the picklists, or remove one or both picklists (and this screen) if your flow fills in these values and the user doesn't select them. By default, it shows all resources of the type Building and all blueprints that are not a child blueprint.

Set inputs for endpoints (Assignment)

This element sets the inputs for the next two Apex actions. By default, the slot duration is the duration of the selected blueprint. The date range for fetching time slots defaults to 14 days, starting today. To start the range on another date, add an assignment in this element that sets timeSlotConfig > dateRange > startDate.

image-20250512-071203.png

An important part of this step is setting the resource of the prototype reservation. It defaults to the resource the user selected on the first screen. GoMeddo uses this resource to find all possible values for blueprint fields that use Child of parent resource or Available at parent resource as their Method To Get Value. If all dimension fields of your blueprint use Records matching condition, the prototype resource is not used. You can then leave it empty and remove the Resource list from the first screen, since the candidate records don't depend on it.

Get blueprint collections (Apex Action)

Before fetching the time slots, the flow calls the ReservationBlueprints endpoint to get all possible combinations for the selected blueprint and prototype reservation. It returns them as a list of ReservationCollection, which the flow passes on to the next Apex action.

Get time slots (Apex Action)

This action gets the time slots, based on the collections from the previous step and the timeSlotConfig.

The time fields of the reservations this action returns are still empty: the time information is stored on the slots instead. The time slot picker in the next step fills in these fields on the reservations once the user selects a slot.

Pick a slot (Screen)

This screen uses the output of the previous step to show a time slot picker to the user. The user moves through the loaded time slots with the previous and next arrows. If they click an arrow at the end of the loaded range, the component triggers the flow's Next event. The flow then loops back to fetch the next range of slots and shows the picker again (handled by the slot picker outcome decision).

When the user selects a slot and clicks Next, the component fills the output variable selectedTimeSlotWithReservationCollections with the selected slot. This slot contains all blueprint combinations that are possible at that time, with their time fields (B25__Start__c and B25__End__c) set from the slot time. For child reservations, it takes their order and duration into account.

The picker shows the slots in the user's browser time zone by default. To use another time zone, set the displayTimeZone property of the time slot picker component.

Slot picker outcome (Decision)

This element checks whether the user selected a slot or navigated beyond the loaded range. In the second case, it follows the navigate left or navigate right outcome to the move range left or move range right assignment. That assignment updates timeSlotConfig > dateRange and loops back to get time slots to fetch the next range of slots and show the picker again.

Create reservations (Apex Action)

Finally, this action takes a ReservationCollection and inserts it. This is where the default flow template ends, but you can add more steps, for example to show the user more information after the reservations are inserted.