Skip to main content

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
upcomingUpcomingBooking start/check-in date is in the future and the booking is not canceled
currentOngoingBooking is active today (between start/check-in and end/check-out dates)
endedEndedBooking end/check-out date has already passed
canceledCanceledBooking was canceled (cancellation type set)

How Status Is Computed

Status is computed in this order:

  1. If the booking has a cancellation type, status is canceled.
  2. Otherwise, if the configured end date is before today, status is ended.
  3. Otherwise, if the configured start date is after today, status is upcoming.
  4. 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
  1. Timeline statuses are computed, not manually advanced. You do not manually set upcoming, current, or ended.
  2. Cancellation is an explicit action. A booking becomes canceled only when the cancellation workflow is executed.
  3. No pending booking status exists in the implemented model.
  4. Payment schedules are created at booking creation. See Payment Allocation for details.