Aiinfox logoThink Smart, Build Future
The AI TMS Blueprint · Sheet 04

Freight document intake

The paperwork that never arrives as EDI — rate confirmations, bills of lading, proofs of delivery, lumper receipts and scale tickets — turned into records against the right load. The matching problem, the places extraction genuinely fails, and what should never be committed without a person.

Why not just EDI

The X12 flows do not carry the images

Tenders, acknowledgements, status and invoices move as transaction sets. The signed bill of lading, the proof of delivery, the lumper receipt and the rate confirmation PDF arrive by email, portal, SFTP, scan or a photograph taken at the dock.

That is why a document path exists alongsidea perfectly working EDI integration — and why “we are EDI-connected” does not solve any of this.

Sheet 01 covers the EDI side: 204, 990, 214 onboarding and repair.

5

Items the federal rule actually requires on a bill of lading — there is no mandated form

9 months

The shortest window a carrier may allow for filing a cargo claim

~90%

Of ten-character PROs fully correct at 99% per-character accuracy

$4,500

Fixed-price pilot: one document type, one channel, three weeks

The channels

Provenance and image quality run in opposite directions.

The driver's photograph is the most trustworthy document you hold about who produced it, and the least trustworthy about what it says. The clean PDF in the shared mailbox is the reverse. Any design applying one confidence policy across every channel is wrong before it starts.

ChannelProvenanceImage qualityWhat goes wrong
Driver phone photoHighest — authenticated driver, device, timestamp, often locationWorst of any channelSkew, glare, a finger, a dark cab, thermal paper already faded
Carrier portal downloadHigh — the session was already scoped to a loadUsually goodManual and unscalable, and nobody records who downloaded it
SFTP or imaging dropHigh — an authenticated pathGood, batch scannedOne sixty-page PDF holding twelve unrelated documents
Shared mailboxMedium — high only if the mail authentication result is evaluated and storedAnything from a clean PDF to a photo of a screenForwarded chains where the newest message contradicts the oldest attachment
Scan to emailLow — anyone can scan anythingVariable, and the compression setting is the hidden riskLossy pattern substitution silently rewriting digits
Fax gatewayLowWorst systematic qualityStandard-mode squash, dropped scan lines, the header strip eating the top form line
The flow

Nine steps, and the boring ones decide it.

Capture and bursting are unglamorous and deterministic, and they are where documents are silently lost. A pipeline that drops two percent of attachments before anyone looks will report excellent accuracy on the ones it kept.

  1. 01 · deterministicCaptureThe artifact byte for byte, hashed, with the whole channel envelope beside it. Provenance wins disputes more often than extraction does, and it cannot be reconstructed afterwards.
  2. 02 · deterministicBurst the containerDecompose the mail, expand archives, split multi-page files, recurse into nested messages. A password-protected or corrupt file gets an explicit could-not-open state — never a silent skip.
  3. 03 · deterministicCondition the imageOrientation, deskew, crop, despeckle. Measured, not judged: resolution, skew angle, blur and glare recorded, and the original never replaced by the derivative.
  4. 04 · model-drivenFind the document boundariesOne forty-page PDF is routinely a rate confirmation, a BOL, three PODs, a lumper receipt and duplicates of several. Boundary confidence is its own number, and nothing is typed from page one.
  5. 05 · model-drivenClassifyDeterministic overrides first — sender, portal, filename, barcode — then the model. The type selects which fields are mandatory, so a misclassification silently drops a required field. Unknown queues to a human.
  6. 06 · model-drivenExtract and validateValues with per-field confidence and bounding boxes, then deterministic validators: arithmetic recomputed, dates sanity-checked, code sets looked up. A validated field may commit at a lower model score than an unvalidated one.
  7. 07 · model-drivenBind to a loadCandidate generation is deterministic, ranking is not, and ambiguity goes to a person. A binding with a high score and no retrievable evidence chain is not correct, it is unfalsifiable.
  8. 08 · deterministicCheck against the order of recordStops, pieces, weight, dates, equipment, temperature against what the load says. Inside tolerance proceeds; outside becomes an exception with a named owner — never quietly reconciled.
  9. 09 · human of recordCommit, file, notifyIdempotent on content hash, type and target, so the same POD arriving by email, then portal, then stapled to the invoice files once. A delivery ledger answers “we never received it”.
The documents

The fields that carry legal weight.

This is the part that makes freight paperwork something other than a generic reading problem. A field here can shift who is liable, and a system that reports it as a boolean has thrown the meaning away.

Bill of lading

Identifiers

BOL number, shipper's reference, carrier PRO, customer PO, trailer or container, seal number, SCAC

What carries legal weight

