Busflow Docs

Internal documentation portal

Skip to content

Backoffice User Journeys

This document outlines the high-level workflows and journeys that operator staff (Admins, Dispatchers) follow within the backoffice application.

1. Creating a Tour Product

Actor: Admin / Product Manager

  1. Admin logs into the Backoffice app.
  2. Navigates to Catalog -> Tour Templates.
  3. Creates a new Draft template, defining routes, pricing rules, and capacity rules.
  4. System Action: Saves the TourTemplate and associated value objects.
  5. Edge Case: If the template references a deleted/inactive BoardingPoint, the system blocks the state change to ACTIVE.

2. Dispatching a Departure

Actor: Dispatcher

  1. Dispatcher opens the Dispatch Board (Gantt chart view).
  2. Selects an upcoming TourDeparture.
  3. Assigns an available Vehicle and CrewMember (Driver) to the departure legs.
  4. System Action: The system validates compliance (e.g., driver rest hours, vehicle capacity).
  5. Edge Case / Error Path: If the assignment violates EU driving regulations or double-books a driver, the system shows a hard warning block, preventing the save unless an Admin provides an override.

3. Managing Bookings & Refunds

Actor: Dispatcher / Support

  1. A passenger requests a cancellation.
  2. Dispatcher finds the booking in the CRM / Bookings view.
  3. Clicks Cancel & Refund.
  4. System Action: Processes the cancellation in the Backoffice DB, then acts as a Saga coordinator to trigger the refund API call against the Mollie payment gateway (Commerce context).
  5. Edge Case: If the Mollie API call fails or times out, the system marks the refund as PENDING_RETRY and alerts the Dispatcher to verify the gateway manually.

4. End-of-Trip Reconciliation

Actor: Admin / Accountant

  1. A trip concludes. Driver submits cash-box receipts.
  2. Admin goes to Accounting -> Ledger.
  3. Compares the submitted receipts against expected POS sales from the CostingSheet.
  4. System Action: Approves the transaction and locks the CostingSheet.
  5. Edge Case: If there is a cash discrepancy, the Admin can log an Expense/Adjustment record against the trip margin before final locking.

Internal documentation — Busflow