The AgentivUse cases

Finance · About a week

Invoice exceptions fixed before AP sees them

An agent that picks up every supplier invoice the capture tool could not match, fixes the rule based errors such as a vendor item number that does not map to your item or a purchase order number with extra characters, and sends the corrected invoice on to the ERP

The problem

An OCR invoice capture tool reads supplier invoices, but many still land in an error state: the vendor's item number does not match your item, or the vendor added text to the purchase order number so nothing matches. Each one waits for a person, and on an invoice with hundreds of lines that means correcting them line by line.

Architecture

  1. Channel
    • Capture tool error queue
  2. Agent
    • Rule based exception fixer
  3. Tools
    • Copilot Studio
    • Power Automate
    • Dynamics 365 Finance
  4. Human
    • AP team takes unresolved ones

Where the data stays: Invoices stay in the capture tool and Dynamics 365 Finance; the agent sees the header, lines and purchase order of one exception at a time and never touches payment data.

Design flow

  1. Capture tool flags an invoice in an error state
  2. Flow routes the details to the agent
  3. Agent fixes the item or purchase order number by the rules
  4. Flow reprocesses, invoice lands in the ERP
  5. No rule applies: invoice goes to the AP queueOnly sometimes
  6. AP clerk resolves it and reads the weekly touchless reportHuman checkpoint

Setup

Total time: 6 h 45 min our estimate

  1. 1 h 30 min

    Done when: A sheet counts last quarter's capture exceptions by cause, and the two or three deterministic causes (item number format, purchase order number with extra characters) are marked as the agent's scope.

  2. 1 h

    Done when: Each cause has a written rule with what the agent may change, what it must never change (quantities, prices, totals) and when it must answer unresolved.

  3. 1 h 30 min

    Done when: A Power Automate flow picks up an invoice in an error state, extracts the header, lines, error reason and matching purchase order, and sends them to the Copilot Studio agent that holds the rules.

  4. 1 h

    Done when: A follow up flow reprocesses the corrected data, the complete invoice appears in Dynamics 365 Finance, and an unresolved answer sends the invoice back to the accounts payable queue untouched.

  5. 1 h

    Done when: For two vendors the agent runs live for a week, accounts payable receives a daily list of every field it changed with the reason, and the touchless share per vendor is measured before and after.

  6. 45 min

    Done when: A new vendor or rule is added only after the weekly report shows no wrong correction for the current ones.

Ticks are saved on this browser.

Download the kit (zip)

Starter prompt

Written from how the use case works and its sources. Replace the parts in square brackets.

You resolve invoice capture exceptions for [company]. Input: the captured invoice header and lines, the error reason, and the matching purchase order with its item list. Rules: (1) if a vendor item number does not match, try removing prefixes, suffixes and spaces and compare it with the items on this purchase order; accept only an exact match after cleaning. (2) If the purchase order number contains extra characters, strip them and check that the result exists and belongs to this vendor. (3) Never change quantities, prices, totals or bank details. Output a JSON object with the corrected fields and a one line reason for each change, or the word unresolved with the reason, so the accounts payable team takes it from there.

Risks and data

Data

The agent reads supplier invoice headers and lines and the matching purchase orders, and writes corrected item and purchase order numbers. Keep bank details and payment approval out of its reach, let it change only the fields its rules name, and log every change with the reason.

How it goes wrong

It goes wrong when a cleaned item number matches the wrong line on the purchase order, or a stripped purchase order number happens to exist for another order; the invoice then posts against the wrong goods and you notice at the three way match or when a supplier queries a payment. Accept only exact matches after cleaning, never let the agent touch quantities or prices, and read the daily change report during the pilot.

Data protection. This use case touches personal data, so check the rules where you operate (for example GDPR, PDPA). Supplier invoices carry contact names, addresses and bank details. Pass the agent only the header and line fields the rules need, keep bank details out of its input, and keep the reprocessing log in your own finance system.

