Flight Rules
Configure flight policy rules with routes, budgets, and cabin classes
Flight Rules
Flight rules define the constraints for flight bookings. Each rule can specify routes, budget limits, allowed cabin classes, and other restrictions.
Rule Components
A flight rule consists of:
- Route matching - Which flights this rule applies to
- Budget - Maximum price per person (with optional duration tiers)
- Cabin classes - Which classes are allowed (with optional duration tiers)
- Constraints - Stops, advance booking requirements
- Action override - Optional override for this specific rule
Route Matching
Rules match flights based on origin and destination:
| Match Type | Example | Specificity |
|---|---|---|
| City to City | Baghdad → Dubai | Most specific |
| Country to Country | Iraq → UAE | Medium |
| Domestic in Country | Any domestic Iraq flight | Medium |
| International | Any international flight | Less specific |
| All Flights | Catch-all | Least specific |
Priority
More specific rules take precedence:
1. Baghdad → Dubai (Priority 10)
2. Iraq → UAE (Priority 20)
3. All international flights (Priority 75)
4. All flights (Priority 100)Lower priority numbers = higher precedence. The system uses the first matching rule.
Budget Configuration
Base Budget
Set a maximum price per person for the route:
- Amount: Maximum allowed (e.g., 500)
- Currency: USD, EUR, GBP, IQD, SAR, AED
Duration-Based Budget Tiers
For more granular control, set different budgets based on flight duration:
| Flight Duration | Max Budget |
|---|---|
| 0-3 hours | $450 |
| 3-7 hours | $650 |
| 7+ hours | $1,000 |
Example use case: Allow higher budgets for long-haul flights where prices are naturally higher.
How it works:
- System calculates flight duration
- Matches to the appropriate tier
- Uses that tier's budget for evaluation
If no tier matches (gaps in ranges), the base budget is used.
Cabin Class Configuration
Base Cabin Classes
Select which cabin classes are allowed:
- Economy
- Premium Economy
- Business
- First Class
Users can only book allowed classes. Booking a non-allowed class triggers a violation.
Duration-Based Cabin Tiers
Allow cabin upgrades for longer flights:
| Flight Duration | Allowed Classes |
|---|---|
| 0-5 hours | Economy |
| 5-8 hours | Economy, Premium Economy |
| 8+ hours | Economy, Premium Economy, Business |
Example use case: Allow business class only for very long flights where comfort matters more.
How it works:
- System calculates flight duration
- Matches to the appropriate tier
- Uses that tier's allowed classes
Additional Constraints
Maximum Stops
Limit the number of connections:
| Setting | Meaning |
|---|---|
| No limit | Any number of stops |
| 0 | Direct flights only |
| 1 | Maximum 1 stop |
| 2 | Maximum 2 stops |
Advance Booking
Require bookings to be made a minimum number of days in advance:
- Example: 7 days advance booking
- Violation: Booking 3 days before departure
- Use case: Encourage early booking for better prices
Action Override
By default, violations use the policy's default action. For specific rules, you can override:
Example:
- Policy default:
REQUIRE_APPROVAL - First Class rule: Override to
BLOCK
This means:
- Most violations → Require approval
- First Class bookings → Blocked entirely
Example Rules
Domestic Economy
Route: All domestic flights in Iraq
Budget: 300 USD
Cabin: Economy only
Stops: 0 (direct only)
Advance: 3 days
Action: (use policy default)International Standard
Route: All international flights
Budget: 800 USD
Tiers: 0-5h: $600, 5-10h: $800, 10+h: $1200
Cabin: Economy, Premium Economy
Tiers: 0-7h: Economy, 7+h: Economy/Premium
Stops: 1 maximum
Advance: 7 days
Action: (use policy default)First Class Block
Route: All flights
Budget: (any)
Cabin: First Class only
Action: BLOCK (override)This rule catches any First Class booking and blocks it, regardless of route or price.
Creating Effective Rules
Start Specific, Then Generalize
- Create specific rules for common routes (Baghdad → Dubai)
- Create country-level rules for regions (Iraq → Gulf)
- Create catch-all rules as fallback (All international)
Use Duration Tiers for Long-Haul
Long flights naturally cost more. Duration tiers prevent false violations:
- Without tiers: 12-hour flight violates $800 budget
- With tiers: 12-hour flight allowed up to $1,200
Test Your Rules
Use the policy preview feature to test how rules apply:
- Go to Policies → Assignments
- Select a user
- Preview which policy applies
- Check rule matching for sample bookings