“Shipper's weight, load and count” and “said to contain” relieve a carrier of liability for misdescription where the shipper loaded — but if the carrier loaded, the same phrase has no effect except for freight concealed by packages. So the notation's meaning depends on who loaded, a fact living elsewhere on the same page. Capture both; never collapse to a flag. Also: Section 7 non-recourse, declared value, seal notations, and each signature with its printed name as a separate field.

Proof of delivery

Identifiers

PRO, BOL, load id, stop number, consignee, delivery date

What carries legal weight

Clear versus exception delivery is the entire game. The exception notation is captured verbatim, with its cropped image, alongside the box state — and when the two disagree that is an automatic human exception, never resolved in code. A notation standing alone is not a claim; it is the seed of one and the start of a clock.

Rate confirmation

Identifiers

Load number, broker and carrier identity, pickup and delivery numbers, shipper reference, customer PO, equipment

What carries legal weight

The carrier representative's signature and date, the terms version, the no-re-brokering clause, and the amendment chain. Whether a signed confirmation is the contract or an addendum to a master agreement is a legal question, not an engineering one.

Lumper receipt

Identifiers

Receipt number, facility, date, trailer or BOL, driver, service provider

What carries legal weight

The driver's signature, and the payment instrument reference — a one-time code that is a live secret and must never reach metadata, a search index or a log in plain text. Note that no federal rule requires a lumper receipt at all; reimbursement is contractual and the receipt is evidence.

Scale ticket

Identifiers

Ticket number, scale and operator, date and time, truck and trailer, commodity

What carries legal weight

Gross, tare and net with the scale's certification reference. Commonly the weakest-keyed document in the set — often only a trailer number and a date — which makes it the best worked example of multi-key matching.

Hazmat shipping paper

Identifiers

Shipment references plus the regulated description itself

What carries legal weight

The basic description runs in strict sequence — identification number, proper shipping name, hazard class or division with subsidiaries in parentheses, then packing group — with no other information interspersed. The sequence is itself a checkable property, the quadruple is a code-set lookup rather than a reading, and the regulated record is the shipping paper: your extraction indexes it, it does not replace it.

Two things the internet gets wrong about these documents

There is no federally mandated bill of lading form for general freight. The rule lists five content items — the parties, the origin and destination, the number of packages, the description, and the weight where it affects rating — and nothing more. The familiar “uniform” bill is an industry contract form, not a regulation.

No federal rule requires a lumper receipt. The statute on loading assistance has two subsections — who pays, and that coercion is prohibited — and contains no receipt mandate anywhere. Reimbursement is contractual; the receipt is evidence. A great deal of freight writing asserts otherwise.

The matching problem

Binding a document to the right load.

There is no single key. PRO, bill of lading number, shipper reference, several customer purchase orders, load id, pickup number, trailer, container, seal — each party uses its own and each has a reason.

A PRO is not globally unique

It is unique within a carrier and reused over time. Every key has to be scoped by counterparty, key type and a time window, or references collide across years.

Type every key at capture

Store the key type, the raw value, the normalised value, the page and box it came from, and the confidence. A bare reference string is the original sin, and it is the most painful thing to retrofit.

Score on independent agreement

Not on one number. Two independent agreeing keys to commit automatically; a single weak key never commits. Negative evidence counts too — a date outside the load's lifecycle, a carrier you never tendered.

Channel context is a free, deterministic key

A document downloaded inside a portal session already scoped to a load, or attached to a reply in your own tender thread, carries strong binding evidence with no model involved. It is routinely ignored.

The alias table is a governed asset

Every alias records which document taught it, when, and who approved it — and must be retractable, re-opening every document ever bound through it. A poisoned alias is silent, compounds, and looks like improving performance on the dashboard.

The unmatched tail is a design target

Reason-coded, searchable by its keys, and re-evaluated automatically when a new load or alias appears. Never a best guess to clear a queue: a POD on the wrong load becomes a wrong invoice to a wrong customer.

Why character accuracy is close to meaningless

Arithmetic you can check without us. At 99% independent per-character accuracy, a ten-character PRO comes through fully correct about 0.9910 of the time — roughly 90%, so about one in ten carries at least one wrong character. Real errors cluster rather than being independent, so the true number differs; the order of magnitude is the point, and it is the whole reason validators and multi-key matching exist rather than a bigger model.

Failure modes

Where extraction actually fails.

Not the ones in the brochure. These are the ones that reach production, and the first is the one no model can detect, because the error is made before the document is ever read.

Lossy pattern substitution

A scan that looks perfect and has had digits silently swapped — the documented scanner defect where a 6 is replaced by an 8 across the page.

