Skip to content
Research programs

Finance operations

Resolve invoice exceptions before they reach the ledger.

An AP agent gathers the invoice, purchase order, receipt, and vendor record—then prepares a specific action for review.

  • NetSuite
  • Gmail
  • Google Drive
  • Slack

Simulated example. Fictional companies and records; no live connections or client results.

The invoice is only one part of the decision.

AP staff must reconcile supplier documents with purchase orders, receipts, existing bills, and approved vendor details. A complete extraction still leaves the work of explaining an exception and deciding what may enter the ERP.

  • The same invoice arrives through email and a shared folder.
  • An invoice price differs from the order even though every unit arrived.
  • A remittance change is attached to an otherwise matching invoice.
A review packet with source records
Put the invoice, ERP records, calculation, and proposed action in one place so the reviewer can check the decision.
Writes with a defined boundary
Create only the approved bill payload. Purchase orders, receipts, bank details, and payments stay outside this agent’s write permissions.
Recovery without duplicate bills
After an uncertain response, reconcile the existing request and record before considering another action.

Three decisions, with the source records.

Select a case to inspect the evidence, checks and proposed action.

INV-1042 · Northline Components · $8,420

The receipt matches. The price does not.

All 100 brackets arrived, but the supplier billed $84.20 each against an $81.00 order price. AP needs an explained price exception before recording the bill.

Invoice
$8,420.00 USD
Purchase order
$8,100.00 USD
Price variance
$320.00 · 3.95%

Evidence behind the decision

Open a source to inspect its fields and timestamp.

Supplier invoice · page 1Google Drive / INV-1042
Supplier
Northline Components · vendor 1836
Item
BRKT-27 · 100 units × $84.20
Total
$8,420.00 USD
Tax / shipping
$0.00 / $0.00
Invoice date
2026-09-10
Mounting brackets · PO-45018 · quantity 100 · unit price $84.20.

Source snapshot: 2026-09-12 09:00 UTC

Purchase order · line 1NetSuite / PO-45018 · internal ID 45018
Supplier
Northline Components · vendor 1836
Ordered
100 units × $81.00
Order total
$8,100.00 USD
Previously billed
0 units
Snapshot
PO-45018-v4

Source snapshot: 2026-09-12 09:01 UTC

Goods receipt · line 1NetSuite / IR-77103 · internal ID 77103
Source order
PO-45018
Received
100 units of BRKT-27
Received on
2026-09-09
Snapshot
IR-77103-v1

Source snapshot: 2026-09-12 09:01 UTC

Published AP price policyGoogle Drive / AP-PRICE-01 · version 3
Review threshold
Difference > $100 OR > 2%
Receipt requirement
Required; no bill in advance of receipt
Write authority
Approved bill creation only
Policy type
Fictional demonstration policy

Source snapshot: 2026-09-01 12:00 UTC

Supplier price explanationGmail / mail-price-1042
Subject
Rate update for INV-1042
Claimed price
$84.20 per unit
Approval evidence
No approved PO amendment attached
This shipment uses the revised bracket price of $84.20 per unit.

Source snapshot: 2026-09-10 14:22 UTC

Proposed action

Review the $320 price difference. Approve this exact bill for creation only if the exception is accepted; otherwise request a corrected invoice.

ReviewerAP manager · bill-creation authority only

  • VerifiedInvoice arithmetic agrees
  • VerifiedOrdered and received quantities agree
  • Needs reviewPrice exceeds the review threshold
  • Needs reviewSupplier explanation is not an approval

Run the workflow, inspect the proposed changes and make the review decision.

Try this scenario

How the workflow fits into the stack.

Inspect the source contracts, model responsibilities, approval rules and execution boundaries.

A system you can inspect.

Select a source or component to see its contract.

Reference architecture

Extract, link, and explain

Document model / Schema validation / Tool calling

The model extracts invoice fields, proposes item matches, and summarizes supplier explanations with evidence references. It does not set the tolerance or decide who may approve.

Inputs

  • Invoice pages
  • Retrieved records and correspondence

Outputs

  • Typed field candidates
  • Cited exception explanation

Engineering controls

  • Unknown values stay unknown
  • Source citations
  • No arbitrary tool execution

What a production implementation includes.

The integration work, evaluation and operating controls behind the interface.

  1. Map the AP decision and permissions

    Agree the exception rules, source systems, approver roles, ERP workflow behavior, and exactly which record changes an integration may make.

  2. Build against representative invoice evidence

    Implement document extraction, account-specific ERP adapters, line matching, and inspectable review packets using approved sample records.

  3. Test decisions and failure paths

    Evaluate duplicate arrivals, partial receipts, amount mismatches, unknown fields, stale approvals, and uncertain write responses before enabling writes.

  4. Release with observable control

    Start with review-only runs, compare outcomes with AP staff, then enable the agreed actions with audit records, retry handling, and an operating runbook.

Release checks for this workflow
Test caseExpected behavior
Calculate INV-1042 without model arithmetic$8,420 − $8,100 = $320; $320 ÷ $8,100 displays as 3.95%.
Attempt a write before approval or while a check is blockedZero external writes. Duplicate and bank-change cases remain hold-only.
Lose the approved bill-create responseLookup confirms existing job 90117 and bill 61244; exactly one bill exists.
Replay an intake event or reviewer actionStable case and action identity prevent duplicate decisions and ERP records.
Change the receipt from 100 units to 80 before executionInvalidate the prior approval, show a 20-unit receipt exception, and block the write.
Use the same invoice number for another supplierDo not confirm a duplicate using reference and amount alone; require the same verified entity.
Fail a source read or notification deliveryKeep the unresolved state visible. No inferred evidence, approval, or delivery success.
Request a bank change or payment from the modelNo allowed tool performs either action; only masked evidence is present in the trace.

Research behind the example.

Published deployments and technical documentation informed the design. These references are separate from Stacklane’s simulated build.

Bring us a research problem.

Tell us where the model falls short and what better performance would mean for your team.

Discuss your project