Hamza Fayz
Home/ Case Studies/ Invoice Intake → Expense Journal
Case · 07·Supporting·App workflow

From a phone capture to a posted journal line.

Employee photographs the invoice in the app. OCR extracts the fields. User enriches the few dimensions that are never on paper. A rule catalog validates the record. Approval routes by amount and role. A journal line is drafted — accounts, tax, project, WBS, cost center, vendor — ready for the ERP. One workflow. No forwarded emails.

CaptureMobile · desktop
ExtractionOCR + confidence
Validation7 governed rules
OutputJournal line · ready
Intake workflow · 5 stages Capture → Journal
01Capture
02Extract
03Enrich
04Validate + route
05Journal line
Per-stage artifact
Attachment
Extracted fields
Validation log
JE line
Sample intakes30Mobile + desktop capture
Validation rules7R-001 … R-007 · catalog
Approval tiers4Site · PM · Finance · CFO
Journal previews30Ready · conditional · no
Exceptions6Blocker · owner · action
Storyboard

One flow, four visible artifacts.

The phone captures. The extraction panel reads. The rule catalog validates. The journal line drafts. Every step produces the artifact the next step depends on.

Extracted fields · confidence + source INT-9024
Invoice # 0.99 Vendor 0.97 VAT ID 0.95 Net 0.93 Tax
User-enriched Project WBS Cost center Category
Expense journal · line preview
Account Dr5150 · Site materials
Account Cr2100 · Accounts Payable
Net12,550.00 SAR
Tax code · base · amountVAT-STD-15 · 12,550.00 · 1,882.50
Project · WBSPRJ-AUR · PRJ-AUR-W1.2
Cost center · VendorCC-SITE · Gulf Metalworks
MemoINT-9024 · validated via app · three-way matched
Ready to post
Why this mattered

Invoice flow was a chain of emails with a person on every link.

A physical invoice arrived on site. Someone photographed it. Someone forwarded it. Someone opened the attachment. Someone typed a ledger line. SLAs drifted, exceptions were discovered late, and the journal line was only as good as the last person's attention span.

Operational problem

No structured intake, no governed validation, no journal-line output.

  • Invoices moved by email. Attachments were renamed, misplaced, or opened from the wrong mailbox.
  • Fields were retyped from the invoice image into the ERP by an AP clerk — introducing transcription errors and duplicate posts.
  • Exceptions (price variance, duplicate, missing PO) surfaced after posting, not before.
  • Approval routing was informal. Large invoices sat in one inbox while small ones bypassed review entirely.
System & data gap

No app. No extraction. No journal-line contract.

  • No mobile capture point — invoice had to physically travel to whoever owned the email inbox.
  • No OCR extraction with confidence scoring — every field was retyped regardless of how clear the image was.
  • No rule catalog — "is this invoice valid?" was a judgement call, not a check.
  • No journal-line preview — AP saw accounting values only after pressing post.
What I built

An app-driven intake that produces a journal line — not an email thread.

Architecture · intake pipeline Mobile / desktop · OCR · rule catalog · routing · journal
01Mobile capture
02OCR extract
03User enrich
04Rule validate
05JE line · ready
Approval tiers · by amount
T1 · Site
T2 · PM
T3 · Finance
T4 · CFO
Logic & control

Three control patterns make the intake governed.

Pattern 01 · extraction

Every extracted field carries confidence

OCR emits a confidence score per field. Low-confidence fields block auto-validation until a user reviews them on the app.

auto_ok = all(field.confidence ≥ 0.95)
Retyped
Error ratetranscription
Defensibleno
Confidence-scored
Error rateflagged < 0.95
Defensibleyes
Pattern 02 · rule catalog

Validation is 7 versioned rules

PO link, tax math, duplicate check, dimension completeness, vendor master, role authority, confidence floor. Each rule has an ID, severity, and owner.

validate(intake) = Σ rule_result @ R-001..R-007
Implicit
"Is it valid?"ask someone
Tracenone
Cataloged
"Is it valid?"check rules
Traceper rule
Pattern 03 · journal contract

The ERP receives a resolved line

Accounts, tax code, dimensions, and memo are all resolved in the intake — not picked by the AP clerk after the fact.

JE = { Dr, Cr, tax_code, project, wbs, cc, vendor, memo }
AP guesses
Consistencyperson-dependent
Reworkfrequent
Contract
Consistencyrule-driven
Reworkedge-only
Traceability

Every posted line walks back to a phone capture.

Mobile capture · 2026-04-11 OCR extract · 10 fields User enrich · project + WBS Rules passed · R-001..R-007 Tier 3 · Finance Lead approved JE-9024 · posted
Exception · R-003 duplicate AP · L1 queue Verified unique · released Cleared · journal drafted
Outcomes as signals

What shifted in the intake flow.

Capture pointAt the invoicenot in someone's inbox
ValidationRule-scorednot judgement-based
ApprovalTier + rolenot a shared inbox
Journal readinessResolved upstreamnot typed after approval
Artifacts

Proof artifacts — live and planned.

Excel · live

Invoice Intake → Expense · demo workbook

30 intakes across 6 stages. Extracted fields · validation rule catalog · approval routing tiers · expense journal line preview · exceptions. Integrity checks validated.

Download Excel → Available · portfolio sample
App · storyboard

Mobile capture flow

Capture → OCR preview → enrichment → submit. Storyboard visualization above renders the app UX; a Power Apps / PWA implementation is the production representation.

Visual on-page
Rulebook · planned

Validation rule catalog

Full redacted R-001..R-007 catalog with condition, severity, owner, activation, and rollback. Links to the broader Smart Cost rule layer approach.

Phase 5