Back to Blog
Published:
Last Updated:
Fresh Content
Procure-to-Pay Agent OperationsChapter 2

Two-way or three-way matching in Dynamics 365 — what is the difference?

5 min read
1,152 words
high priority
Ali Ahmed

Ali Ahmed

AI Solutions Engineer, Cognilium AI

TL;DR

Two-way compares invoice price to purchase order price. Three-way adds the receipt quantity. Under two-way the product receipt is not tested at all.

Two-way compares the invoice price to the purchase order price. Three-way adds the product receipt quantity. The consequence is the part worth knowing: under a two-way policy the receipt is not part of the test at all, so a difference between what arrived and what was billed is not caught here.

Put this to work

Built, demonstrated on request. Reads vendor invoices from the AP inbox, blocks duplicates and look-alikes, and enters each as a pending invoice matched to the purchase order and the receipt.

What is the difference, in Microsoft's own words?

One sentence covers both:

"Two-way matching compares the unit price of the invoice to the unit price of the purchase order. Three-way matching additionally compares the invoice quantity to the matched product receipt quantity."

And the policy options spell it out again, more precisely:

PolicyMicrosoft's description
Not required"There's no verification of individual invoice line prices to purchase order price or invoice quantities to packing slip quantities required."
Two-Way Match"The verification of invoice lines is required but only the purchase order and the supplier's invoice documents are involved in the verification. The product receipt isn't factored into the matching validations."
Three-Way Match"The invoice net unit price is compared to the purchase order's net unit price and the matching product receipt quantity is compared to the invoice quantity."

That middle row is the one people get wrong. It is easy to assume two-way means "a lighter version of the same check". It does not — it means the receipt is excluded. If you are billed for ten and received six, two-way matching has no opinion, because it never looks at what was received.

What else can be matched besides price and quantity?

Four types exist, and Microsoft names them:

TypeWhat it compares
Line level matching"The most common type of matching is line matching." Two-way or three-way, as above
Invoice totals matching"Match the total amounts on the invoice to the total amounts on the purchase order." Six totals: "Subtotal, Total discount, Charges, Sales taxes, Round off, and Invoice amount"
Charges matching"Match the charges information (amounts) on the invoice to the charges information (amounts) on the purchase order"
Price totals for line item matching"useful for companies that typically receive multiple invoices for a single purchase order line"

The fourth one is quietly important if your vendors bill in instalments. Microsoft explains why: "If you typically receive only one invoice per purchase order line, this type of matching isn't necessary." It acts as a ceiling, described as "a not-to-exceed net amount validation", comparing each line against the net amount of the corresponding purchase order line — where the net amount is "(Unit price Line quantity) + Line charges - Line discounts."*

So "we do three-way matching" does not mean every check is on. Line matching and totals matching are separate switches.

Where is the policy actually set?

At the legal entity, and then overridable downwards.

The default lives on Accounts payable > Setup > Accounts payable parameters, on the Invoice validation tab, in the Line matching policy field — and Microsoft describes it as "a value used as the default policy for the legal entity that you are working with."

Then it can be narrowed: "To allow a different level of matching to be applied for an item, vendor, vendor and item combination, or purchase order line, select a value in the Allow matching policy override field." The overrides themselves live on the Matching policy page.

### Why this matters before you blame the data The policy that applied to a given line may not be the company default. A vendor-level or item-level override can be in force, which means two lines on the same invoice can be tested differently. Check the override before concluding the matching is broken.

One more switch decides when matching runs at all: the Automatically update invoice header match status field, where Microsoft's guidance is "The recommended setting is Yes, unless you're experiencing data entry performance concerns" — and if it is set to No, "The data entry clerk needs to manually update the invoice's match status."

What about tolerances?

The default is zero, which surprises people.

"The legal entity default price tolerance is set to zero percent for two-way and three-way matching."

Zero tolerance means any price difference is a discrepancy. Tolerances are then configured per legal entity, item and vendor on the Item price tolerance page, and Microsoft notes that "When vendor invoices are compared with the information on purchase orders, the applicable price tolerance percentage is searched for" — so the most specific tolerance wins.

Discrepancies do not necessarily block posting. The Post invoice with discrepancies setting decides: at Allow with warning, Microsoft says "visual indication displays when a discrepancy for invoice matching exceeds the tolerance. However, you can post the invoice."

And there is a workflow interaction worth knowing: "To use workflows together with invoice matching validation, make sure that the Post invoice with discrepancies field is set to Allow with warning to avoid having to approve multiple times."

Which should you actually run?

Three-way, unless you have a specific reason not to — and the reason is usually the receipt discipline, not the matching.

The honest trade-off: three-way matching is only as good as the product receipts behind it. If receipts are posted late, in bulk, or not at all, three-way matching converts a goods problem into an invoice backlog. Two-way hides that problem rather than solving it, which is why the choice is really a question about the warehouse, not about accounts payable.

If receipts are unreliable, fixing the receipt step pays better than relaxing the policy — and that is where the receipts actually get stuck.

