Case Study: Using AI to Eliminate Human Error and Standardise Supplier Invoice Handling

A step-by-step look at how automation ensures every invoice is handled the same way.

Industry: Wholesale Distribution
Tools Used: Microsoft Power Automate, Microsoft Copilot, ERP, Outlook shared mailbox
Goal: Eliminate process variance and human error in invoice matching and ERP entry

The Problem

Every business eventually faces the hidden costs of inconsistent processes—especially in accounts payable. While automation is often viewed as a cost-cutting measure, our client wanted consistency. Despite a purchase order system, invoice handling relied on people manually checking for matching POs, goods receipt and correct formatting. Each staff member had their own method, leading to late payments, duplicate entries and confused suppliers.

Our Objective

Design an AI-driven automation flow that unifies invoice handling, removes subjective email triage, validates financials and goods received, formats attachments and metadata for auditing and seamlessly feeds the ERP once criteria are met.

The Solution

Using Power Automate, Copilot and connectors to a shared mailbox and the ERP, we built an automation that scans every incoming invoice and performs a series of intelligent steps.

Step-by-Step: How It Works

  1. Watch the Shared Mailbox: Power Automate monitors a designated shared mailbox and triggers a flow for each unread email with an attachment.
  2. Classify Email with Copilot: Copilot determines if the email contains an invoice. If not, the flow ends.
  3. Extract PO Number & Amount: Copilot extracts the PO number, invoice total and supplier name. Regex is used if AI fails.
  4. Retrieve PO From ERP: Using the PO number, the automation pulls PO totals, line items and receiving status. Mismatches halt the flow for review.
  5. Rename Attachment: When the PO matches, the attachment is renamed to SUPPLIER_NAME - POXXXXX.pdf and the email body is prepended with a status message.
  6. Confirm Goods Receipt: The ERP is checked for a goods receipt. If all items are received, the invoice is pushed to Accounts Payable. Partial or missing receipts move the email to a pending folder.
  7. Final Action: Successful invoices are moved to an Auto-Complete folder with metadata logged for auditing. Others go to a review queue.

Technical Highlights

  • Power Automate: Orchestrates triggers, conditions and API actions.
  • Copilot: Used for natural language prompts to extract and validate data.
  • ERP Integration: HTTP actions call the ERP's REST APIs.
  • Logging: Every processed invoice entry is logged with timestamp, supplier, PO, variance flag and file path.

Assumptions for Reproducibility

  • ERP must support API lookups for POs and GRs.
  • Shared mailbox with permissioned access for Power Automate.
  • Copilot or AI Builder license with PDF model enabled.
  • Structured supplier invoices in semi-standard formats.
  • Security controls to avoid injection or spoofed emails.

Business Impact

  • Reduced human error by 90%—no more missed receipts or mistyped totals.
  • Processing time per invoice dropped from 12 minutes to under 1 minute.
  • Unified naming and folder logic improved auditability.
  • Staff satisfaction increased—no more "did we pay this?" confusion.

Final Thoughts

This project wasn’t about doing more with less—it was about doing things properly, every time, with zero ambiguity. AI doesn’t replace people; it replaces errors.