Detect the compression signature, flag the document, and prefer a lossless rescan wherever digits carry money. No amount of model quality catches this, because the error is in the compressor rather than the reading.

Checkbox against free text

“2 pcs short” written beside a box nobody ticked, or two boxes ticked, or a tick straddling both.

Three things captured: box state with confidence, the verbatim text, and the image crop. Disagreement is an automatic human exception — it is never resolved in code.

Stamps over signatures

A receiving stamp printed across the signature block, ink bled into the field beneath.

The stamp is itself a high-value object carrying a date and an identity, so it is extracted separately — and the occlusion is reported rather than returning whatever survived underneath.

Ambiguous dates

03/10/2026 on a cross-border document, which is two different days.

Language and locale detected per document, the detected locale stored, and a hard stop on genuine ambiguity. Guessing produces the error that surfaces months later in a detention or claim dispute.

A wrong embedded text layer

Not an image-only PDF — worse, a PDF carrying text the sender's scanner produced, with errors already baked in.

Never trust an embedded layer blindly. Run your own reading and compare: agreement raises confidence, disagreement lowers it.

Multi-stop with one POD

A complete-looking packet that is missing a stop.

Completeness is driven by the shipment's expected document set, not by what happened to arrive.

Thermal paper fade

A lumper or scale receipt photographed at invoicing time is close to blank.

Captured at the dock, not weeks later. This is a process fix, not a model fix, and pretending otherwise wastes everyone's time.

Documents for a load you never tendered

A BOL naming a carrier that was never given the freight.

Not a matching error to be reconciled away. It is a fraud and compliance signal, and it belongs on the vetting path.

Confidence and control

What is never committed without a person.

Four confidences, kept apart: image quality, classification, each field, and the binding. A document can be a crisp scan, correctly classified, perfectly read — and attached to the wrong load. One combined score hides precisely the failure that costs most.

The never-auto-commit list

  • Anything that moves money or changes a payee — final amounts, remit-to, banking details, a factoring assignment, lumper reimbursement
  • Any hazmat field: identification number, proper shipping name, class, packing group, quantity, emergency contact, the shipper's certification
  • Any liability-shifting notation — shipper's weight load and count, subject to count, exception notations, non-recourse, declared value, a seal discrepancy
  • Anything that will be used to assert or defend a cargo claim
  • Customs declarations, classification or origin statements
  • Insurance expiry or any coverage conclusion that gates carrier eligibility
  • Any binding resting on a single weak key, and any first-time alias creation
  • Anything from a weak-provenance channel where the field drives money

What an approval of record means

A named, authenticated person — not a service account — with their authority captured as of that moment, because authority changes later.

Field-scoped, which is the most-missed part. “I confirm this POD is signed and dated the fourteenth” is a materially different claim from “I confirm every field on this document”, and recording the second when a person did the first is how approvals stop being evidence.

The evidence they actually saw — the image regions, the document version and its hash — a written reason on any override of a validator, and an append-only trail where a correction supersedes rather than edits.

9 months

The shortest period a carrier may allow for filing a cargo claim. A shorter contractual window is not permitted.

49 U.S.C. § 14706(e)(1)

2 years

The shortest period for bringing a civil action, computed from the carrier's written disallowance of the claim.

49 U.S.C. § 14706(e)(1)

3 years

A broker's transaction record, which every party to the transaction has the right to review — so your audit trail is a document a counterparty may read.

49 CFR § 371.3

12 months

Food transport records, kept beyond the event — and scanned copies and other accurate reproductions are explicitly acceptable, which is the footing for an image archive.

21 CFR § 1.912

The regulatory floor for keeping a document is usually shorter than the dispute horizon, so retention follows the claim clock and your contracts rather than the minimum.

Instrumentation

Definitions first, numbers from your own traffic.

There is no public benchmark for freight documents, so every accuracy figure in this market comes from a vendor's own undisclosed test set. We publish the measurement definitions and let the pilot produce the numbers on your data.

Straight-through rate, defined

Documents committed to the correct shipment with no human edit and no approval, as a share of documents received — segmented by type, channel and counterparty, with the denominator and the exclusions published. Almost every argument about this number is definitional, so the definition comes first.

Touches per document

Not just the share needing a human, but how many distinct interventions each took. A document touched three times is a process defect wearing a success costume.

Silent error rate

Fields committed above threshold that were later found wrong, measured against a gold set drawn from live traffic rather than a benchmark. Every other metric measures effort; this one measures risk, and it is the number worth being frightened by.

Rebind rate

Documents whose binding a human later changed. The honest proxy for wrong-load risk, and the number a sceptical engineer will respect most.

Volume reconciliation

