Skip to main content

Expense-to-Pay Workflow

Metadata

FieldValue
PhasePhase 3: Aesthetic
FWCR CategoryExpense-to-Pay
OwnerProduct Team
StatusPlanned
Last UpdatedMay 2026

Overview

This workflow handles employee expense submissions, multi-tier approval routing, AI-powered invoice capture, and payment execution. It covers the full P2P cycle from expense creation to cash outflow.

Goal: Achieve >65% FWCR for Expense-to-Pay by end of Phase 3.


Actors

RoleDescription
EmployeeSubmits expense reports with receipts
ManagerApproves expenses based on policy
FinanceReviews and processes payments
SystemRoutes approvals, posts entries, executes payments
AIExtracts data from receipts, validates against policy
ApproverCFO or delegated authority for high-value expenses

Preconditions

  • Employee master exists with department and cost center
  • Expense policy configured (limits, categories, approval thresholds)
  • Bank account configured for payment runs
  • SADAD integration configured for vendor payments
  • AI OCR service configured for receipt processing

Postconditions

  • Expense approved and posted to GL
  • Payment instruction created
  • Bank transaction reconciled
  • Audit trail captured
  • Employee notified of payment

User Flow

Happy Path

┌─────────────────────────────────────────────────────────────────────────────┐
│ EXPENSE-TO-PAY WORKFLOW │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ [Employee] │
│ │ │
│ ▼ │
│ 1. Submit Expense Report │
│ │ │
│ ▼ │
│ 2. Attach Receipt(s) ──▶ [AI OCR Processing] │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ AI OCR │ │
│ │ • Vendor name extracted │ │
│ │ • Amount extracted │ │
│ │ • VAT number verified │ │
│ │ • Date normalized │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ 3. AI Drafts Purchase Invoice from Receipt │
│ │ │
│ ▼ │
│ 4. Employee Reviews & Submits │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ APPROVAL ROUTING │ │
│ │ ┌─────────────────────────────────────────────┐ │ │
│ │ │ Amount < SAR 1,000 ──▶ Manager approval │ │ │
│ │ │ Amount < SAR 10,000 ──▶ Dept Head │ │ │
│ │ │ Amount >= SAR 10,000 ──▶ CFO │ │ │
│ │ └─────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ 5. Approver Reviews & Approves │
│ │ │
│ ▼ │
│ 6. System Posts Journal Entry │
│ │ │
│ ▼ │
│ 7. Payment Run Generated │
│ │ │
│ ▼ │
│ 8. Bank Payment Executed │
│ │ │
│ ▼ │
│ 9. Bank Reconciliation │
│ │ │
│ ▼ │
│ 10. COMPLETE │
│ │
└─────────────────────────────────────────────────────────────────────────────┘

Step-by-Step

StepActorActionSystem Response
1EmployeeCreates expense reportInitializes with employee, dept, date
2EmployeeUploads receipt images/PDFsAI OCR begins processing
3AIExtracts vendor, amount, date, VATAuto-populates expense fields
4EmployeeReviews AI extraction, corrects if neededShows confidence scores
5EmployeeAssigns expense categoryValidates against policy
6EmployeeSubmits expense reportTriggers approval routing
7SystemRoutes to appropriate approverSends notification
8ApproverReviews expense detailsShows policy compliance status
9ApproverApproves or rejectsFeedback captured for rejections
10SystemPosts to expense accountCreates journal entry
11FinanceIncludes in payment runBatch payment file generated
12SystemExecutes bank paymentSADAD file or direct transfer
13SystemAuto-reconciles on bank feedMarks expense as paid

Expense Categories & Policies

CategoryLimitApproval ThresholdReimbursement
TravelAs per policy> SAR 500Within 30 days
MealsSAR 150/day> SAR 300Within 30 days
Office SuppliesSAR 500/month> SAR 200Monthly batch
Client EntertainmentSAR 1,000/event> SAR 500Within 30 days
TrainingActual cost> SAR 1,000On approval
EquipmentActual cost> SAR 500On approval

Error Scenarios

ScenarioHandling
OCR fails to extract dataPrompt user to enter manually, flag for review
Receipt exceeds policy limitShow warning, require justification or escalation
Missing receipt for > SAR 100Reject with policy citation
Duplicate expense detectedHighlight similar expenses, require confirmation
Approval timeout (>48h)Auto-escalate to next level
Budget exceeded for categoryBlock submission, notify manager

Approval Matrix

Amount RangeApproverSLA
SAR 0 - 1,000Direct Manager24 hours
SAR 1,001 - 5,000Department Head24 hours
SAR 5,001 - 10,000Finance Manager48 hours
SAR 10,001 - 50,000CFO72 hours
SAR 50,000+CEO5 business days

Acceptance Criteria

#CriteriaTest Scenario
1AI OCR extracts >95% of receipt dataGiven 100 receipts, When processed, Then >95 accurate
2Approval routing follows matrixGiven expense >threshold, When submitted, Then routed correctly
3Payment executes within 3 days of approvalGiven approved expense, When in batch, Then paid within 3 days
4GL entry matches receipt amountGiven approved expense, When posted, Then debits match
5Bank reconciliation auto-matchesGiven payment executed, When bank feed received, Then auto-reconciled
6Audit trail completeGiven any action, When logged, Then includes user, time, IP

Compliance Requirements

RequirementImplementation
PDPLReceipt images stored with access controls, retention policy
VATInput VAT extracted and validated against vendor registration
AuditImmutable log of all approvals, changes, payments
Expense PolicyConfigurable rules, violations flagged
SADADPayment file format per SAMA requirements

Technical Notes

ComponentImplementation
FrontendMobile-first expense form, receipt camera capture
API GatewayRequest validation, policy engine
ERPNextExpense Claim, Payment Entry, Journal Entry
Custom Appbayancore_erp for AI OCR integration, approval routing
AIGPT-4o Vision for receipt extraction, local model for privacy
OCRLocal model on OCI for Arabic/English receipts
BankingSADAD integration via middleware

Metrics

MetricTargetMeasurement
FWCR: Expense-to-Pay>65%(Approved without rework) / (Total submitted)
Approval Cycle Timeunder 4 hoursSubmission to approval
AI OCR Accuracy>95%Correct extractions / Total receipts
Payment Cycle Timeunder 3 daysApproval to bank payment
Exception Rateunder 10%Expenses requiring manual intervention

Dependencies

DependencyStatusNotes
ERPNext Expense moduleReadyBuilt-in
AI OCR servicePlannedRequires training on Arabic receipts
SADAD integrationPlannedPhase 3 deliverable
Mobile appPlannedPhase 3 deliverable
Approval workflow enginePlannedBuilt-in to ERPNext
Bank feed integrationPlannedOCI Banking API

DocumentLink
OS Blueprint../os-blueprint
PO-to-Payment Workflow./03-po-to-payment
AI Architecture../../04-ai-features/rag-architecture
Technical Spec../../05-technical-spec/sad
Phase 3 Release../../08-release/phase-3-aesthetic

Document Status

Status: ✅ PLANNED Last Updated: May 2026 Next Review: Pre-Phase 3 kickoff