medium complexity extracted Expense Approval Confidence: 100%
7
Components
106
Shared
0
User Stories
Yes
Analyzed

Description

Auto-Approval Rules allow organization administrators to configure threshold-based policies that automatically approve expense claims without requiring manual coordinator review. Administrators define rules based on parameters such as total amount, distance (kilometres), expense type, and the absence of receipt attachments. Claims that fall within all configured rule thresholds are approved instantly upon submission, while claims that exceed any threshold are routed to the manual approval queue. This mirrors the HLF requirement for automatic approval of claims under 50 km or without out-of-pocket expenses.

User Flow

Auto-Approval Rules user flow
Click to expand

Analysis

Business Value

A large share of expense submissions — particularly low-value travel claims — are routine and straightforward, yet they consume significant coordinator time when processed manually. HLF reported that 60–70% of peer mentor registrations have no reimbursement component, meaning coordinators spend effort on approvals that add no real oversight value. Automating the approval of low-risk claims dramatically reduces administrative overhead, accelerates reimbursement for peer mentors, and allows coordinators to focus their attention on complex or high-value submissions that genuinely require review. Auto-approval rules also reduce the risk of backlog buildup during busy periods, which directly impacts volunteer satisfaction and the organization's ability to maintain reporting accuracy.

Implementation Notes

Auto-approval rules are stored in a dedicated `auto_approval_rules` table per organization, with columns for `expense_type_id` (nullable for global rules), `max_amount`, `max_distance_km`, `requires_receipt`, and `enabled`. When an expense is submitted via the REST API, the save handler queries applicable rules for the organization and evaluates the claim synchronously before persisting to `expense_approvals`. Matching rules set status to `approved` immediately; non-matching claims are set to `pending`. Rule configuration is exposed as a Next.js admin page where Org Admins manage rules using a form-based UI. Feature flag `auto_approval_rules` gates the functionality per organization. All auto-approval decisions are written to `audit_logs` with a `source: 'auto'` field to distinguish from manual approvals for compliance auditing.

Components (113)

User Interface (2)

Service Layer (3)

Data Layer (2)

Shared Components

These components are reused across multiple features

Service Layer (34)

Data Layer (22)

Infrastructure (38)

infrastructure Keychain/Keystore Adapter low Shared infrastructure JWT Claims Extractor low Shared infrastructure Organization Labels Adapter low Shared infrastructure Keychain/Keystore Adapter low Shared infrastructure Auth API Client medium Shared infrastructure REST API Client medium Shared infrastructure WCAG Accessibility Adapter low Shared infrastructure Registration API Client low Shared infrastructure Accounting API Client high Shared infrastructure PDF Renderer Adapter medium Shared infrastructure File Share Adapter low Shared infrastructure FCM/APNs Adapter high Shared infrastructure Share Sheet Adapter low Shared infrastructure Share Plus Adapter low Shared infrastructure Platform Accessibility Bridge medium Shared infrastructure Semantics Override Adapter high Shared infrastructure URL Launcher Adapter low Shared infrastructure Markdown Content Renderer low Shared infrastructure Network Connectivity Monitor low Shared infrastructure Expense Receipt Storage Adapter low Shared infrastructure Audit Log Writer low Shared infrastructure Feature Flag Checker low Shared infrastructure Logo Upload Adapter low Shared infrastructure Terminology Constants Registry low Shared infrastructure Feature Flag Cache Adapter low Shared infrastructure Org Scope JWT Resolver medium Shared infrastructure Association Audit Logger low Shared infrastructure Token Blocklist medium Shared infrastructure Analytics Tracker low Shared infrastructure SEO Metadata Config low Shared infrastructure Analytics Tracker low Shared infrastructure Analytics Tracker low Shared infrastructure Sales Analytics Tracker low Shared infrastructure Email Provider Adapter low Shared infrastructure Terms of Service Content Provider low Shared infrastructure Legal PDF Asset Provider low Shared infrastructure Consent-Gated Script Loader low Shared infrastructure Legal Page Layout low Shared

User Stories

No user stories have been generated for this feature yet.