Use this action to retrieve occupancy data for one or more dimension records (such as Resources) from a flow. Returns the number of available, occupied, and closed minutes per time bucket, broken down by a configurable granularity level (hours, days, weeks, or months).
Input variables
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
startOfRange |
DateTime |
Yes |
The start of the range. Rounded down to the nearest start of the specified level (e.g. start of day, start of week). |
|
endOfRange |
DateTime |
Yes |
The end of the range. Rounded up to the nearest end of the specified level (e.g. end of day, end of week). |
|
level |
String |
Yes |
The time granularity for results. Must be one of: HOURS, DAYS, WEEKS, MONTHS. |
|
dimensionId |
Id |
One of* |
The ID of a single dimension record to get occupancy for. |
|
dimensionIds |
List<Id> |
One of* |
A list of dimension record IDs to get occupancy for. |
|
dimensionSObject |
SObject |
One of* |
A single dimension record to get occupancy for. |
|
dimensionSObjects |
List<SObject> |
One of* |
A list of dimension records to get occupancy for. |
* Exactly one of the dimension specifier fields must be populated.
Output variables
|
Name |
Type |
Description |
|---|---|---|
|
singleSlotResponse |
OccupancyFlowSlot |
Convenience output populated when exactly one dimension and one time bucket were returned. Null otherwise. |
|
singleDimensionResponse |
List<OccupancyFlowSlot> |
Convenience output populated when exactly one dimension was requested. Contains all time-bucket slots for that dimension. Null if multiple dimensions were requested. |
|
dimensionResponses |
List<OccupancyFlowDimension> |
Always populated. One entry per requested dimension, each containing a dimensionId and a list of slots. |
OccupancyFlowDimension fields
|
Name |
Type |
Description |
|---|---|---|
|
dimensionId |
Id |
The ID of the dimension record these slots belong to. |
|
slots |
List<OccupancyFlowSlot> |
The time-bucket slots for this dimension, in chronological order. |
OccupancyFlowSlot fields
|
Name |
Type |
Description |
|---|---|---|
|
available |
Decimal |
The number of minutes the dimension record is available (open) in this time bucket. |
|
occupied |
Decimal |
The number of minutes the dimension record is occupied by reservations in this time bucket. |
|
closed |
Decimal |
The number of minutes the dimension record is closed (outside availability) in this time bucket. |
|
occupiedPercentage |
Decimal |
The fraction of available time that is occupied (occupied / available). Between 0.0 and 1.0. Returns 1.0 when available is 0. |