# How to Check Shipping Documents With AI

> The import shipments that cost money are the ones whose papers disagree, above all when the gap turns up after filing. AI agents compare all three papers as they land and leave every fix to your desk.

By Piotr Babel, Partner @ Qvery · Published 2026-11-30 · 16 min read
Canonical: https://qvery.ai/blog/how-to-build-shipping-document-matching-agent/

Every import shipment your desk clears arrives as three papers from different hands: the seller's commercial invoice, the packing list that says what is in each carton, and the bill of lading, the carrier's receipt for the load.

Before anyone writes the entry, the declaration your broker files with customs, an entry writer reads the three against each other: the importer's name (the consignee), the cartons, the weight, the value, each item code and quantity.

Say your desk clears 700 shipments a month and a careful read takes 15 minutes. That is **175 hours** of a writer's month, about **$83,000 a year** at what a cargo agent costs with benefits, by the Bureau of Labor Statistics' pay figures.

Most sets agree. The ones that don't, and get past the read, can [surface after filing](https://qvery.ai/blog/why-invoice-packing-list-mismatches-stop-containers/): a corrected entry, a shipment held while the papers are redone, and sometimes the importer's chargeback for the trouble.

AI agents do this comparing now, on every set, as the papers arrive.

> 📌 At Qvery, we help customs brokers stop paying dock storage over papers that don't match, with custom AI agents that compare every shipment's three papers and draft the shipper's corrections.

We ran the whole check on one sample brokerage's files, a model reading the pages and code doing every sum and every comparison. The brokerage is invented: Rio Alto Customs and Freight, 200 people in Laredo, Texas, clearing trucks from Mexico.

Its files are a document check procedure, one importer's standing instructions, one truck's three papers, the shipper's email, a storage bill and six weeks of its entries queue, the log where each shipment's check and filing are recorded. The answer key was written with the files, before the run.

- **8** differences on one truck's papers
- **1** weight that can't be read, reported and never guessed
- **41** of 41 past mismatches flagged in the sample's six weeks
- **3** blank rules handed to the broker

Source: Qvery's run on an invented sample brokerage's files, November 2026

Each of the seven steps below carries the screen the run produced. Right after the agents draft the shipper's email, you can run the same check on your own papers.

**What you'll need**
- **The three papers:** each shipment's commercial invoice, packing list and bill of lading, as they arrive: PDFs, scans or phone photos
- **Your check procedure:** what your desk compares, its tolerances and who writes to the shipper, blanks included
- **Each importer's standing instructions:** its exact legal name, how goods must be described, what it charges back
- **Your entries queue:** six weeks of it, with the shipments corrected after filing marked

Time: about a minute of machine time for one shipment; the six weeks take seconds

This checks the three papers that travel with an import, here a truck crossing at Laredo. A shipping instruction against a draft bill, or a house bill against its master, is the same method on another pair. Classification, value and duty stay with your licensed customs broker.

## File Each Paper to Its Shipment First

The three papers rarely arrive together. The invoice and the packing list come from the seller, often in one email; the bill of lading comes from the carrier, sometimes as a draft first, sometimes a day later.

The agents file each paper to its shipment by the reference printed on it. Here all three carry MHN-26-3318, and the bill also carries the carrier's booking number, SMX-558120.

Nothing is compared until all three are in. A set still missing a paper waits, and the missing paper is named on it.

