Occupancy

Component Description

This component displays the occupancy of the dimension record it is placed on. It is only available for record pages.

When placed on a reservable resource without children it shows the occupancy of that resource.

Occupancy component for a reservable resource

When placed on a parent resource it shows the occupancy of the child resources.

Occupancy component for a parent resource

Controls

Start of Range

The start of the displayed range.

End of Range

The end of the displayed range

Group Occupancy by

The grouping of the occupancy bars the start and end of the ranges are rounded to fix the grouping.

Switch display

Switches between a grouped and stacked bar mode

Lightning Flow: Apex Action

Occupancy is also available as a Lightning Flow Apex Action. This means you can now use occupancy data in your Flows. This means you can now make a decision in a Flow, based on the occupancy of your Resources (or Dimension records).

 

 

For example; you would like to optimise your room use within a building and want to book the room which is suitable to the request of a customer but has the lowest occupancy so you better utilise the space. With this action you can make that decision based on the occupancy of the different rooms and select the one that has the lowest occupancy.

The flow action has three different outputs designed to keep the logic in your flows simple:

  1. singleSlotResponse: Only returned if you have only one dimension record and a time duration that is exactly one slot long. This is just a base object (see below) so is simple to parse.

  2. singleDimensionResponse: Only returned if you have only one dimension record. This is a list of base objects (see below) in order of their start datetime.

  3. dimensionResponses: is always returned. This is a list of objects each with a dimensionId property and a slots property. The slots are the same as the singleDimensionResponse.

Base object

The base object that is returned has the following properties:

  • closed: The number of minutes the slot is closed.

  • occupied: The number of minutes the slot is occupied.

  • available: The number of minutes the slot is available.

  • occupiedPercentage: The percentage of the available time that is occupied.