About Cognilium Cognilium builds AI optimization apps for Microsoft Dynamics 365 — companion apps that optimize the pricing, inventory, warehouse and planning decisions your ERP manages but can't optimize. Dynamics is your system of record. Cognilium is your system of intelligence. https://cognilium.ai · https://www.linkedin.com/company/37180269/

Agentic ERP. We build turnkey AI optimization apps for Dynamics 365 — sidecar applications that run in your own Azure tenancy and solve the calculations a standard ERP is not built to compute. Built on Azure OpenAI, Microsoft Fabric and Copilot Studio. We build these on request, against your data and your environment.

More on the boundary between what Copilot does and what you build: Agentic ERP on Dynamics 365.

If invoices are parking with discrepancies and nobody can say which policy applied, the overrides are usually the answer. Bring one parked invoice to a 15-minute call.

Sources

Sources and fact-check
#§ClaimTierPrimary sourceVerdict
11"Two-way matching compares the unit price of the invoice to the unit price of the purchase order. Three-way matching additionally compares the invoice quantity to the matched product receipt quantity"T1 — verbatimmatching-validationPASS
21All three policy options quoted — Not required, Two-Way Match, Three-Way MatchT1 — verbatim ×3, option names character-exact including Microsoft's capitalisationSame pagePASS
31"The product receipt isn't factored into the matching validations"T1 — verbatimSame pagePASS — the article's spine
42The four matching types, each quotedT1 — verbatim ×4Same pagePASS
52The six totals, quoted as a listT1 — verbatimSame pagePASS
62"a not-to-exceed net amount validation" and the net-amount formulaT1 — verbatim, formula reproduced exactly as publishedSame pagePASS
73The path Accounts payable > Setup > Accounts payable parameters, Invoice validation tab, Line matching policy fieldT1 — verbatim. Not invented navigation; Microsoft publishes the path and the field namesSame pagePASS
83"To allow a different level of matching to be applied for an item, vendor, vendor and item combination, or purchase order line, select a value in the Allow matching policy override field"T1 — verbatimSame pagePASS
93Two lines on one invoice can be tested differentlyT2 — ours, a direct consequence of claim 8—PASS
103Automatically update invoice header match status, with Microsoft's recommendation and the No consequenceT1 — verbatim ×2Same pagePASS
114"The legal entity default price tolerance is set to zero percent for two-way and three-way matching"T1 — verbatimSame pagePASS
124"the applicable price tolerance percentage is searched for", and that the most specific winsT1 for the quotation; T2 for "most specific wins", which is our reading of the search orderSame pagePASS
134Allow with warning — "visual indication displays… However, you can post the invoice"T1 — verbatimSame pagePASS
144The workflow interaction and Microsoft's advice to use Allow with warningT1 — verbatimSame pagePASS
155Three-way is only as good as the receipt discipline behind it; two-way hides the problemT2 — ours, a recommendation. Argued, not asserted, and it names the trade-off rather than claiming a result—PASS

Tier summary: 12 × T1 (all verbatim), 3 × T2 — 0 × T4.

🔴 Percentages appear and they are Microsoft's, not ours. "Zero percent" is Microsoft's published default. No percentage in this article describes our performance, a saving, or a measured outcome — the distinction PUBLISHING-CONTRACT.md §1 turns on. Zero digits appear in either lifted block.

🔴 No pricing. No rate, currency or cost figure anywhere.

No unbounded absence claimed. The strongest negative — "the product receipt isn't factored into the matching validations" — is Microsoft's own sentence about its own product, quoted with its policy name attached.

No figures of ours. No volume, no accuracy, no customer, no result.

Share this article

The work behind this series

Receipts chased, aged GRNI investigated, vendor invoices read and matched — each agent listed with what it touches and how far it has actually been built.

Ali Ahmed

Ali Ahmed

AI Solutions Engineer, Cognilium AI

Ali Ahmed is an AI Solutions Engineer at Cognilium AI.

Applied AI AgentsAgentic SystemsRetrieval-Augmented Generation (RAG)LLM Product Engineering
In short

Key takeaways

  • Two-way compares invoice price to purchase order price. Three-way adds the product receipt quantity.
  • Under a two-way policy the product receipt is not factored in at all, so a quantity difference between what arrived and what was billed is not tested.
  • Four matching types exist — line level, invoice totals, charges, and price totals for line items. Saying "we do three-way" does not mean the others are on.
  • The policy is a legal-entity default that can be overridden per vendor, item, combination or line, so two lines on one invoice can be tested differently.
  • The default price tolerance is zero percent, and the most specific tolerance configured wins.
  • A discrepancy does not always block posting. The Post invoice with discrepancies setting decides.
What goes wrong

Common mistakes to avoid

  • Assuming two-way is a lighter three-way. It excludes the receipt entirely.
  • Blaming the data before checking for an override. Vendor and item overrides change what was tested.
  • Expecting tolerances to be generous by default. They start at zero.
  • Relaxing the policy because receipts are unreliable. That hides a warehouse problem in the ledger.

