masaruk Logo

Business Rules & Policies

Operational policies governing the MASARUK platform

Purpose

This document defines all business rules and operational policies governing:

  • Trip creation and visibility
  • Booking flow
  • Payment and refund behavior
  • Rating rules
  • Ad campaigns
  • Financial settlement
  • Resource usage (Buses, Hotels, Rest stops)

Trip Rules

2.1 Trip Visibility Rules

  • Trip must be Active to appear in: Active
    • B2C Web listings
    • B2C Mobile listings
    • Ad campaign creation
  • Inactive trips are hidden from B2C users Inactive
  • Cancelled trips cannot accept bookings Cancelled
  • Completed trips are auto-derived when end_date < today

2.2 Trip Creation Rules

Required fields (as observed in UI):

Trip nameTrip typeNumber of nights/daysCities visitedDeparture/return datesDeparture/arrival cityPrice + currencyMax bookingsProgram detailsLinked hotelTransportationRest stops (optional)Trip images
Info
System does not auto-calculate duration from dates; Days/Nights are entered manually.

2.3 Capacity Rules

  • Providers set 'Max bookings'
  • Number of bookings cannot exceed this limit
  • Full trips become 'Unavailable for booking' automatically (B2C UI formatting)

Resource Rules (Hotels – Buses – Rest Stops)

3.1 Hotel Rules

  • Hotels must be Active to appear in trip creation Enabled
  • Rating supports exactly 5, 6, 7 stars as shown in UI
  • Hotel location must include: Address, City, Full address, Google Maps link

3.2 Bus Rules

  • Bus must be Active to be assignable to a trip Active
  • If Under Maintenance → cannot be used Under Maintenance
  • Each bus is linked to exactly one primary driver

3.3 Rest Stop Rules

  • Rest stop must be Active to appear in selection modals Enabled
  • Each rest stop must specify: Name, City, Contact info, Facilities list (checkbox system), Operating hours, Status

Booking Rules

4.1 Preconditions for Booking

  • Trip status must be: Active Active
  • User must provide all required traveller data:
    • First name
    • Last name
    • ID/Iqama number
    • Gender
    • Phone number
    • Date of birth
  • Contact info required: Email, Emergency number
  • Special requests field is optional

4.2 Booking Creation

  • Booking starts in Pending status Pending
  • Transitions to Confirmed only after payment completion Confirmed

4.3 Booking Display Rules (B2C)

Derived UI LabelLogic
Upcomingstart_date > today
Completedend_date < today
CancelledCANCELLED status

4.4 Cancellation Rules

  • User or admin can cancel only if refund policy allows
  • Cancellation triggers:
    • Booking status → CANCELLED
    • Payment → may become REFUNDED
    • Financial record updated accordingly

Payment Rules

5.1 Supported Payment Methods (from UI)

Credit Card / MadaSTC PaySADADApple Pay
Warning
Tabby / Tamara logos appear but no explicit flow → NOT assumed unless specified later.

5.2 Payment Flow Rules

  • Payment must be completed in the same flow
  • No 'save booking without payment' behavior
  • Payment fields must match UI: Card number, Expiry date, CVV, Name as written on card

5.3 VAT Rules

  • Two VAT values appear in system:
    • 15% in booking flow
    • 20% in ad campaigns
  • Discrepancy documented in open questions file
  • VAT is included in displayed totals in all flows

Refund Policy Rules

Refund Levels

ConditionRefund %
Before 30 days90%
Before 15 days70%
Before 7 days50%
Less than 7 days0%

Refund Behavior

  • Refund affects:
    • PaymentTransaction → Refunded
    • FinancialRecord → Refunded
    • Booking → Cancelled
  • Refund does not auto-reopen trip seats unless specified (no evidence in current UI)

Rating Rules

7.1 Eligibility

  • Only Completed bookings can submit ratings Completed
  • Rating is auto-triggered after trip end

7.2 Rating Structure

Rating contains:

  1. Overall rating (required)
  2. Detailed ratings:
    • Program
    • Hotel
    • Bus
    • Driver
    • Rest stops
  3. Optional text notes

7.3 Rating Constraints

  • One rating per booking
  • Detailed section is optional ('Skip')
  • All star ratings are integers (1–5)

Advertising Campaign Rules

8.1 Preconditions

  • Trip must be Active Active
  • Payment required before campaign becomes active
  • Budget is set via UI slider

8.2 Campaign Lifecycle Logic

  • Scheduled Scheduled → Start date not reached
  • Active Active → Now between start_date and end_date
  • Ended Ended → end_date < today
  • Paused Paused → Manual stop

8.3 VAT

VAT shows as 20% in ad campaigns UI.

Warning
Documented discrepancy exists (see open questions).

Financial & Settlement Rules

9.1 Components

Each financial record contains:

Total amountPlatform commissionDateNet amountStatus

Statuses: In Balance / Transferred / Refunded

9.2 Platform Commission

  • Appears in UI as separate column ('Platform commission')
  • Commission percentage is not specified in UI → remains TBD

9.3 Settlement Logic

  • In Balance In Balance → Funds not yet disbursed
  • Transferred Transferred → Disbursement completed
  • Refunded Refunded → Refund issued

9.4 Export

Export action generates system message:

"File exported successfully to your files"

Authentication & Account Rules

10.1 Signup Rules

Required fields:

Full nameEmailPhone numberPasswordConfirm password

Social login is optional

10.2 Login Rules

Warning
UI currently shows 'Full Name' for login → documented as UI inconsistency

Expected login data (pending confirmation):

  • Email or phone number
  • Password

Cross-Module Policies

B2C Privacy (PRIV-01)

No Provider Direct Contact in B2C

  • Provider phone/email/WhatsApp: FORBIDDEN
  • Provider social links: FORBIDDEN
  • All support → Platform channels only
  • SSOT: business-rules-and-policies.md §11

Booking → Financial

  • Successful payment creates financial record
  • Cancellation may create REFUNDED record

Trip → B2C Listing

  • Only ACTIVE trips appear on homepage
  • And in trip lists and categories

Trip → Ads

  • Cannot launch campaign for INACTIVE or CANCELLED trips

Booking → Rating

  • Only COMPLETED bookings open rating modal

Validation Rules

Info
Specific validation rules (regex patterns, file size limits, password complexity) will be defined during implementation. The following are general guidelines based on UI observations.

12.1 User Input Validation (General)

FieldExpected Behavior
EmailMust be valid email format
Phone numberMust be valid Saudi phone number
ID/Iqama numberMust be valid Saudi ID format
PasswordMust meet security requirements (TBD)
Date of birthMust be valid date in the past

12.2 Business Validation (Observed in UI)

RuleValidation
Trip capacityCannot book if trip is full
Trip availabilityOnly ACTIVE trips can be booked
Rating eligibilityOnly COMPLETED bookings can be rated
Campaign tripCampaign requires ACTIVE trip