Matchers

What is a Matcher?

A Matcher compares the line items of several documents side by side. It lines up the rows that describe the same item, even when each document words it differently, puts their prices or quantities in one table and marks the winner of every row.

A Matcher sits on top of one flow. The flow does the extraction; the Matcher reads the results of two or more completed runs of that flow and builds one comparison. Each execution is called a Match. Three supplier quotes for the same request, for example, become one table with a price column per supplier and a Champion column naming the cheapest supplier on each line.

Beta

Matchers are in beta. They are available to every organisation, and the way they work may still change.

Try it without an account

The PO vs invoice check and Compare supplier quotes tools on Tavnit Lite run on Matchers.

When to use a Matcher

  • Comparing quotes from several suppliers for the same list of items and picking the cheapest per line
  • Checking an invoice against its purchase order, line by line, to catch price differences
  • Benchmarking new offers against a reference price list or a previous order
  • Finding the highest value per item across documents, such as the best rebate or the largest quantity

If you need pass or fail rules across different kinds of documents (dates, totals, references) rather than a line-by-line price table, use an Inspector instead.

Field roles

A Matcher is defined by the role each field of its flow plays. The options come from the flow you pick, filtered by what each role accepts.

SettingWhat it isWhich fields qualify
Identifier fieldNames each participant, for example Supplier. Every run becomes one participant. If a run has several values, the first is used.Metadata fields only
Match fieldThe text that is matched across runs, for example Item Description. Matching is by meaning, not exact text.Table fields
Comparison fieldThe number the champion rule evaluates, for example Unit Price.Numeric table fields
Context fields (optional)Extra columns, such as unit of measure or pack size, shown to the AI so that unlike items don't merge.Any remaining field
Champion ruleLowest wins or Highest wins. Picks the winner of each matched row. Ties name every winner.—
The flow needs the right fields

The identifier must be a metadata field and the comparison field must be a numeric table field. If the flow has neither, the builder tells you so. Add the fields to the flow first (for example a Supplier metadata field and a Unit Price number column). Composite fields can't be used.

Benchmark and Multilateral modes

ModeHow it comparesWhich rows appear
BenchmarkOne run is the benchmark and every other run is compared to it. You choose the benchmark run each time you run a match.One row per benchmark item. For each other participant, the best-matching item fills its columns. Items that match nothing in the benchmark are left out.
MultilateralAll runs are compared to each other, and the best mixed matches win.Every item appears. Items found in several runs share a row; an item that matches nothing gets its own row.

