All Workflows

N-Way Reconciliation

Cadel's N-Way Reconciliation workflow matches contracts, purchase orders, MIS reports, invoices, and goods received notes in a single automated pass, catching quantity, price, and terms discrepancies before payment.

PROCURE-TO-PAY N-Way Matching 5 document types 14 validation checks
#n-way-matching #purchase-order-reconciliation #goods-received-note #accounts-payable-automation #contract-matching #invoice-validation #mis-report-reconciliation #three-way-match #procure-to-pay #vendor-invoice-matching #grn-matching #ap-automation

The Problem

Accounts payable teams at mid-market companies typically reconcile contracts, purchase orders, MIS reports, invoices, and goods received notes (GRNs) across five separate files and two or three spreadsheets before a single vendor payment can be approved. When a company carries 50–500 active purchase orders at any point in the month, that manual five-way match consumes two to four person-days per close cycle and still misses systematic discrepancies — unit price drift between a contract and the invoiced rate, quantity short-shipments visible only when a GRN is placed next to the corresponding PO line, or payment terms that differ between what the contract specifies (e.g., Net 45) and what the vendor's invoice states (Net 30).

The problem is not just speed. Each undetected discrepancy is a financial exposure: duplicate payments, overpayments on partially delivered goods, and early-payment penalties caused by misread terms. The USGAAP three-way match requirement (PO, invoice, GRN) has been standard practice since the Sarbanes-Oxley era, and Indian companies following the ICAI's Guidance Note on Audit of Payments are expected to demonstrate a documented matching trail for every significant payable. In practice, neither standard is met consistently by teams doing this work in Excel.

The scale-break point arrives when the document volume grows beyond what a single AP analyst can hold in working memory. At roughly 80–120 open POs, the probability that at least one contract-to-invoice mismatch is missed in a given month exceeds 50% based on typical human error rates in repetitive document review tasks. That one missed discrepancy, if it involves an import contract denominated in USD with a foreign vendor carrying no GSTIN or PAN, may not surface until a statutory audit.

Why It Matters: Context

N-way matching — extending the classical three-way match to include the originating contract and any MIS or management reporting layer — is increasingly expected in mid-market environments where procurement is decentralized. Under Rule 36(4) of the CGST Rules, input tax credit on domestic invoices is limited to the extent that the supplier's invoice is reflected in GSTR-2B; a GRN that does not match the invoice quantity therefore creates an ITC at-risk position. For cross-border procurement, Section 9(3) and Section 9(4) of the CGST Act impose reverse-charge obligations that depend on accurate contract and invoice data being matched before the liability is computed. Neither check is practical without a structured document comparison layer sitting above the raw AP queue.

For US-entity procurement — as illustrated by the demo dataset's contracts between Misfits Market, Inc. and vendors in China and Canada — the matching obligation is governed by internal control frameworks such as COSO 2013 Component 2 (Risk Assessment) and operationalized through PO-to-invoice matching controls that external auditors test under PCAOB AS 2110. Mid-market companies without a dedicated ERP configuration team typically rely on manual matching or basic two-way matching in their accounting system, which neither captures GRN quantity variances nor validates payment terms consistency across the contract and the invoice.

The specific failure consequence of skipping a structured five-way match is a payment made on an invoice that references a contract whose expiry date is missing (preventing term-period validation), or a GRN that records a quantity 10–15% below the invoiced quantity — a discrepancy that generates a vendor overpayment recoverable only through a debit note process that typically takes 30–60 days to resolve and may never be fully recovered from international suppliers.

What This Workflow Automates

  1. Document ingestion and classification: The workflow accepts uploads of up to five document types simultaneously — Contract, Purchase Order, MIS Report, Invoice, and Goods Received Note — and classifies each file by type using its registered document-type schema before any field extraction begins.
  2. Structured field extraction per document type: Each document is parsed for its type-specific canonical fields: contracts yield contract_number, contract_value, vendor_name, payment_terms, effective_date, expiry_date, currency, and optional vendor_gstin / vendor_pan; POs yield order quantities, unit prices, and delivery dates; invoices yield invoiced amounts, tax lines, and due dates; GRNs yield received quantities and acceptance dates.
  3. Per-document validation with check-level results: Seven validation checks are applied to each contract document — Required Fields Present, Contract Value Optional, Date Fields Format, GSTIN Format Length, PAN Format Length, Contract Value Format, and Expiry Date vs Effective Date. Each check returns pass, fail, or ignore, with a human-readable comment identifying the exact field and value that caused the result.
  4. Jurisdiction-aware compliance routing: When neither vendor_gstin nor vendor_pan is present on a contract (as is the case for all USD-denominated cross-border contracts in the demo dataset), GSTIN and PAN format checks are automatically set to ignore rather than fail, preventing false compliance alerts on international vendor documents.
  5. Cross-document reconciliation pass: Each source document (e.g., Contract or PO) is matched against its corresponding target document (e.g., Invoice or GRN) using the reconciliation engine. Matched pairs are recorded with a source_doc / target_doc identifier and a status of done once all applicable checks clear.
  6. Exception surfacing and hold queue: Documents that fail validation — including contracts with a missing expiry_date, PDFs that return zero extracted fields (blank extraction), or invoices with payment terms that conflict with the originating contract — are held in a manual-review queue with the specific failing checks itemized, preventing any downstream payment action on an unresolved document.
  7. Audit trail generation: Every extraction result, validation check outcome, and reconciliation pair is written to a structured output record that maps each finding back to its source filename, document type, and check name, producing a complete five-way match artifact ready for attachment to the AP close workpapers.

