Skip to main content
Microsoft Platform Logistics Process Automation

Invoice Processing Automated Around the Exceptions, Not the Happy Path

A logistics operator keyed 11,000 supplier invoices a month by hand and had already abandoned one automation attempt. We rebuilt it with document extraction, a real exception queue in Dataverse and service-owned connections, returning 310 hours a month.

74%
invoices straight through
310 hrs/month
returned to AP
2 min
average touch time
The challenge: Accounts payable keyed every supplier invoice by hand, and a previous automation had quietly stopped working when the analyst who built it left. What we did: Built document extraction with confidence-scored fields, a Dataverse exception queue with Teams approvals, and connection references owned by a service identity, not a person. See our Power Automate consulting. The result: 74% of invoices now post without human touch, the rest land in a queue with a named owner, and nothing depends on one employee's account.

About the Client

Industry
Size
2,100 employees
Geography
US, 14 depots
Stack
Microsoft 365, Power Automate, AI Builder, Dataverse, Teams, ERP finance module
Engagement
Power Platform Consulting + Specialist Delivery
Duration
12 weeks

The Challenge

Accounts payable ran on a shared mailbox. Carriers, fuel suppliers and customs brokers sent invoices as PDF attachments, and 9 clerks typed the header and line detail into the finance system — 11,000 documents a month from 1,300 suppliers in no consistent layout. None of it was difficult; all of it was slow, and the queue was deepest in the last week of the month.

Keying time was the visible cost; the invisible ones were larger. Early-payment discounts expired while documents sat unopened. Freight was coded to the wrong cost centre because the clerk guessed from the supplier name rather than the shipment reference, so depot managers argued with their numbers. And because an invoice existed only in a mailbox until someone typed it, period-end accruals were an estimate, not a count.

There had already been one attempt at this. A finance analyst built a flow that moved attachments into a SharePoint library and parsed a handful of known layouts. It worked for about a year. Then the analyst left, their account was disabled, and every connection went with it. The flow stopped and nobody was notified, because the owner who would have received the failure notice no longer existed.

The brief we were given was 'automate invoice entry'. The brief we took was different. Extracting fields from a clean PDF is a solved problem; the engineering is in the documents that do not extract cleanly — the missing purchase order reference, the changed template, the credit note that looks like an invoice, the duplicate. If that path is not designed, the automation just relocates the manual work.

Our Approach

We designed the exception path first and the extraction second. That order is unusual and it is why the build survived contact with real supplier documents.

1

Document Sampling and Failure Taxonomy (Weeks 1-3)

Sampled a full billing cycle and sorted it by layout, not by supplier — several suppliers shared a billing bureau and produced identical documents, others had changed template mid-year. Then classified every way a document can fail: unreadable scan, missing purchase order reference, lines that do not sum to the header, an unheld currency, a supplier not on the master, a duplicate already paid. Each class got an owner and a resolution target before any flow was built.

2

Document Extraction and the Review Rule (Weeks 3-7)

Started with the prebuilt invoice processing model, which reads standard header fields without training, then added a custom document processing model for the layouts it read poorly. Custom models train on collections — documents grouped by layout rather than dumped into one set, the biggest driver of accuracy. The published limits then did real design work: documents cap at 20 MB, TIFF cannot be used for training, and a table row breaking across a page boundary is not extracted. Freight bills with multi-page line tables hit that last one, so they went to the exception queue by rule rather than being fought with training data. The model returns a confidence score per field. No recommended cutoff is published, so finance set ours: a header total below it routes to review even when the rest reads cleanly.

3

Exception Queue and Approval Design (Weeks 6-10)

The exception queue is a Dataverse table carrying status, failure class, owner, age and the source document, surfaced through a review screen where a clerk corrects fields against the document rather than re-keying. Approvals run as Teams adaptive cards routed by amount and cost centre, each with a timeout and an escalation path, so an unanswered request reassigns rather than holds the invoice.

4

Identity, Connections and Application Lifecycle (Weeks 9-12)

Every connector moved to connection references bound to a service identity, so no part of the automation depends on an employee staying. Environment variables hold site addresses, mailbox names and finance endpoints, so the same solution deploys to test and production without editing actions, and it ships as a managed solution — a change is a deployment, not an edit to a live flow.

5

Run Monitoring, Handover and the Credit Transition (Weeks 11-14)

Power Automate keeps run history for 28 days, shorter than most finance audit questions. We wrote a run log to Dataverse — document identifier, confidence, route taken, who touched it and when — so the audit trail outlives platform retention. Added retry with backoff, a dead-letter path for repeat failures, and a Power BI report on queue age. One live planning item went over with the handover: AI Builder capacity add-ons and seeded credits reached end of sales on 1 November 2025 and end of life on 1 November 2026, replaced by Copilot Studio Credits with no automatic conversion. That renewal sits in the client's plan with a date against it.

Solution Architecture

Intake: A shared mailbox with attachments split per document, plus a supplier portal upload path, both feeding one pipeline

Extraction: Prebuilt invoice processing for standard layouts and a custom document processing model trained by layout collection, inside the 20 MB document limit, with per-field confidence scores driving the routing rule

Data store: Dataverse rather than SharePoint lists: the queue needed relational integrity across invoice, line, supplier and exception, row-level security by cost centre, and change tracking. See our Power Platform consulting

Approvals: Teams adaptive cards routed by amount and cost centre, with timeouts, reassignment and history written to the log table

Identity and ALM: Connection references bound to a service identity, environment variables for every endpoint, managed solutions promoted through development, test and production, and failure alerts to a shared channel

Results

74%
straight-through processing
Posted with no human touch
310 hrs/month
returned to accounts payable
Reallocated to supplier query work
7 → 2 min
average touch time
All invoices, exceptions included
26%
routed to exception queue
Each with a named owner and an age clock
Zero
person-owned connections
Nothing breaks when an employee leaves
88%
early-payment discounts captured
Previously lost to processing delay

Client identity withheld under confidentiality. Figures are representative of engagements of this scope.

Key Takeaways

If your organization is facing a similar challenge, here's what we learned:

The happy path is the smallest part of the build. Deciding what happens to the missing purchase order, the changed template and the duplicate is the actual work, and where every abandoned automation project stopped.

Read the extraction limits before you promise a match rate. A 20 MB cap, no TIFF for training and no extraction of table rows that break across a page boundary are not edge cases in freight billing — they decide which documents can be automated at all.

Do not cost an automation in AI Builder credits. Capacity add-ons and seeded credits hit end of sales on 1 November 2025 and end of life on 1 November 2026, and Copilot Studio Credits do not convert from them. Cost the work in documents and exceptions.

Connections belong to people until you deliberately change that. A flow authored by an employee runs on that employee's connections. Disable the account and the automation stops, usually silently. Connection references on a service identity take minutes to set up.

Run history expires after 28 days, so write your own log. Audit questions arrive months later, and if the only record is run history, the answer to 'why was this paid twice in March' is that nobody knows. See our Power Automate consulting approach to run logging.

Is Your Automation One Resignation Away From Stopping?

Most invoice automations work until the person who built them leaves, or a supplier changes their template. We build the exception path and the ownership model first.