Budget Resolution
How the system determines which budget applies to a user
Budget Resolution
When a user books travel, the system must determine which budget (if any) applies to them. This process is called budget resolution and follows a clear priority hierarchy.
Resolution Hierarchy
The system checks for budgets in this order:
| Priority | Source | Description |
|---|---|---|
| 1 (Highest) | User Override | Budget assigned directly to the specific user |
| 2 | Role Assignment | Budget assigned to the user's company role |
| 3 (Lowest) | None | No budget applies - spending is unrestricted |
User-Level Assignments
User-level assignments are direct assignments of a budget to a specific user, overriding any role-based assignment.
Characteristics
- Highest priority - Always takes precedence over role assignments
- Time-bounded - Can have optional effective from/until dates
- One budget per user - A user can only have one direct budget assignment
- Override mechanism - Designed for exceptions to role-based budgets
Time Bounds
User assignments can have optional date ranges:
| Field | Description | If Not Set |
|---|---|---|
| Effective From | When assignment starts | Immediately effective |
| Effective Until | When assignment ends | Never expires |
Example Timeline:
- January 1: Assignment starts (effectiveFrom)
- January - February: Assignment is active
- March 1: Assignment ends (effectiveUntil)
- March onward: User falls back to their role's budget
Example: Temporary Budget Override
Scenario: Alice normally has a $3,000/month budget via her "Manager" role. During Q1, she's leading a high-travel project and needs $10,000/month.
Solution: Create a user-level assignment:
- User: Alice
- Budget: "Project Lead Q1 Budget" ($10,000/month)
- Effective From: January 1
- Effective Until: March 31
Result:
- Jan-Mar: Alice uses the $10,000 budget
- Apr+: Assignment expires, Alice uses role budget ($3,000)
Role-Level Assignments
Role-level assignments apply a budget to all users with a specific company role.
Characteristics
- Bulk application - One assignment covers many users
- Lower priority - Overridden by user-level assignments
- No time bounds - Active as long as user has the role
- One budget per role - A role can only have one budget assignment
How Role Resolution Works
- System finds the user's role in their company
- Checks if that role has a budget assignment
- Verifies the assigned budget is active (not deleted or deactivated)
- If all checks pass, the role's budget applies to the user
Example: Role-Based Budgets
Company Role Structure:
| Role | Budget | Amount |
|---|---|---|
| Member | Basic Travel | $2,000/month |
| Manager | Manager Travel | $5,000/month |
| Executive | Executive Travel | $15,000/month |
User Assignments:
| User | Role | Effective Budget |
|---|---|---|
| Alice | Manager | Manager Travel ($5,000) |
| Bob | Member | Basic Travel ($2,000) |
| Carol | Executive | Executive Travel ($15,000) |
No Budget (Unrestricted)
If a user has neither a user-level nor role-level budget assignment, they have no budget applied.
Behavior with No Budget
- No spending limits enforced
- No approval required for budget reasons
- Spending still tracked in general order history
- Policy rules may still apply (separate from budget)
Example: No Budget Scenario
Company Setup:
- Role "Contractor" has no budget assigned
- User "Dave" is a Contractor with no user-level assignment
When Dave books:
- System checks for user-level assignment → None found
- System checks role-level assignment → "Contractor" role has no budget
- Result: No budget applies, booking proceeds without budget restrictions
Resolution Result
The resolution returns information including:
| Field | Description |
|---|---|
| hasBudget | Whether a budget applies to this user |
| source | Where the budget came from: USER, ROLE, or NONE |
| budget | The budget details (name, amount, currency) |
| roleId | The role ID (if source is ROLE) |
| effectiveFrom/Until | Assignment dates (if source is USER) |
Budget Preview for Users
Administrators can preview which budget applies to any user in the dashboard. The preview shows:
- Source: Whether the budget comes from a user override or role assignment
- Budget name and amount: The active budget details
- Effective dates: When the assignment is valid (for user overrides)
- Current period status: Allocated, spent, pending, and remaining amounts
This helps verify that budget assignments are correct before users book travel.
Common Resolution Scenarios
Scenario 1: User with Both Assignments
Setup:
- Alice has user-level budget "VIP Travel" ($20,000)
- Alice's role "Manager" has budget "Manager Travel" ($5,000)
Resolution: User-level wins → Alice uses "VIP Travel" ($20,000)
Scenario 2: Expired User Assignment
Setup:
- Bob had user-level budget ending December 31
- Bob's role "Manager" has budget "Manager Travel" ($5,000)
- Current date: January 15
Resolution: User assignment expired → Bob uses role budget ($5,000)
Scenario 3: Inactive Budget
Setup:
- Carol's role has budget "Old Budget" (isActive: false)
- No user-level assignment
Resolution: Role budget is inactive → Carol has no budget
Scenario 4: New Employee
Setup:
- Dave just joined, role "Member"
- Role "Member" has no budget assigned
- No user-level assignment
Resolution: No budget found → Dave has unrestricted spending
Best Practices
Use Role Assignments for Defaults
- Set up role-based budgets as your baseline
- Most users will use these defaults
- Easier to manage than individual assignments
Use User Assignments for Exceptions
- Temporary increases for projects
- Reduced budgets for probationary periods
- VIP allocations for executives
- Always set effectiveUntil if temporary
Keep Role Hierarchy Clean
- One budget per role
- Roles should have clear spending levels
- Consider: Member < Manager < Executive
Regular Cleanup
- Review expired user assignments
- Verify inactive budgets aren't assigned
- Audit users with no budget (intended?)
Related Topics
- Assignments - How to create assignments
- Enforcement Modes - What happens after resolution