Analyze booking gaps
booking_gap_analyzeIdentifies why your booking calendar is underutilized by separating sellable idle time from unsellable gaps caused by turnover and slot alignment.
Instructions
Measure the shape of idle time in a time-based booking calendar, not just the utilization rate.
Two venues can both sit at 33% utilization while one has its idle time in long sellable blocks and the other has it scattered into slivers that can never be sold. This tool separates the two.
It classifies every gap between bookings as either:
sellable: long enough to book after turnover time and start-grid alignment are subtracted
structural dead time: too short to ever be sold under the current settings
Args:
bookings or bookingsCsv (required, exactly one)
openingHours (required)
minBookingMinutes, slotGranularityMinutes, turnoverMinutes: the settings that decide sellability
periodStart / periodEnd: analysis window (defaults to the span of the data)
resources: include resources that had no bookings
hourlyRate / currency: optional, expresses dead time as an amount
Returns a text report with utilization, sellable vs dead breakdown, fragmentation rate, a gap-length histogram, and a per-resource table.
Scope: exclusive resources only (rooms, studios, meeting rooms, treatment beds). Pooled shared seating, where any free seat can absorb a booking, uses a different model and is not supported.
Use when: "why is my utilization stuck", "how much of my empty time is actually sellable", "is my calendar fragmented". Don't use when: you want a recommended configuration — use booking_gap_simulate to compare options and decide yourself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bookings | No | Bookings as structured objects. Provide either this or bookingsCsv. | |
| currency | No | Currency symbol prefix, e.g. "¥". | |
| periodEnd | No | Last date to analyse (YYYY-MM-DD). Defaults to the latest booking. | |
| resources | No | Resources to include even when they have no bookings in the period. | |
| hourlyRate | No | Optional hourly price, used to express dead time as an amount. No default. | |
| bookingsCsv | No | Bookings as pasted CSV or TSV with a header row. Column names are matched in English and Japanese (start/end/resource/date/status, 開始時刻/終了時刻/部屋/日付/ステータス). A separate date column plus HH:mm times is supported. | |
| periodStart | No | First date to analyse (YYYY-MM-DD). Defaults to the earliest booking. | |
| openingHours | Yes | Opening hours. Use "default" for the usual day and override individual weekdays as needed, e.g. {"default": [["09:00","22:00"]], "sun": [["10:00","18:00"]]}. Use "24:00" to close at midnight. | |
| timezoneOffset | No | Venue timezone offset, used only for inputs that carry an explicit offset or "Z". | +09:00 |
| turnoverMinutes | No | Cleaning or changeover time required between two bookings. | |
| minBookingMinutes | No | Shortest booking a customer is allowed to make. | |
| slotGranularityMinutes | No | Allowed booking start interval, measured from midnight (30 means :00 and :30). |