Overview
AllSquads includes a scheduling conflict engine that prevents double-booking of coaches and courts. The engine runs automatically when a new booking, session, or court hire reservation is created.
What the Conflict Engine Checks
Coach conflicts
A coach conflict occurs when a coach is assigned to two overlapping sessions simultaneously. The engine checks:
- All class sessions assigned to the coach on the same date
- Private lesson bookings for the coach
- Court hire sessions where the coach is assigned
Court conflicts
A court conflict occurs when a court is assigned to two overlapping bookings. The engine checks:
- Class sessions assigned to that court
- Court hire bookings for that court
- Manual availability blocks placed on the court
Conflict Outcomes
Hard block
A hard conflict (e.g., a court is definitively double-booked) prevents the booking from being created. The user receives an error message and the booking does not proceed.
Soft warning (partial conflict)
A partial conflict (e.g., a coach is available but their assigned court is not, or vice versa) is flagged as a warning. Club admins are notified of the conflict and can choose to resolve it or proceed with a manual override.
Coach Availability Windows
What are availability windows?
Availability windows define the times a coach is available for private lesson bookings. Coaches set recurring windows (e.g., Mon–Fri 8am–12pm). Private lessons can only be requested within these windows.
Manual blocks
Coaches can place manual blocks on specific dates and times (e.g., holidays, personal appointments). Manual blocks override availability windows and remove that time from bookable slots.
Class session auto-blocking
When a coach creates a class session, that time is automatically blocked from private lesson availability. A coach cannot be double-booked between a class session and a private lesson.
Court Booking Flow
The court booking process follows a structured flow to minimise conflicts:
- Date selection — Player selects a date
- Time slot selection — Available slots for that date are shown. Unavailable slots (blocked, booked, or outside availability hours) are hidden
- Duration selection — Player selects duration in 30-minute increments. The system confirms the full requested duration is available
- Auto-assign — If the club has enabled auto-assignment, the system selects the best available court automatically. Otherwise the player selects a court
- Conflict check — Final conflict check runs before payment
- Confirmation — Booking is confirmed and the slot is locked
Private Lesson Conflict Handling
Private lessons require both the coach and a court to be simultaneously available.
Booking check sequence:
- Player selects coach and requested time
- System checks coach availability windows — is the coach marked available?
- System checks coach for existing sessions or private lessons at that time
- System checks court availability — is at least one court free for the requested duration?
- If all checks pass: booking proceeds to payment
- If coach is free but no court is available: player is notified that no courts are available at that time and prompted to select an alternative
- If coach is unavailable: player is notified and prompted to select a different time
Recurring Class Conflicts
When creating a recurring class, the conflict engine checks all future sessions against existing court and coach schedules. If conflicts are found on specific dates, those dates are flagged for the coach or club admin to resolve before publishing.
Holiday Camp Conflicts
A holiday camp runs one session per camp day on the assigned court. Before a camp is saved or published, the engine checks the court on every camp day. If the court is already in use on any day, the save is blocked with a message naming that day, the occupying class, and its time (for example: "Mon 20 Jul — occupied by Red Ball 10:00–11:00"). Pick another court or adjust the camp time, then save again. No partial camp is created — either all days are scheduled or the save is blocked.
Resolving Conflicts
Reassign the court
If a class session and a court hire booking conflict, reassign the class to a different court (if available) in the class session settings.
Adjust timing
Modify the class session start time or duration to avoid overlap.
Cancel the conflicting booking
If a court hire booking conflicts with a class, the club admin can cancel the court hire booking (with player notification and full credit refund) to give priority to the class.
Manual override (partial conflicts only)
Club admins can acknowledge a partial conflict warning and proceed. This is logged in the action audit trail.