Use Benchmark when one document is the reference (a purchase order, your price list, last year's contract). Use Multilateral when the documents are peers, such as quotes from competing suppliers.

Creating a Matcher

  1. 1Go to Matchers in the main navigation and click New Matcher.
  2. 2Answer “Which flow's runs will you compare?”: From a flow (pick the flow and a name, then click Next), From an existing matcher (duplicates its configuration with Create copy) or Start from scratch.
  3. 3In Matcher Info, check the name (at least 3 characters), add an optional description and confirm the Flow. All compared runs must belong to this flow.
  4. 4In Fields, choose the Mode, the Identifier field, Match field, Comparison field, the Champion rule and any Context fields.
  5. 5Optionally fill in Email Output and Webhook (the URL must start with https://), and switch on Human in the Loop if every match should wait for a reviewer.
  6. 6Click Create Matcher. You land on the matcher's page, where you can pick reviewers and run your first match.

On the matcher's page, Configuration lets you edit the mode and field roles later, Match History lists every match it has run, and Matcher ID shows the identifier you need for the API. Each match keeps a snapshot of the configuration it ran with, so editing the matcher doesn't change past results.

Running a Match

  1. 1Make sure the documents have been processed by the matcher's flow and their runs are Completed.
  2. 2On the matcher's page, click Run Match.
  3. 3Tick at least two completed runs of the flow.
  4. 4For a Benchmark matcher, click the star on one of the selected runs to make it the Benchmark run.
  5. 5Click Start Match. The match is queued and its page opens, showing progress until the comparison table is ready.

You can also start matches in other ways:

  • By email. In Email Trigger, switch the trigger on and copy the Inbox Address. Email two or more documents (PDF or images) to it: each attachment becomes a run of the flow, and the match starts once they have all finished. The results are sent back as a reply in the same thread, with the table attached as CSV and a PDF report. Email-triggered matches always run in Multilateral mode. Use Allowed Senders to limit who can trigger it.
  • From a Subject case. When a matcher is bound to a Subject, the case page lists it under Checks with a Run button that uses the case's completed runs of the matcher's flow.
  • In a Pipeline, as a node fed by the runs of upstream flows. See Pipelines.
  • Over the API, described below.
StatusMeaning
Queued / RunningThe match is waiting for a worker or comparing rows across runs.
Waiting for documentsAn email-triggered match is waiting for its documents to finish processing.
Awaiting approvalHuman review is on and a reviewer must approve the pairing.
CompletedThe comparison table is ready and outputs have been sent.
FailedThe match could not run. The error message says why.
CancelledA reviewer rejected the match.

Reading the result

A completed match shows a Comparison Table with two columns per participant and a Champion column at the end.

Participant columns are named after the fields and the identifier value: with a match field Item Description, a comparison field Unit Price and a supplier called ACME, you get Item Description-ACME and Unit Price-ACME. A blank pair means that participant had no matching item on that row. The winning participant's columns are highlighted.

An example Multilateral result with the Lowest wins rule. Tied rows name every winner.
Item Description-ACMEUnit Price-ACMEItem Description-GlobexUnit Price-GlobexChampion
Steel bolt M8 x 400.42Bolt M8x40 zinc0.39Globex
Hex nut M80.10Nut, hex, M80.10ACME, Globex
Washer 8 mm0.05ACME

Above the table you will find:

  • Rows and Cells: the size of the result.
  • Warnings: for example a run excluded because its identifier field was empty, two runs merged because they share an identifier, or a comparison value that isn't a number and was left out of the championship.
  • Match Info: matcher, mode, runs, creation time and, for email matches, the sender.
  • Exports: Export to Bucket, CSV, JSON and a PDF report.
How rows are paired

Tavnit compares the match field (plus any context fields) by meaning. Confident pairs are accepted automatically; borderline ones are checked by an AI model that treats size, unit and pack differences as significant: a 12-pack is not the same item as a single unit. When in doubt, items stay apart. If two rows from the same participant end up in one group, the first one is used.

Human review of matches

Switch on Human in the Loop on the matcher and pick the reviewers. Every match then pauses at Awaiting approval before its results are released, and the reviewers are notified by email. Only the reviewers you pick can approve or reject.

  1. 1Open the match from Human in the Loop (or click Review on the match page).
  2. 2The Match Review board shows one column per participant, with the AI's pairings drawn as lines and the source documents alongside.
  3. 3Click a card, then a card in another column, to connect them. Click a line to break a link. Use the X to exclude a row from the results entirely.
  4. 4Click Approve or Reject.
DecisionWhat happens
ApproveThe comparison table and Champion column are rebuilt from your corrected links, and outputs are sent.
RejectThe match is cancelled with your reason. No outputs are sent.

Members with the HITL Only role can review but can't create matchers or run matches. See Human in the Loop.

Outputs

  • In-app notification to whoever started the match.
  • Email Output: the address receives an email when a match completes, with the comparison table attached as CSV.
  • Webhook: a POST with the table as JSON (columns, rows, row_warnings, warnings) plus match_id and matcher_id. See Webhooks.

With human review on, outputs are sent only after approval.

API

Start a match from your own system with your API key. Copy the ID from Matcher ID on the matcher's page.

bash
curl -X POST https://run.tavnit.io/api/matchers/<matcher_id>/run \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_ids": ["<run_a>", "<run_b>", "<run_c>"], "benchmark_run_id": "<run_a>"}'
  • run_ids: two or more completed runs of the matcher's flow.
  • benchmark_run_id: required for Benchmark matchers, and must be one of run_ids. Leave it out for Multilateral.
  • The response is 202 with match_id and status (queued). A 402 means your organization can't start new work right now; contact the Tavnit team. A 400 explains what is wrong with the request.
  • Configure a Webhook on the matcher to receive the comparison table when the match completes.

Authentication and the other endpoints are covered in API Integration.

Limits and permissions

  • 2 to 10 runs per match, all completed and from the matcher's flow.
  • Up to 5,000 result rows per run.
  • Email trigger: at least two readable attachments and no more than 10.
  • Every member except HITL Only can create, edit and delete matchers and run matches.

Troubleshooting

ProblemWhat to do
No options in Identifier field or Comparison fieldThe flow has no metadata field or no number column. Add one to the flow, then come back.
A run is missing from the Run Match listOnly completed runs of the matcher's flow are listed. Wait for the run to finish, or check it was processed by the same flow.
Warning: a run was excludedIts identifier field was empty. Fix the value on the run, or make the identifier field more reliable in the flow.
Two suppliers were merged into one participantBoth runs extracted the same identifier value. Their rows are merged and the first row wins on conflicts.
Different items were paired, or the same item wasn'tAdd context fields such as unit of measure or pack size, or switch on human review to correct pairings before release.
A row has no championNone of the participants on that row has a numeric comparison value.
Running from a Subject case fails with a benchmark errorThe case's Run button doesn't choose a benchmark run. Use a Multilateral matcher for Subjects.
Nobody can approve a paused matchOnly the reviewers picked on the matcher can approve. Add reviewers in Human in the Loop.