How the agent works

  1. It starts

    Invoice capture flags an invoice in an error state.

  2. The agent works

    A Power Automate flow extracts the relevant details and routes them to the agent, built in Copilot Studio, which applies a defined set of instructions to the exception: it trims or adjusts the vendor item number, compares it with the specific purchase order and identifies the correct item, or removes the extra characters a vendor appended to the purchase order number. A follow up flow reprocesses the corrected data and the complete invoice moves into Dynamics 365 Finance for the usual downstream processing.

  3. The result

    The agent only handles the deterministic cases its rules cover; everything else stays in the accounts payable queue for a person, as before.

Worked example

Asurion, the device protection and repair company behind more than 600 uBreakiFix stores, processes about 30,000 direct purchase order invoices a year, roughly 90% of them with at least one exception, and about 25,000 indirect invoices, more than 75% with header level issues; touchless processing had fallen below 20% and vendor item numbers that did not map to internal SKUs were a main cause. Instead of buying another OCR tool it built the Invoice Capture Derivation agent in Copilot Studio, with proof points in about one week. Power Automate routes each error to the agent, the agent fixes the item or purchase order number, a flow reprocesses the invoice and it lands in Dynamics 365 Finance. Touchless went from under 20% for two vendors to over 55% within the first week for its North and South American vendors, and after refinement to more than 70% across North and South America, with a path toward 85% or more as MCP server work moves to production (Microsoft customer story, 8 October 2026).

Asurion kept its Microsoft stack: capture errors flow through Power Automate to a Copilot Studio agent and the corrected invoice lands in Dynamics 365 Finance. The correction logic is a written set of rules for deterministic cases, so n8n can run the same loop against your own capture tool and your ERP's API; what you lose is the native hand back into the Dynamics 365 invoice record, which you rebuild with your ERP's API.

Join the Agent OS Club

Get hours back with a team of AI agents for every department, set up step by step for the tools you use, with a person answering your questions. Founding member price: USD 14.95 a month or USD 150 a year, locked for as long as you stay. Cancel any time.

Founding offer, ends 31 December 2026 or at member 100

Join the Agent OS Club

Building this for an organization? Learn more at theagentiv.com

Sources

Published: 2026-11-12

Related use cases

Snap the tax invoice, the sheet fills itself

An agent that reads a receipt or tax invoice photo sent on LINE, checks the 13 digit tax ID, the Buddhist era date and the 7% VAT in code, logs the row to Google Sheets and tells the sender what still needs a look

FinanceEffort: An afternoonThailand
Clauden8nLINE+1

In a Thai shop or small company the receipts and tax invoices arrive as photos on LINE from whoever paid: a driver, a cook, the owner's spouse. Someone types the seller, the tax ID, the date in Buddhist era and the VAT into a sheet weeks later, and a wrong digit in the tax ID or a VAT line that does not add up only shows when the accountant prepares the monthly VAT return.

Cash reconciled in minutes, not an evening

An agent that reconciles each store's cash transactions against the bank deposits every month and hands the owner only the lines that do not match

FinanceEffort: An afternoon
ChatGPTAlso works with:ClaudeGeminiMicrosoft 365 Copilot

An owner with several stores or branches ends every month matching cash transactions from the point of sale against the deposits that actually reached the bank, line by line, store by store. It takes hours, it is easy to miss a short deposit, and it is the kind of job that slips when the month is busy.

Planning ideas flagged on every return

A Copilot agent that evaluates a client's tax return against the firm's planning frameworks and flags opportunities early, plus a quality checkpoint agent that routes work to national tax or estate and trust specialists before it advances, the way a US accounting firm of roughly 1,300 people runs it

FinanceEffort: About a week
Microsoft 365 CopilotAlso works with:ClaudeChatGPT

In a tax practice, planning opportunities are spotted by the people with the most experience, usually late, when the manager finally reviews the file. Junior staff prepare the return without seeing them, the second review by a specialist depends on someone remembering to ask, and there is no record of why a file did or did not get that review.