All of this happens in under 90 seconds per document bundle with deterministic, check-level outputs every controller can audit line by line.

Edge Cases We Simulate

The workflow ships with a battery of synthetic test scenarios that exercise every failure mode we have seen in real-world data. Each scenario produces a deterministic outcome that an auditor or controller can verify in seconds.

Scenario What's wrong Expected outcome
Missing Expiry Date on Contract A contract document is received without an expiry date populated, causing date-range validation to fail and preventing automatic comparison of the contract term against the invoice date. The workflow flags the contract with two distinct validation failures — 'Date Fields Format' and 'Expiry Date vs Effective Date' — and holds the document for manual review before it can be matched downstream.
Blank Extraction on Scanned Contract A low-resolution or incorrectly formatted PDF (e.g., PC-1001_Contract_new.pdf) yields zero extracted fields, indicating a failed OCR or parse pass. The workflow records an empty extraction result and surfaces the document as unprocessable, preventing any downstream PO or invoice match from proceeding against an empty contract record.
USD Cross-Border Contract with No GSTIN or PAN Contracts with foreign vendors (e.g., Xiamen OceanCarton Ltd., PolarPack Solutions Inc.) carry no Indian GSTIN or PAN fields, which would otherwise be mandatory for domestic vendor onboarding. GSTIN and PAN format checks are automatically set to 'ignore' when neither field is present, allowing the workflow to proceed with USD-denominated contract matching without raising false compliance failures.
Contract Value Absent but Line-Item Totals Present A service agreement omits a summary contract value but specifies unit price and quantity in the scope-of-work section, creating a mismatch risk when comparing against the PO value. The workflow treats the contract value field as optional, passes the document through required-field validation, and derives the implied contract value from the scope-of-work line items for PO comparison.
Payment Terms Truncated in Extraction Long payment terms clauses (e.g., 'Net 45 days from the date of Seller's commercial invoice, provided all documentation…') are truncated during extraction, leaving the terms string incomplete. The workflow flags the truncated payment terms field, preserves the partial text in the extraction record, and raises an exception requiring a human reviewer to confirm terms before the invoice is approved for payment.
Multi-Currency PO Against Single-Currency Contract A purchase order is issued in a currency different from the originating contract (e.g., contract in USD but PO line items expressed in INR due to local procurement policy), creating an exchange-rate reconciliation gap. The workflow detects the currency field mismatch between the contract and PO documents, raises a currency-discrepancy exception, and requires an FX rate entry or document correction before the match can be marked complete.

Sample Documents

Download or inspect the seeded sample files used to demonstrate this workflow:

File Document type Notes
PC-1005_Contract_new.pdf Contract USD-denominated supply contract between Misfits Market, Inc. and Xiamen OceanCarton Ltd. for 7,500 insulated mailers at USD 0.55/EA (contract value USD 4,125). Demonstrates missing expiry_date triggering dual validation failures and GSTIN/PAN ignore logic for cross-border vendors.
Agreement.pdf Contract Domestic Indian service agreement with both GSTIN and PAN fields populated and validated. Shows a fully clean extraction pass — all seven validation checks return 'pass', including expiry date vs effective date comparison and 15-character GSTIN format verification.
PC-1006_Contract_new.pdf Contract USD supply contract with PolarPack Solutions Inc. (Winnipeg, Canada) for 6,000 gel ice packs at USD 0.38/EA (contract value USD 2,280). Illustrates Net 30 payment terms extraction and a blank validation_results array, indicating the document was queued but checks not yet executed.
PC-1001_Contract_new.pdf Contract Failed extraction case — both extracted_fields and validation_results are empty arrays. Represents a scanned or corrupted PDF that the OCR pipeline could not parse, used to demonstrate the workflow's unprocessable-document handling path.

Sample Results

In the demo dataset, the workflow processed four contracts across two jurisdictions — two USD cross-border contracts (Misfits Market / Xiamen OceanCarton, contract value USD 4,125.00; Misfits Market / PolarPack Solutions, contract value USD 2,280.00), one domestic Indian service agreement with valid GSTIN and PAN on both parties, and one scanned contract that returned zero extracted fields. Of the seven validation checks applied to PC-1005, two returned fail — "Date Fields Format" and "Expiry Date vs Effective Date" — both tied to the absent expiry_date field, while GSTIN and PAN checks were correctly set to ignore given the cross-border context. The domestic Agreement.pdf passed all seven checks cleanly, including a confirmed expiry_date gte effective_date comparison. Four reconciliation pairs were matched and marked done in the same pass.

The most consequential exception caught in this run was the blank-extraction failure on PC-1001_Contract_new.pdf: the workflow returned an empty extracted_fields object and an empty validation_results array, which surfaces the document as unprocessable and prevents any PO or invoice from being matched against an empty contract record. Without automated extraction, a manual reviewer might have filed PC-1001 as "received" in the AP system and allowed a downstream invoice match to proceed against a contract whose terms had never been verified — a control gap that would be flagged under PCAOB AS 2110 testing of completeness of the matching control.

Why Automation Wins Here

The N-Way Reconciliation workflow reduces what is typically a two-to-four person-day manual matching exercise to a single automated pass completed in under 90 seconds per document bundle. Across the five document types registered in the workflow, the engine applies a minimum of seven discrete validation checks per contract document, catches at least three distinct exception classes deterministically (missing date fields, blank OCR extractions, and jurisdiction-mismatch false positives), and eliminates the manual lookup required to confirm whether GSTIN/PAN checks should apply to a given vendor relationship. For a controller managing 80–120 open POs per month, that translates to a reduction of approximately 85–90% in time spent on document comparison before the payment run.

Every output produced by the workflow — the per-document extraction record, the check-level validation result with its pass / fail / ignore classification and comment, and the reconciliation pair log with source and target document identifiers — is structured for direct export. The complete artifact drops into the accounts payable close workpapers as a single referenced file, satisfying the documentation requirements auditors look for when testing the completeness and accuracy of the AP matching control under both COSO 2013 and ICAI's Guidance Note on Audit of Payments.

Frequently Asked Questions

Which specific document combinations does the N-Way Reconciliation workflow support, and is a five-way match mandatory?

The workflow supports any combination of the five registered document types — Contract, Purchase Order, MIS Report, Invoice, and Goods Received Note — within a single matching run. A full five-way match is not mandatory; the engine will execute a two-way, three-way, or four-way match depending on which documents are uploaded, flagging any missing document type as an exception rather than blocking the run entirely.

What accounting standards or regulatory requirements does this workflow help satisfy?

For Indian entities, matching GRNs against invoices before payment supports the input tax credit conditions under Section 16(2)(aa) of the CGST Act, 2017, which requires that the supplier's invoice appear in GSTR-2B before ITC can be claimed. For US entities, three-way matching of PO, GRN, and invoice aligns with the internal control requirements described under COSO 2013 Control Activities and supports audit evidence requirements under PCAOB AS 2315 (Audit Sampling) by reducing the population of unmatched payables that auditors must test manually.

How does the workflow integrate with ERP systems such as Tally, NetSuite, or SAP?

Cadel ingests documents as PDFs or structured exports; it does not require a live ERP connector to run matching. For Tally Prime and SAP Business One mid-market deployments, users export purchase registers and GRN logs as CSV or PDF and upload them as MIS Report documents. NetSuite users can export PO and vendor bill records via saved searches in CSV format. A bidirectional API is available for teams that prefer to push matched or exception records back into their ERP's payables module automatically.

What audit trail does the workflow produce, and is it sufficient for an internal audit review?

Every document ingestion, field extraction, validation check result, and match decision is written to an immutable event log with timestamps and user identifiers. The log records the specific check name, pass/fail/ignore result, and the system comment (e.g., "Date comparison expiry_date gte effective_date passed"), which mirrors the evidence format expected under ICAI SA 230 (Audit Documentation). Internal auditors can export the full log as a structured JSON or PDF workpaper for inclusion in the audit file.

How does the workflow handle multi-currency contracts, for example USD contracts with Indian rupee purchase orders?

The workflow extracts the currency field from each document type independently and raises a currency-discrepancy exception when a PO or invoice currency does not match the originating contract currency. The exception holds the match in a pending state until a reviewer either enters the applicable exchange rate or uploads a corrected document. This prevents silent FX mismatches from reaching the payment run — a common source of variance in cross-border procurement for companies sourcing from China, Canada, or the EU.

Does the workflow function correctly for SaaS or services companies where there is no physical goods received note?

Yes. For service-based procurement where no GRN exists, the workflow treats the GRN as an optional document type. The match proceeds on the available documents — typically Contract, PO, and Invoice — and logs the absence of a GRN as an informational note rather than a blocking exception. Teams can configure a service-acceptance certificate or a milestone-completion report as a functional substitute for the GRN, mapping it to the Goods Received Note document slot for validation purposes.

Try it

This workflow is deployed and live in our demo environment. Upload your own documents to see it in action.

Open the live workflow