Terms in this article

Definitions in the Cognilium glossary.

Frequently Asked Questions

Find answers to common questions about the topics covered in this article.

Two-way matching compares the unit price on the invoice with the unit price on the purchase order. In Microsoft's words, three-way matching "additionally compares the invoice quantity to the matched product receipt quantity." The common mistake is reading two-way as a lighter version of the same check: it excludes the receipt entirely, so if you are billed for ten and received six, two-way matching has no opinion.
Microsoft names four matching types — price, quantity against the product receipt, and two totals checks — and line matching and totals matching are separate switches, so "we do three-way matching" does not mean every check is on. The totals check matters if vendors bill in instalments: it acts as "a not-to-exceed net amount validation" against the purchase order line, and Microsoft notes that "if you typically receive only one invoice per purchase order line, this type of matching isn't necessary."
The default lives on Accounts payable > Setup > Accounts payable parameters, on the Invoice validation tab, in the Line matching policy field — and Microsoft describes it as "a value used as the default policy for the legal entity that you are working with."
Zero tolerance means any price difference is a discrepancy. Tolerances are then configured per legal entity, item and vendor on the Item price tolerance page, and Microsoft notes that "When vendor invoices are compared with the information on purchase orders, the applicable price tolerance percentage is searched for" — so the most specific tolerance wins.
Three-way, unless you have a specific reason not to — and the reason is usually the receipt discipline, not the matching.
The matching policies on this page — the Line matching policy field, price tolerances per item and vendor — belong to Dynamics 365 Finance and the other finance and operations apps. Business Central is a separate product. In it, Microsoft's Payables Agent handles the comparison when an invoice references purchase orders: "the agent proposes purchase order lines. Business Central validates compatible order lines, allocates invoice quantities, and evaluates order-match warnings" — and those warnings are "Business Central quantity, receipt, unit-of-measure, and price validations."
Through the Payables Agent and Business Central's own checks. The agent extracts the invoice and proposes matching purchase order lines; Business Central checks the lines are compatible, allocates the invoice quantities, and raises quantity, receipt, unit-of-measure and price warnings for review on the Purchase document draft page. Microsoft is explicit that those warnings "aren't AI confidence indicators" — they are Business Central validations. Lines that aren't matched continue through the normal review process.

Still have questions?

Get in touch with our team for personalized assistance.

Contact Us

Still have a question this did not answer?

The person who wrote this article answers these. Describe your setup and what you are stuck on — you will get a straight answer, including where we think the approach is wrong.

Personalized for You

Curated content recommendations based on your current reading and interests.

For You
115%

Does Dynamics 365 match product receipts to invoices automatically?

Same topic cluster: Procure-to-Pay Agent Operations
Same author: Ali Ahmed

Yes, in the background, hourly or daily, where a three-way policy exists. It also has a retry limit, so some lines stop being tried altogether.

Ali Ahmed
5 min read
Procure-to-Pay Agent Operations
Read Article
Trending
43%

Does row-level security carry from Dynamics 365 into Fabric?

High priority content
Related topic cluster: ERP Write-Back & Integration

It does not. Extensible data security is bypassed for Synapse Link, so lakehouse access shows every legal entity and cost price. What to rebuild.

Mudassir Marwat
5 min read
ERP Write-Back & Integration
Read Article
For You
115%

Can an AI agent post a product receipt in Dynamics 365?

Same topic cluster: Procure-to-Pay Agent Operations
Same author: Ali Ahmed

Yes, if the identity it runs under is allowed to. The posting goes through the same business logic, validations and workflows as a person in the client.

Ali Ahmed
5 min read
Procure-to-Pay Agent Operations
Read Article
For You
115%

How does someone confirm a delivery without a Dynamics 365 licence?

Same topic cluster: Procure-to-Pay Agent Operations
Same author: Ali Ahmed

Not by borrowing one. Microsoft gives the ERP MCP server no anonymous path, so the confirmation has to be mediated and a known identity does the posting.

Ali Ahmed
5 min read
Procure-to-Pay Agent Operations
Read Article
For You
115%

Where do you find purchase orders that are not yet invoiced?

Same topic cluster: Procure-to-Pay Agent Operations
Same author: Ali Ahmed

In the vendor invoice automation workspace, under Documents not invoiced. It is an accounts payable view, which is why procurement rarely finds it.

Ali Ahmed
4 min read
Procure-to-Pay Agent Operations
Read Article
For You
115%

Is your Dynamics 365 F&O ready for AI agents?

Same topic cluster: Procure-to-Pay Agent Operations
Same author: Ali Ahmed

Six checks in the order that blocks a project. Version and tier are binary. The two that stop most pilots are who may connect and who owns the identity.

Ali Ahmed
6 min read
Procure-to-Pay Agent Operations
Read Article

Smart Recommendations

Our AI analyzes topic clusters, author expertise, and content relationships to surface the most relevant articles for you.

Topic Matching
Author Expertise
Content Quality
Personal Interests

Questions on this?

Talk to an engineer

Schedule a call