![Step 1 sheet: the first pages of the invoice, packing list and scanned bill of lading for shipment MHN-26-3318, filed as one complete set of seven pages.](https://qvery.ai/blog/how-to-build-shipping-document-matching-agent/screenshot-papers.webp)

*The three papers for MHN-26-3318 as they arrived: a three-page invoice, a two-page packing list and a two-page bill of lading, scanned, with its gross weight smudged.*

**What you should see:** **seven pages** from three papers, all under one reference. A paper filed to the wrong shipment shows up here as a reference that differs, before it spoils a comparison.

## Read Every Value With Its Page

A model does the reading. We gave the page images to Anthropic's Sonnet and its smaller Haiku and asked for every value with the paper and page it came from, and the word unreadable for anything on the page they could not read.

Both read all **160** printed values on the invoice and the packing list exactly as the PDFs hold them: every item code, quantity, amount, carton count and net weight.

The bill of lading is a scan, and the gross weight in its goods table is a smudge. Both models returned it as unreadable and neither guessed, in the read alone and again with the shipper's whole email thread in front of them.

![Step 2 sheet: consignee, cartons, pallets, gross weight, value and lines read from all three papers with pages; the bill's gross weight marked unreadable.](https://qvery.ai/blog/how-to-build-shipping-document-matching-agent/screenshot-read.webp)

*The read of all three papers side by side, each value with its paper and page, and the bill's gross weight marked unreadable on page 1.*

> ⚠️ **The number in the email is not the number on the bill** The shipper's reply says the truck weighed 8,240 kg at the plant scale; the packing list shows the order weight, 8,420 kg. The agents show the email's figure beside the papers and leave the bill's cell unreadable: only a corrected paper changes what the papers say.

## Add Up Each Paper Before Comparing Any Two

Every sum is code, in exact decimals, so it comes out the same on every run.

The invoice's 22 lines add to **$62,080.50**. Its printed total says **$62,440.50**, **$360.00** more. The bill's declared value is $62,440.50 as well: it copied the printed total, so the agents report one finding in two places, not two findings.

The packing list ties to itself. Its rows add to 142 cartons, 5,765 units and 6,216.5 kg net, the same as its own control totals.

> 📖 **What the $360 is** 
> - **What it is:** The shipper's email calls it export packing that was never listed as a line. The federal rule on what a commercial invoice must state wants every charge on the goods itemized by name and amount; packing may stay inside the price only when the invoice says so. This invoice does neither, so the gap goes to the shipper as a question.
> - **The fix:** a corrected invoice that lists the packing as its own line, or says the price includes it.
> - **How you know it held:** the corrected lines add up to the printed total, and the bill's declared value matches it.

![Step 3 sheet: the invoice's lines add to $62,080.50 against a printed $62,440.50, $360.00 apart; the packing list's rows tie to its control totals.](https://qvery.ai/blog/how-to-build-shipping-document-matching-agent/screenshot-sums.webp)

*Each paper added up against itself: the invoice's lines against its printed total, the packing list's rows against its control totals.*

## Compare the Three Papers Field by Field

Code compares each field your procedure names, line by line, matching goods by item code first and by description where the codes disagree.

**MHN-26-3318, field by field**

| Field | What the three papers say | Result |
|---|---|---|
| Consignee | Supply, LLC on the invoice and packing list; Distribution, LLC on the bill (p1) | Difference: the importer requires "Supply", exactly |
| Cartons | Invoice 142 (p3), packing list 142 (p2), bill 140 (p1) | Difference |
| Pallets | Six on all three | Match |
| Gross weight | Packing list 8,420 kg (p2); bill unreadable (p1); not on the invoice | Can't compare yet |
| Value | Invoice $62,440.50 printed, lines $62,080.50 (p3); bill $62,440.50 (p1) | The $360, one finding |
| Hex bolt M10 x 60 mm, 300 boxes | Invoice HB-4410-M10, packing list HB-4410-M12 (both p1) | Difference: same goods, another code |
| WS-1102 wood screw | Invoice 600 boxes, packing list 560 boxes (both p1) | Difference: 40 boxes |
| "Assorted parts", "Accessories kit" | Invoice $1,840.00 and $960.00 (p3); same words on the packing list (p2) | Returned: they name no goods |

The bolt line shows why goods are matched by description as well as by code. Both papers describe an M10 bolt, but the packing list gives it the M12 code, and its next line is the real M12, so that code now appears twice. Matching on codes alone would have paired the wrong lines.

The two vague lines go back for a different reason. Your procedure returns any line described only as parts or accessories, and the customs rules ask for goods described by the name they are known by.

Pallets agree at six on all three papers, so they pass.

So do **13** consignee names in the six weeks of entries below that differ from the bill only by a comma or a period. Rio Alto's procedure is silent on punctuation, so the agents start from a written default the broker approves or changes: a different word is a difference, a comma is not.

![Step 4 sheet: 22 invoice lines matched to the packing list; 18 match, HB-4410-M10 has another code, WS-1102 is 600 against 560, two lines name no goods.](https://qvery.ai/blog/how-to-build-shipping-document-matching-agent/screenshot-lines.webp)

*The 22 invoice lines matched to the packing list: 18 match, the bolt's code differs, WS-1102 is 40 boxes apart, and two lines name no goods.*

People who do this check for a living put weights, counts and values first among the things that cannot drift:

**Tips**

> The weight and quantity of the packages must be almost perfect, must match with the invoice. A lot of the information need for the rest of the operations depends and is generated from this info.
> ([r/freightforwarding · May 2026](https://www.reddit.com/r/freightforwarding/comments/1tabm1u/comment/olakiv4/))

> All the lines need to add up to equal or less than the total gross weight. Gross weight is all the items plus packaging.
> ([r/CustomsBroker · Oct 2023](https://www.reddit.com/r/CustomsBroker/comments/17cjqiu/comment/k5qi2aj/))

> there is no such thing as "free" on a commercial invoice. Every zero value line had to have an added annotation "Value for customs purposes only $xxx" and that too had to pass the pub test
> ([r/freightforwarding · Jun 2026](https://www.reddit.com/r/freightforwarding/comments/1u3g9z8/comment/orgvniu/))

## Hand the Blank Rules to Your Broker

**Three** rules on Rio Alto's own pages are blanks. The procedure says the bill's weight may differ from the packing list "by up to ____ percent", and that "The email is sent by ____". The importer's instructions leave blank the value above which its buyer approves an entry.

A blank is not a setting for the agents to choose. They list each one with its section and leave it to the licensed broker who owns the procedure. Until the tolerance is filled in, they report any weight difference at all.

Here the read slipped once. One model took "The email is sent by ____" for a missing deadline rather than a missing name, which is the reason a blank goes to a person and never to a guess.

![Step 5 sheet: three blank rules quoted, procedure 3.1 on weight tolerance, 5.2 on who emails the shipper, and the importer's 3.2 on buyer approval.](https://qvery.ai/blog/how-to-build-shipping-document-matching-agent/screenshot-blanks.webp)

*The three blank rules, each quoted with its document and section, listed for the broker apart from the shipper's questions.*

> A model that reads a clean page is the easy part of this build. What decides whether your broker can trust the agents is the rule each value is held to, written down: what counts as a difference, which weight tolerance applies, who writes to the shipper. Where your procedure leaves a blank, we would rather the agents stop and ask than guess.
>
> Piotr Babel, Partner @ Qvery

## Draft One Email to the Shipper

The thread already holds an answer. On 12 November the entry writer sent the shipper seven questions. On 13 November the shipper answered three: the weight is 8,240 kg by the plant scale, the $360 is packing, and the consignee's name on the bill is the carrier's template.

The agents sort the points the same way: **three** answered, though not yet on any paper, and **four** still open (the cartons, the bolt code, WS-1102 and the two vague lines).

Then they draft one follow-up with the cutoff first. Page 2 of the bill sets it: corrected papers must reach the carrier by Monday, 16 November, at **16:00** Monterrey time, or the truck misses Tuesday's crossing.

![Step 6 sheet: the drafted follow-up to the shipper, cutoff first, three answered points with the paper each needs and four open questions with both values.](https://qvery.ai/blog/how-to-build-shipping-document-matching-agent/screenshot-email.webp)

*The drafted follow-up to the shipper's export coordinator: the cutoff, the three answered points with the paper each still needs, four open questions with both values and their pages.*

Someone on your desk reads it, edits it and sends it. In our run that read earned its minute: the draft put the invoice's carton count on page 2, and it is on page 3.

When corrected papers come back, the set goes through again from the read. Nothing reaches your forwarding system until the writer marks the set ready.

If you'd rather see this on your own shipment than on Rio Alto's, drop its three papers into the box below.

Free report: logistics/shipping-document-matching

## Prove It on Six Weeks of Your Own Entries First

One truck shows how the reading works on clean pages and one smudge. The rules need more shipments than that, and your entries queue already has them: every shipment's check, filing date and correction, logged.

Rio Alto's queue covers 186 shipments received from 1 October to 11 November. The export has 187 rows, because one shipment appears twice; the agents count it once.

Run on the procedure's rules, plus that default about commas, the code flags **41** shipments whose papers disagree. They are the same 41 the desk found: **12** at the document check and **29** only after the entry was filed.

It flags no shipment the desk had not found, and it misses none the desk had.

**Nine** of the 24 weight differences are bills showing pounds in the kilogram column, 2.2046 times the packing list's figure. That one habit, fixed where those bills are written, would clear more than a third of the weight problems.

We also gave the same file to both models with a plain request and no rules.

**Six weeks of entries, counted three ways**

| Who counted | Shipments whose papers disagree | What decided it |
|---|---|---|
| Code, on written rules | 41 | Rio Alto's procedure, plus the default that a comma is not a difference |
| Haiku, no rules given | 53 | It counted names that differ only by punctuation |
| Sonnet, no rules given | 40 | It decided pounds in the kilogram column are not a weight difference |

Each model made up a sensible rule and applied it without saying so. Your broker can't check a rule that lives only inside a model, so the agents read with a model and count with code that applies your written rules, the same way, every time.

![Step 7 sheet: six weeks, 186 shipments, 41 whose papers disagree, 12 found at the check and 29 after filing, with the disagreements by kind.](https://qvery.ai/blog/how-to-build-shipping-document-matching-agent/screenshot-backtest.webp)

*Six weeks of Rio Alto's entries run through the agents: 41 shipments flagged by kind, when the desk found each one, the hold days and storage behind the 29 found late.*

Before go-live, the reading is checked on past sets' own pages, every value against its paper, and the rules against your queue. Every shipment where the agents and your desk disagree is read by a person before the agents see a live set.

## The Late Finds Cost More Than the Checking

On Rio Alto's own records, the 29 late finds kept shipments **102 days** on the cross-dock: **$18,870** of storage, billed to the broker. One importer's instructions charge **$250** for every entry filed and then corrected, and nine of its entries were: **$2,250**.

The checking itself was smaller money. The 186 checks took 51.6 hours in those six weeks, **$2,042** of a writer's time at the calculator's hourly cost, against **$21,120** for the late finds. The checks also ran 16.7 minutes on average, where the procedure says 10.

Those are the sample's numbers; your queue holds your own.

The calculator below counts the checking time on your own desk's numbers.

(An interactive calculator on the page: roi-shipment-paper-check.)

Its example is ours: 700 shipments a month at an assumed 15 minutes each by hand and 6 with the agents, a cargo agent's $39.54 an hour with benefits, and an estimated $445 a month to run the agents.

The desk gets back **1,260 hours** a year, about **$44,480** after running costs. On that return, $10,000 of build cost is recovered in about **2.7 months**.

The late finds are not in that figure. A mismatch caught before filing can no longer become a corrected entry or an importer's chargeback; whether the shipment still waits depends on how fast the shipper sends corrected papers.

The hours are worth most when they go to entries you would otherwise hire another writer for.

> The minutes a check takes are the easy number to count, and they are rarely the one that decides this. Before deciding anything about agents, pull from your own queue every set corrected after filing last quarter, with what each one cost in storage, holds and chargebacks. That list, more than the minutes, is what the agents are there to shorten.
>
> Vlad Shvets, Partner @ Qvery

## Where Qvery's Agents Sit on Your Entry Desk

The agents we build for customs brokers and forwarders start where your papers already land: the documents inbox and the shipment folders. Shippers and carriers change nothing.

They file each paper to its shipment, read every value with its page, add up each paper and compare the three against your procedure and each importer's instructions.

Two things land on your writer's screen: the side-by-side with every difference and every unreadable page, and the email to the shipper, drafted. Your writer sends it.

Corrected papers go through again, and checked figures reach your forwarding system only after the writer marks the set ready.

![A shipment’s three papers and the desk’s rules go to AI agents that read, add up, compare and draft the shipper’s email; the entry writer sends it, and checked figures reach the forwarding system.](https://qvery.ai/blog/how-to-build-shipping-document-matching-agent/illustration-agent-flow-shipping-documents.webp)

*The agents read, add up and compare each set and draft the shipper’s email; your writer sends it, and every blank rule stays with your broker.*

Trade papers carry prices, buyers and suppliers, so the agents work with the least they need and leave a log of every read and every draft.

**What the agents may and never do**

| The agents may | The agents never |
|---|---|
| Read the documents inbox and shipment folders | Classify goods, set a value or a duty |
| Add up and compare by your written rules | File, change or cancel an entry |
| List unreadable pages and blank rules | Fill in a number they can't read |
| Draft the email to the shipper | Send an email or contact anyone |
| Update the shipment once your writer marks it ready | Decide a blank rule for your broker |

The same desk handles other paperwork that runs on the same reading and checking: a new carrier's packet, the bill for a container held too long at the terminal, [a cargo claim and its deadlines](https://qvery.ai/blog/how-long-carrier-has-to-pay-freight-claim/).

AI agents for logistics: https://qvery.ai/logistics/

## Bring Us Your Procedure, Blanks and All

Your desk brings mostly what Rio Alto's run used:

1. **The check procedure** blanks and all, and the broker who owns it
2. **Each regular importer's instructions** the legal name, the description rules, the charges
3. **Read access** the documents inbox and the shipment folders
4. **Six weeks of your queue** with the late corrections marked
5. **Your broker's time** an hour or two to fill in the blanks

Before the agents touch a system, what they may read and do is set down in writing. Then they run on your past six weeks first, so your broker sees their findings set against the desk's own before a live set goes through.

Let Qvery's Agents Check Every Shipment's Papers Before Your Writers File: https://calendly.com/qvery-vlad/30min

Once access is in place, live sets go through them inside two weeks, beside your writers. Each week we count what changed: hours your writers got back, and mismatches stopped before filing.

## Frequently asked questions



### Is a packing list the same as a commercial invoice?

No. The commercial invoice records the sale: who sold what to whom, at what price and on which terms. The packing list records the shipment: which goods sit in which carton, how many and what they weigh. US customs rules ask the invoice to say what each package holds, so the two must agree.

### Is a bill of lading the same as a commercial invoice?

No. The bill of lading is the carrier's paper: its receipt for the load, naming the shipper, the consignee, the packages and the weight. Its declared value often copies the invoice's total, as on the sample truck, so a wrong total can travel onto the bill without anyone retyping it.

### What does the agent check beyond the weight, the shipper and the consignee?

Every field your procedure names. On the sample: cartons, pallets, value, each line's item code and quantity, the invoice's own arithmetic, goods described only as parts or accessories, the consignee against the importer's legal name, and the cutoff on the bill. It also lists the blanks in your rules for the broker.

### What if the packing list shows what shipped and the invoice shows what was ordered?

Ordered and shipped quantities are kept apart, so a partial shipment is not a mismatch on its own. What gets flagged is the sample's case: the invoice bills 600 boxes of one screw and the packing list says 560 were packed. Which paper is wrong is the shipper's to say.

### Can the agents read phone photos and handwritten corrections?

Yes. They read page images, which is how the sample's scanned bill was read; a phone photo is read the same way. A value they can see but not read is marked unreadable with its page. A handwritten correction on a draft bill is shown next to the typed figure it changes; your writer decides which stands.

### Does it check the HS code or the duty?

No. The HS code, the tariff number the goods are [classified](https://qvery.ai/blog/ai-hts-classification/) under, is your licensed broker's work, as are value and duty. The agents only check that each line names its goods well enough to classify. That is how the sample's "Assorted parts" and "Accessories kit" went back to the shipper.

### How long does a check take with the agents?

About a minute of machine time for the sample shipment. Your writer's part is reading the side-by-side, opening the flagged pages and editing the email when a set disagrees. The calculator above assumes six minutes a shipment for that, against fifteen by hand; set both to your desk's own numbers.

### Who can see our importers' prices and suppliers?

Your team sees them in the findings; the agents read them through an AI model. Before any build, what they may read and where that data is processed is put in writing, under a data processing agreement with Qvery AI OÜ in Estonia. Every read is logged, and the shipper's email quotes only the fields in question.

### Can it check a shipping instruction against the draft bill of lading?

Yes, in your build. It is the same method on a different pair: each field read with its page from both papers, compared by your rules, and every difference named with both values. House bills against their master can be checked the same way, each house matched to its master on its own.

### What happens if the shipper misses the cutoff?

The agents do not move the truck or decide what gets filed. They keep the set open, list what is still missing or still different, and compare the corrected papers the moment they arrive. What happens to the entry is your broker's call, made with the side-by-side in front of them.

### Do we need our forwarding system to accept input from the agents?

No. They start from the shared inbox and the shipment folders, so nothing changes for shippers or your software. Where your forwarding system takes input, checked figures go in only after your writer marks the set ready. Where it doesn't, the side-by-side sits beside the documents.

### How do we know the agents stay accurate after go-live?

Every week we set what the agents flagged against what your desk did with it and against every correction after filing. A missed mismatch, a misread value or a wrong finding comes back to us, and we fix the part of your build that produced it: the reading, the matching or the rule.
