> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercora.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Matching documents to trades

> How Mercora links a document to its trade, how recommendations are shown, and how to match, move or unmatch a document yourself.

Every document needs to end up on the right trade before its [discrepancy checks](https://docs.mercora.io/documents/discrepancies.md) can run and before you approve it. Matching is the first step of reviewing a document in the [Inbox](https://docs.mercora.io/documents/inbox.md), and Mercora does most of the finding. How far it goes depends on how sure it is:

* **When it's sure, it links the document itself** and shows you why.
* **When it's less sure, it recommends a trade** and waits for you to click **Match**.
* **When a reference could point to more than one trade, it doesn't guess.**

Either way, the document still waits for you to approve it, and you can always change the trade. See [How Mercora works](https://docs.mercora.io/concepts/how-mercora-works.md) for the trust model behind this.

> [!NOTE]
>
> Matching is available when the **Trades** module is turned on for your workspace. Without it, documents complete on their own and there's nothing to match. To see or change the trade a document is on, your role needs access to trades. Ask your workspace admin.

## What Mercora links on its own

Mercora links a document to a trade without asking in two cases:

* **An exact reference that identifies exactly one trade.** Mercora looks for the trade reference, the contract number, the deal reference that ties a purchase and a sale contract together, and the B/L (bill of lading) number. If one of these matches exactly one trade, the document goes on that trade.
* **Strong evidence across the document.** When there's no exact reference, Mercora weighs the rest of the document, such as the parties, product, quantity, vessel and dates, against your open trades. If the evidence clearly points to one trade, it links the document to it.

Under the **Trade** field, the review panel says why, for example:

* "Trade reference ALU-2026-0012 on the document"
* "B/L RCLLCH2607841 on the document"
* "AI match · Shipping marks explicitly cite CONTRACT VCS-S-2026-0714"

Mercora then runs the document's checks against that trade straight away, so it's ready for you to review.

If the same reference appears on two or more trades, Mercora doesn't pick one. It treats them as candidates and leaves the choice to you.

## Recommended trades

When Mercora has a likely trade but isn't sure, it doesn't link the document. Instead, it pre-selects that trade in the **Trade** field with a **Recommended** label and a short reason, for example "Recommended · AI suggestion · This is purchase contract VCS-P-2026-0688". The line beside the button reads "Links it and runs the checks". Nothing is linked until you click **Match**.

For a contract or a recap that no trade carries yet, Mercora may recommend **New trade from this contract** (or **from this recap**) instead. See [Starting a trade from a contract](#starting-a-trade-from-a-contract-or-recap).

If Mercora has nothing to recommend, the field is empty and the document sits in the **Match** section of **Needs you** with the status **Unmatched**. A note under the field may say why nothing was recommended.

![The Match step with a recommended trade and the Match button](https://mintcdn.com/placeholder-f4ffdeec/22McaegbdDRSI41b/images/documents/match-step-recommended.png?fit=max\&auto=format\&n=22McaegbdDRSI41b\&q=85\&s=02a8088829f6d0daa68f1aa1f8624703)

Purchase contract VCS-P-2026-0688 from Kanchana Siam Sugar arrives unmatched, and Mercora recommends sugar trade VCS-S-2026-0714.

## Match a document yourself

**1. Open the document**

Open it from the Inbox. Unmatched documents are in **Needs you**, under **Match**.

**2. Choose the trade**

Click the **Trade** field. The list puts the likeliest trades first:

* **Suggested**: what Mercora recommends, with its reason.
* **Same vessel** and **Same product**: open trades that share the document's vessel or product.
* **Other trades**: everything else. Type to search them by trade, contract, counterparty, product or vessel.

Completed trades are marked as such.

**3. Click Match**

The line beside the button says what it does: "Links it and runs the checks". Mercora links the document and checks it against the trade. When it's done, the step shows **✓ Match** and **Checked**, with the number of differences found.

Under a trade you matched, the panel records who did it: "You matched it", or "Matched by *name*".

### A document that belongs to no trade

Some documents don't belong to any trade, for example a general certificate or a document for a deal you don't track in Mercora. Choose **No trade** at the bottom of the list and click **Match**. This "Records that it belongs to no trade · nothing to check".

When you approve it, the button reads **Approve without a trade** and asks you to confirm: "It won't be on any deal or shipment."

### Several documents at once

To put several unmatched documents on the same trade, tick them in the **Match** section of the rail (shift-click selects a range), choose the trade in **Assign selected documents**, and click **Assign N documents**. See [The Inbox](https://docs.mercora.io/documents/inbox.md#assign-several-documents-at-once).

### Choosing the trade when you upload

If you pick a trade in **Associate with Trade (Optional)** when you [upload](https://docs.mercora.io/documents/uploading.md), or upload from a trade's **Documents** tab, the documents go straight onto that trade and Mercora doesn't try to match them elsewhere.

## Starting a trade from a contract or recap

A contract or a recap is often the first document for a deal. When no trade carries it yet, the **Trade** list offers **New trade from this contract** (or **New trade from this recap**), and Mercora may pre-select it as its recommendation. The line under the field reads "Approve creates the new trade · nothing to check yet". Click **Approve**: the [approval flow](https://docs.mercora.io/documents/inbox.md#contracts-and-recaps) opens and creates the trade from the document. Nothing is created until you approve.

![The Match step recommending a new trade from a contract](https://mintcdn.com/placeholder-f4ffdeec/22McaegbdDRSI41b/images/documents/match-step-new-trade.png?fit=max\&auto=format\&n=22McaegbdDRSI41b\&q=85\&s=2357cd8c791e408e56c2521b44a425d2)

Veltana Metals SA: no trade carries ALU-2026-0012 yet, so Mercora recommends a new trade from purchase contract P-2026-0893, and notes the matching sale contract S-2026-0517 waiting in the Inbox.

## Trade legs

A trade usually has a purchase leg (buying from your supplier) and a sale leg (selling to your customer). Mercora never puts a document on a leg by itself. You set the leg for a contract when you approve it, in the approval flow's **Should this document create a trade leg?** step. Other documents sit on the trade as a whole. See [The Inbox](https://docs.mercora.io/documents/inbox.md#contracts-and-recaps).

> [!NOTE]
>
> If your workspace uses the **Contracts** module, a document whose contract number matches a standalone contract is kept on that contract, shown as "On contract *number* · no trade". Ask your workspace admin.

## Change the trade before approving

On a matched document, click **Change** next to **✓ Match**, pick another trade (or **No trade**), and click **Match**. Click **Cancel** to keep the current trade.

If you've already resolved discrepancies against the current trade, moving the document drops them, because they were about that trade. The panel warns you, for example "Leaving *trade* drops 2 resolved differences", and the button reads **Match anyway**.

## Move or unmatch an approved document

Once a document is approved, the Match step is fixed. To move it:

1. Open the **⋯** menu at the top of the document.
2. Choose **Reassign to Trade**.
3. Pick the new trade (the current one is marked **Current**), or choose **Unmatched (remove from trade)** to take it off its trade.

Mercora confirms with "Moved to *trade*" or "Document unmatched". For documents that belong to a shipment, it then offers the new trade's shipments so you can pick the right one.

You can also do this from the **⋯** menu on the document in a trade's **Documents** tab.

## When trades change

If a trade is created or changed while documents are still waiting for a match, Mercora tries to match them again. While it does, the **Trade** field says "Matching it again after a trade changed…".

## Next steps

> **[Discrepancies](https://docs.mercora.io/documents/discrepancies.md)**
>
> What Mercora checks once a document is on a trade, and how to resolve differences.

> **[Trades overview](https://docs.mercora.io/trades/overview.md)**
>
> A trade's documents, discrepancies and legs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.