Artifacts received against artifacts processed, reconciled to the mailbox or portal of record. A pipeline silently dropping attachments at the burst step posts a beautiful straight-through rate.

Completeness at invoicing

Share of shipments holding the full required document set when the invoice goes out, and days to complete. This reframes the pilot from how accurate the model is to whether you can bill on time — which is the question that was actually asked.

The engagement

One document type, one channel, three weeks.

Fixed scope and a fixed price: $4,500. We take one document type arriving on one channel, stand up capture, extraction, validation and binding with the exception queue behind it, and switch the measurement on from the first day — so what comes back is your own accuracy and your own exception mix, not ours.

What we need: access to one channel, about a hundred recent documents including the ugly ones, your load records for the same period so matching can be scored, and one person in operations who can settle what a correct answer looks like.

Delivered
  • Capture with the channel envelope preserved as provenance
  • Extraction with deterministic validators, not model confidence alone
  • Multi-key binding with the evidence chain retrievable per document
  • Exception queue with reason codes and a named owner
  • Your measured accuracy and exception mix, against a human-adjudicated sample
FAQ

Questions an engineer actually asks.

We already have EDI. Why do we need this?

Because in motor freight the X12 flows do not carry the images. Tenders, acknowledgements, status and invoices move as transaction sets; the signed bill of lading, the proof of delivery, the lumper receipt and the rate confirmation PDF arrive by email, portal, SFTP, scan or phone camera. A document path exists alongside a perfectly working EDI integration, which is why being EDI-connected does not solve this.

How accurate is the extraction?

We will not quote a figure, and you should be wary of anyone who does. There is no public benchmark for freight documents, so every accuracy percentage in this market comes from a vendor's own undisclosed test set, usually on clean digital PDFs rather than a photograph taken in a dark cab. What we will do is measure it on your traffic against a human-adjudicated sample and publish the method — precision and recall separately, per field, per document type.

Why does character accuracy not tell you much?

Arithmetic you can check unaided: at 99% independent per-character accuracy, a ten-character PRO comes through fully correct about 0.99^10, roughly 90% of the time — so about one in ten would carry at least one error. Real errors cluster rather than being independent, so the true figure differs, but the order of magnitude is the point. It is why validators and multi-key matching exist, and why a headline character-accuracy number is close to meaningless.

Can it read handwriting?

It reads some of it. The more useful answer is what happens to the rest: no handwritten number that moves money or shifts liability is ever committed without a person, the reviewer sees the exact crop rather than a transcription, and a margin note that cannot be read is still captured as an image — because an illegible note can still matter in a dispute.

What about documents you cannot match to a load?

They are a design target, not a backlog. Each gets a reason code, stays searchable by its extracted keys so a human hunting for it can find it, and is re-evaluated automatically when a new load or a new alias appears rather than waiting for someone to re-run a queue. What never happens is a best guess to clear the queue — a POD on the wrong load becomes a wrong invoice to a wrong customer, and the audit trail will show the system did it by itself.

Is an image good enough, or do we keep the paper?

Electronic records are defensible, with a condition that runs through all of the relevant rules: the record has to accurately reflect the information and remain capable of accurate reproduction. That condition is exactly why lossy re-compression and discarding originals are dangerous, and why we keep the original byte for byte alongside every derivative. How long you keep it is a question for your counsel — the regulatory floor is usually shorter than the dispute horizon, so retention should follow the claim clock and your contracts rather than the minimum.

What does a pilot cost?

A pilot is $4,500 fixed: three weeks, one document type and one channel, extraction and matching wired up with the exception queue and the measurement definitions switched on from day one. The scope is written down before anything starts.

What do you need from us to begin?

Access to one channel — a shared mailbox folder or a portal export — around a hundred recent documents including the ugly ones, your load records for the same period so matching can be scored, and one person in operations who can settle what a correct answer looks like.

Let's build it

Book a 30-minute call with our expert

Bring the mailbox nobody wants to own and a week of its worst documents. You will leave the call knowing what can be automated, what should not be, and what a pilot would cover — $4,500 fixed, three weeks.

Book a discovery call

Reply within 1 business day · India & USA

Statutory and regulatory references are to the United States Code and the Code of Federal Regulations and are given for orientation only — this page is not legal advice, and retention, liability and customs questions belong with your counsel. We extract, reconcile, monitor and route to a qualified human decision; we do not determine carrier compliance, verify insurance coverage, certify hazardous materials or classify goods for customs, each of which is a regulated or licensed determination. No customer data, configuration or code appears here.

Also in this blueprint: EDI onboarding and repair, invoice and accessorial audit, carrier vetting and fraud screening, and the rest of the AI TMS Blueprint.