Booking Lifecycle
Every booking in Vivin has a computed lifecycle status. The platform does not use a pending booking status, and normal timeline status changes are driven by booking dates plus cancellation state.
Status Overview
Product Value (bookingStatus) | UI Label (where applicable) | Meaning |
|---|---|---|
upcoming | Upcoming | Booking start/check-in date is in the future and the booking is not canceled |
current | Ongoing | Booking is active today (between start/check-in and end/check-out dates) |
ended | Ended | Booking end/check-out date has already passed |
canceled | Canceled | Booking was canceled (cancellation type set) |
How Status Is Computed
Status is computed in this order:
- If the booking has a cancellation type, status is
canceled. - Otherwise, if the configured end date is before today, status is
ended. - Otherwise, if the configured start date is after today, status is
upcoming. - Otherwise, status is
current.
Date basis is account-configurable (contract dates or move dates), so "start/end" may come from contract dates or check-in/check-out dates depending on your account settings.
Status Flow
upcoming -> current -> ended
\ \ \
\ \ \
+-------> canceled
Cancellation can be applied from any non-canceled state. Once canceled, status remains canceled.
What Triggers Status Changes
upcoming -> current
Occurs automatically when the relevant start date is reached.
current -> ended
Occurs automatically when the relevant end date passes.
Any non-canceled status -> canceled
Occurs when a cancellation is processed (sets cancellation type and applies cancellation rules).
Key Rules
Summary
- Timeline statuses are computed, not manually advanced. You do not manually set
upcoming,current, orended. - Cancellation is an explicit action. A booking becomes
canceledonly when the cancellation workflow is executed. - No
pendingbooking status exists in the implemented model. - Payment schedules are created at booking creation. See Payment Allocation for details.
Related
- Bookings Module — Full module documentation
- Processing a New Booking — Step-by-step workflow
- Payment Allocation — How payments are tracked through the lifecycle