--- title: "How to build a supplier cost reconciliation agent: invoice vs. quoted cost" description: "Compare supplier invoices with quoted costs and customer rates. Build matching rules, human review and a closing process that keeps operational margin visible." author: "Carlos GarcĂ­a" published: 2026-11-04 updated: 2026-11-04 language: en human_url: "https://kiia.cloud/blog/how-to-build-supplier-cost-reconciliation-agent/" --- > **In 60 seconds:** A cost reconciliation agent brings together the approved quote, supplier confirmation and invoice for each job. It compares every line item against business-defined rules and tolerances, keeps source fields read-only, and sends differences to a queue with evidence and an owner. Review overcharges and amounts below expectations alike. Before closing, show outstanding costs, the customer rate, collection status and provisional operational margin. A person resolves exceptions; the agent prepares the case and preserves its history. A company quotes a service, hires a supplier and receives the invoice days later. Sales keeps the estimate in a spreadsheet, Operations receives the confirmation by email, and Administration sees the invoice in another system. Each team holds part of the job; whoever pays may not have the agreed cost at hand. Imagine an invoice includes a storage charge absent from the quote. Or it leaves out a confirmed service, making the margin look better until another invoice arrives. Both cases need an explanation before closing. All examples in this guide are synthetic and apply to logistics, distribution or services; they do not describe a specific customer. This playbook focuses on supplier invoice reconciliation and AI-assisted cost control per job. The customer side has a separate process: [how to build a payment receipt and collections agent](/blog/how-to-build-a-payment-receipt-collections-agent/). Here, you need to know whether received costs match what was purchased and how much of the agreed customer rate remains. ## 1. Define the job you will reconcile Start with a stable reference carried across the quote, booking or service confirmation, and invoice. The agent queries authorized sources and proposes matches; a similar description alone is insufficient to select a job. Keep at least the following data, with sources and versions: | Data | Purpose | | --- | --- | | Job reference and supplier | Find the correct case and verify who is invoicing | | Approved quote and line items | Preserve what was purchased, quantities, units, currency and terms | | Expected cost per item | Compare against the approved version without replacing it with received costs | | Customer rate | Show the agreed price, its currency and approved commercial changes | | Supplier confirmation | Check confirmed services and commitments not yet invoiced | | Received invoice and its lines | Read identifier, dates, currency, quantities, charges and total | | Status and owner | Distinguish pending documents, review, reconciliation and closing | | Collection status | Separate the agreed customer price from money actually collected | If one invoice covers several jobs, you need line-level allocation or an approved, traceable allocation rule. If one job receives several invoices, retain cumulative costs and outstanding items. Comparing each invoice separately against the entire estimate would produce false differences. ## 2. Preserve source values and record corrections separately The [invoice and document data extraction guide](/blog/ai-data-extraction-invoices-customs-documents/) covers typed fields, nulls and validation. Use that output as the input to reconciliation, retaining a link to the original and the page or row supporting each value. In this design, the application blocks editing and deletion of values extracted from the invoice or confirmation. You can complete a missing reference with authorized information, but must store it in a separate field with its provenance. If extraction was wrong, append a correction: previous value, proposed value, reason, responsible person and timestamp. The operational view uses the approved version and keeps earlier versions available. For example, if the extractor misreads the currency, the review must show the extracted text alongside the document. Correcting the interpretation requires a history event; changing the currency on the supplier's invoice requires a resolution outside that field. Permissions and storage must enforce this rule even if someone asks in chat to delete the difference. ## 3. Compare line items using business rules Resolve supplier and job identity first. Then compare items, quantities, units, currency and prices. A model can suggest that two descriptions refer to the same service; an approved mapping table and deterministic rules determine whether that association is acceptable. Multiple candidates produce an exception. Calculate with decimal arithmetic outside the model: ```text line-item difference = received cost - approved expected cost deviation requiring review = absolute difference outside tolerance ``` The business defines tolerances, rounding and conditions that always block reconciliation. Store the policy version with the result. A duplicate charge or an unquoted item may require review even when the amount is small. Also check expected items absent from every invoice: reviewing only received lines would hide outstanding costs. Compare amounts on the same basis. Agree with the Finance owner which components enter operational costs, how taxes are separated and how each currency is handled. If conversion is needed, require an approved exchange-rate source, date and rule; stop the comparable calculation when these are missing. This guide proposes operational software controls; tax and accounting rules must be agreed for the relevant country and entity. ### A lower invoice amount also raises a question Suppose the confirmation includes transport and storage, but the invoice only includes transport. The agent flags storage as outstanding. The reviewer checks for a cancellation, documented discount or planned later invoice. Apply the same criteria to upward and downward differences. A lower invoice can improve provisional margin without reducing the actual commitment. Do not classify that difference as savings by default or close the item without evidence. ## 4. Design the queue the team will use Every exception needs a reference, original documents, compared values, failed rule, owner, arrival timestamp and next action. Group alerts for the same case so retries do not create identical tasks. The pattern in [managing exceptions instead of cleaning Excel](/blog/from-cleaning-excel-to-managing-ai-exceptions/) helps define this inbox. | Exception | Evidence the agent presents | Human review | | --- | --- | --- | | Unquoted item | Received line and approved items | Check authorization and decide who absorbs the cost | | Duplicate charge | Invoices, references and previous allocations | Confirm duplication or justify distinct services | | Different currency | Original currencies and available or missing conversion rule | Validate terms or request clarification | | Invoice without a job | Extracted references and candidate jobs | Match with a reason or request information | | Missing item or lower amount | Confirmation and outstanding expected cost | Confirm discount, cancellation or later charge | | New charge on a closed job | Previous closing record, new document and proposed impact | Review reopening or adjustment through the authorized process | A review card must allow the person to request information and keep a case pending. Forcing a choice between approval and rejection turns unresolved questions into approvals. Define who receives unowned cases and how to escalate those exceeding the team's agreed review deadline. ## 5. Separate proposals from authorization The agent prepares the difference, explanation and alternatives. An authorized person decides whether to approve payment through the existing process, dispute the supplier charge, propose a revised quote to the customer or absorb the cost. Requoting requires the relevant commercial approval; a suggestion does not change an agreed price. Record the decision, owner, timestamp, reason and evidence. Limit the agent's permissions to reading sources and writing to the review case. Give it no access to payments, credit-note issuance or accounting changes. [Copilot or autopilot](/blog/copilot-or-autopilot-ai-agent-autonomy/) explains how to choose these boundaries per action. Before confirming reconciliation, check versions again: someone may have changed the quote or recorded a new invoice while the case was open. Invalidate the old proposal and recalculate if a source changed. Use persistent identifiers so receiving the same document again cannot duplicate costs or resolutions. ## 6. Show margin and closing conditions Display quoted cost, reconciled received cost, commitments not yet invoiced, agreed customer rate and confirmed collections separately. Finance must define the operational margin basis; any calculation with outstanding costs is labeled provisional. Collecting an invoice and earning margin are different states. For this workflow, operational closing requires every expected item to be resolved, received invoices to be reconciled, and collection status to meet the agreed policy. A partial invoice does not close the entire job. If a closing exception is allowed, record who authorized it, what remains outstanding and when it will be reviewed. In another synthetic example, someone might enter a manual adjustment to make the displayed result match the estimate again. The dashboard must preserve the original difference and show the effect of each adjustment separately. Any closing with manual adjustments sends management an alert with the reason, owner and evidence; the same control applies to new charges after closing. The [executive assistant connected to ERP, sales and collections](/blog/ai-executive-assistant-erp-sales-collections/) can query this view with read permissions. Management needs to distinguish provisional margin, reconciled margin and jobs closed with exceptions without reconstructing the case from messages. ## 7. Test one supplier category before expanding Choose one supplier category and a limited period with an explicit cutoff date. Start in shadow mode: the agent reads and proposes while the team retains its current process. Use synthetic documents for development and an authorized sample to evaluate results. Include normal cases and exceptions: a higher charge, lower amount, omitted item, duplicate, ambiguous currency, invoice split between jobs, unreadable document and charge after closing. Check that the original stays intact and corrections leave a history. Also test repeated documents and a quote that changes before approval. | Metric | How to read it | | --- | --- | | Detected differences | Count those confirmed by review, separating overcharges, lower amounts and outstanding items | | Matching errors | Cases the agent attributed to the wrong job or item | | Time to review | From invoice receipt to the first human review | | Time to resolution | From receipt to a decision supported by evidence | | Queue age | Outstanding cases by owner and cause | | Closings with exceptions | Jobs closed with manual adjustments or authorized outstanding commitments | Audit a sample of matches too: a small queue can hide errors the agent missed. Decide whether to expand based on matching quality and the team's capacity to resolve differences. Do not extrapolate savings from test documents. If a shared reference and a policy for differences are still missing, agree on them first. [The cost of copying data between systems](/blog/cost-of-copying-data-between-systems/) helps locate those handoffs. To prepare the pilot, gather a quote, its confirmation and invoices, then ask the owner to explain what evidence they would need to close that job. ## Frequently asked questions ### What does a supplier cost reconciliation agent compare? It matches line items and costs from the approved quote, supplier confirmation and received invoice to the same job. It also shows the agreed customer rate and how differences affect operational margin. An ambiguous match stays in review. ### Why review an invoice that charges less than quoted? There may be a confirmed discount, a missing item or a partial invoice. A lower amount does not establish a lower cost: the missing charge could arrive after closing. Apply the same review policy to positive and negative differences, and retain the approved explanation. ### Can the agent pay invoices or correct accounting records? In this design, its permissions are limited to reading sources and recording proposals, exceptions and decisions in the review application. A person decides whether to approve payment, dispute a supplier charge, propose a revised customer quote or absorb the difference. The agent does not pay, issue credit notes or modify accounting records.