Skip to content

Customer Groups & Discounts

Organize customers into groups with priority-based discount rules for rental and season bookings.

Ügyfél csoportok (/Club/Group)

Group Configuration

The Group table defines customer groups:

Column Type Description
Name string Group display name
Priority int Priority rank (higher = takes precedence)
Discount int Percentage discount on rental fees
SeasonDiscount int Percentage discount on season bookings

Note

The demo environment currently has 0 groups configured. Create groups via the admin interface to start using group-based discounts.

User-Group Assignment

The UserGroup table links users to groups with a unique constraint on (User_ID, Group_ID) preventing duplicate memberships.

A user can belong to multiple groups simultaneously.

Priority-Based Discount Resolution

When a user belongs to multiple groups, the system applies the discount from the group with the highest Priority value.

flowchart TD
    A[User has multiple groups] --> B[Sort groups by Priority DESC]
    B --> C[Select highest-priority group]
    C --> D[Apply that group's Discount %]

Warning

Ensure group priorities are set correctly. If two groups share the same priority, the discount resolution may be unpredictable.

Rental Fee Discount

The Discount percentage applies to the DiscountedRentalFee tier in the SportsFieldRent table. This reduces the base rental fee for all members of the group.

Season Discount

The SeasonDiscount percentage provides an additional discount for recurring/season bookings. Three system parameters control season discount eligibility:

Parameter Value Description
SeasonDiscountForOneOffReservations NO Season discount does NOT apply to one-off bookings
SeasonDiscountForShortRecurringReservations NO Season discount does NOT apply to short recurring
SeasonDiscountEligibility_Weeks 1 Minimum weeks of recurring booking for eligibility

Per-User Overrides

Two flags on the User table override group discount behavior:

  • User.SeasonDiscountEnabled — per-user toggle to enable/disable season discounts regardless of group membership
  • User.DiscountsDisabled — when set, all group discounts are disabled for this user

Tip

Use DiscountsDisabled for VIP arrangements where a custom price is agreed outside the standard group discount system.