Checks

If a check fails, we don't keep the model's reading.

A confidence score is not a probability. When a check fails, the field is marked low. That is the difference between “the model was sure” and “someone checked the number”.

ISO 6346

The check digit

A container number is a sum, not just letters and digits. One wrong digit fails it. The reading can look sure. We still run the check.

Fails. Check digit should be 8, document reads 7. Easy to miss if you only look at the page.

Incoterms 2020

Fixed set

EXWFCACPTCIPDAPDPUDDPFASFOBCFRCIF

A value we don't recognise is an error. “CIF Lagos” is read as CIF.

ISO 6346 container numbers

Four letters, the fourth U, J or Z, then seven digits. The last digit is the check. One wrong digit fails it, and that field is marked low even if the reading looked sure.

Incoterms 2020

Only the eleven official rules are accepted: EXW, FCA, CPT, CIP, DAP, DPU, DDP, FAS, FOB, CFR, CIF. An invented or outdated term is an error, not a warning.

UN/LOCODE

A five-letter code is checked against the ports we have on file: Rotterdam, Antwerp, Hamburg, Casablanca, the rest of the European range, and the big hubs. If we don't have the code, you get a look, not an error. A smaller port is not called wrong just because it isn't on this list.

Dates

A date like 12.02.2026 is left empty when it could be 12 February or 2 December. A date in the future, or a shipped-on-board date after the date of issue, is a look. We don't guess.

Weight and package totals

Document totals are compared to the sum of container lines. Disagreement is reported, never silently corrected — real B/Ls sometimes disagree, and both figures are facts about the page.

Document-type gate

Only ocean bills of lading and sea waybills are in scope. An inland truck BOL can fill half this schema quite convincingly. It is still refused, and it is not billed.

ISO type and VGM

Container size/type is checked against ISO 6346 codes and the trade aliases a B/L actually prints (40HC, 20GP). SOLAS VGM is a warning when missing and an error when it sits below the container gross weight.

HS / TARIC, seals, originals

HS codes that are not 6, 8 or 10 digits are flagged. A box without seals is a look. An original B/L without a count of originals, or a sea waybill that claims three, is a look.

IMO number and dangerous goods

A stated IMO ship number is arithmetic, like a container. Cargo wording that looks like IMDG while the DG flag is off is a warning, not an invention.

What is still missing

Each bill carries a completeness list: hard errors that block export, looks that a person should still take, and the extras that take a file from exportable to optimum — invoice or packing list, VGM declaration, notify on a to-order bill, Incoterm versus freight.

Fill what we can check

A printed port name is not a UN/LOCODE until someone accepts the seed match. A failed check digit is not rewritten until someone accepts the arithmetic. Both are offered as a fill — never invented at extraction. A dossier pack zips the original, the extraction, and any companions.

Scan cleanup at the gate

A phone photo is contrast-stretched and lightly deskewed before the model sees it. Punctuation is stripped from container numbers, IMO and HS after transcription — raw still holds what the page printed. There is no OpenCV in this desk.

Register, not AIS

The first three letters of a box are a BIC owner prefix, checked against a seed (TCL is Triton). A stated IMO can be looked up in Wikidata, on your click — not VesselFinder, not a live position, and never on page load.

A query, not a filing

When facts on the bill disagree — a check digit, a weight total, a companion that names a different B/L — the desk drafts a query to the carrier or the shipper. Staging it opens your mail or saves a draft. It does not send by itself.

A forwarded mail, not an inbox

Drop a .eml and the desk unpacks PDF and scan attachments into the same pack as a file drop. If Gmail is connected through the gate, the clerk can list recent attachment mail — it still does not invent an inbox. A mail without a bill or a scan is a toast, not a fake mailbox.

Waiting on a reply

After you copy, open mail, or stage a query, the bill sits in Waiting — on the carrier or the shipper. Drop the reply on that bill (or on the clerk) and waiting is cleared. Nothing is sent from here.

A clerk, not an agent that files

The next-action queue watches inbound mail, discrepancies, and replies. It stages a query and pairs a file. It does not book a container, file ICS2, or send mail by itself. You confirm every send.

Letter of credit and freight amount

When the page names an L/C, the number and the bank are fields — a to-order bank consignee is not an L/C by itself. Freight amount and currency are taken only when printed. “As arranged” stays empty, and that is correct.

Port codes we know

169 ports. An unknown code is a look, not a block. The list is not every port in the world.

AEDXBAEJEAAOLOBARBUEAUADLAUBNEAUFREAUMELAUSYDBDCGPBEANRBEZEEBGVARBRPNGBRRIGBRSSZCAHALCAMTRCAVANCIABJCLSAICLVAPCMDLACNDLCCNNGBCNNSACNSHACNSZXCNTAOCNTXGCNXMNCNYTNCOCTGCYLMSDEBRVDEHAMDEWVNDJJIBDKAARDZAALECGYEEETLLEGALYEGPSDEGSOKESALGESBCNESBIOESVGOESVLCFIHELFIHMNFIKTKFRDKKFRFOSFRLEHFRMRSGBFXTGBIMMGBLGPGBLIVGBSOUGBTILGHTKDGIGIBGRPIRGRSKGHKHKGHRRJKIDJKTIDSUBIEDUBILHFAINCOKINMAAINMUNINNSAINPAVITCVVITGITITGOAITLIVITNAPITSPEITTRSJPKOBJPNGOJPOSAJPTYOJPYOKKEMBAKRINCKRKANKRPUSKWKWILKCMBLTKLJLVRIXMAAGAMACASMAPTMMTMARMXVERMXZLOMYPGUMYPKGMYTPPMZMPMNGAPPNGLOSNGONNNLAMSNLIJMNLMOENLRTMNLVLINOOSLNZAKLNZLYTNZWLGOMSLLPABLBPECLLPHCEBPHMNLPKKHIPLGDNPLGDYPTLISPTSIEQAHMDROCNDSADMMSAJEDSEGOTSESTOSGSINSIKOPSNDKRTHBKKTHLCHTNTUNTRALITRAMBTRGEMTRISTTRIZMTWKHHTZDARUSBALUSBOSUSCHSUSEWRUSHOUUSLAXUSLGBUSMIAUSNYCUSOAKUSORFUSSAVUSSEAUYMVDVNDADVNHPHVNSGNZACPTZADURZAPLZ