All case studies

Case study · AI product · Intelligent document processing

Intelligent document processing for SME accounting

InvoiceFlow · FinTech · Accounting automation · Canada

A multi-company platform that turns invoices, receipts and emailed confirmations into reviewed transactions: a multimodal model extracts the fields, deterministic code repairs, converts and de-duplicates, and a human validates whatever the model is unsure about.

  • 4 conditions that send a document to human review
  • 2 tiers of duplicate detection — at analysis and on demand, without AI
  • CAD every foreign invoice converted at the invoice-date rate

Status In production Website: invoicempower.com

Context

A group of small companies produces a steady flow of supplier invoices, receipts and revenue confirmations in French and English, on paper, as phone photos and as email attachments — some in foreign currencies, some sent twice, some bundled several to a PDF. Each company has its own fiscal month, tax rates and categories, and the accountant who closes the month needs one place where every document has already been read, split into subtotal, GST and QST, converted to CAD and categorized. InvoiceFlow started in June 2026 as the tool for that bookkeeping, then grew into a multi-company platform with roles, account approval and a per-company forwarding address. It is a separate product from FinSync, my ERP-to-CCH Tagetik integration platform: no shared code, a different problem.

Challenge

Extraction is the easy part to show and the hard part to trust. Optical reading of dates produces five-digit years and inverted day-month pairs; a receipt in dollars from a foreign supplier must be recognized as foreign and converted at the right day’s rate; the same invoice arrives by email and by upload; one scan holds three invoices; a 38 MB PDF exceeds what the server will accept. Above all, no one closing a month will accept a number a model guessed. The platform had to decide, document by document, what it was sure of and what needed a person — and make that decision visible, traceable and cheap to overturn.

My role

Founder and architect: product vision, functional specification, platform architecture and technical direction — from the extraction pipeline and the deterministic post-processing layer to the data model, the role system and the access rules. I wrote the initial specification, screens, fields, pipeline and Canadian tax rules included, and arbitrated every product decision that followed: which model gateway to use, how duplicates are handled, when a file may be split, what each role may do. Built and operated with my team at SOFT M POWER CANADA, with an AI-assisted development platform for the implementation.

Architecture / approach

One pipeline, two natures. A large multimodal model receives the whole document and the company’s category list, and must answer in a constrained JSON schema under a single rule: one file is one invoice. Everything after the model is deterministic code that can be tested: date repair with warnings written to a processing log, currency detection and conversion at the invoice-date rate from two public sources in cascade, duplicate detection that deletes only when invoice number, supplier and amount all match an older record, and a review status triggered by four conditions — confidence below the threshold, suspected duplicate, several invoices in one file, or a doubtful date. Multi-invoice files are flagged, never split without a human decision.

Technology

Server-rendered React application with server functions behind an authentication middleware; PostgreSQL with row-level security on all eight tables and on file storage, scoped to each company through ownership or membership; access-restricted object storage organized by company, year, month and type; a cloud AI gateway to a multimodal model, called only from the server; two public exchange-rate sources with fallback; browser-side PDF compression — page-by-page re-encoding in up to five passes — to stay under the 8 MB server limit; mailbox synchronization on demand and through a scheduled endpoint; an on-demand duplicate scan that uses no AI at all.

Execution

Ninety-five product iterations between June and September 2026, tested against real invoices from the first weeks. Most of the work after the initial pipeline was the kind that only production surfaces: PDF previews blocked by the browser, accented file names rejected by storage, gateway timeouts on heavy files that led to browser-side compression, a time-zone shift that moved the first of the month, filters and scroll position lost on every action, English default categories in a French interface, an inbox flooded with links to scanned documents instead of attachments. Access rules were rewritten three times — owner, then roles, then company membership — and two security-hardening passes locked privileged database functions and updated vulnerable dependencies.

Constraints

A serverless runtime with an 8 MB request limit and bounded CPU time, so heavy files are compressed before they leave the browser. Every model call has a cost, so processing runs two documents at a time, scheduled synchronization handles companies one after the other, and the duplicate scan across a selection is deterministic. No dedicated inbound mail domain: after two attempts at dedicated infrastructure, intake settled on addresses derived from a mailbox that already exists — zero configuration. Documents are analyzed by a cloud model provider, so the product does not claim that documents stay within its own environment; it keeps the raw model response with each document and leaves every field editable. No accounting integration: the export is CSV, with currency, rate and CAD total.

Business impact

What the platform delivers today: one place where several companies’ documents arrive by upload, camera or email; every document extracted, dated, converted to CAD and checked for duplicates; a review queue that lists anything uncertain until a person confirms it; monthly dashboards, yearly views by category and a CSV export ready for the accountant; administrator-approved accounts with four operational roles enforced in the interface and in the database. Delivered scope: seventeen screens, fourteen server functions, twenty-three database migrations, eight tables and two languages. Next on the roadmap: direct exports to accounting packages — nothing beyond CSV is presented as available until it exists.

Key takeaways

  1. Put a deterministic layer after the model: dates, currencies, duplicates and the review decision belong in code you can test, not in a prompt you can only hope for.
  2. The confidence threshold is a product decision, not a model setting — sending a document to a person is cheaper than a wrong number in a ledger.
  3. Delete only when certain: a duplicate rule that errs toward asking costs a click; one that errs toward deleting costs trust.
  4. Zero-configuration intake beats elegant infrastructure — an address on a mailbox that already exists shipped where two dedicated-domain attempts did not.
  5. Production breaks on the boring things — file size, file names, time zones — and that is where most of the engineering time went.