Skip to content

Categories, statuses and reasons ​

Every email gets a category. Emails that ask for a BL check also get a status, and a reason when a person has to look.

Categories ​

CategoryWhat it is
BL_COMPARISONSomeone wants a draft Bill of Lading checked against the Shipping Instruction
SI_REQUESTA request for the Shipping Instruction
INVOICE_QUERYA billing question. Invoice numbers, order references and amounts are pulled out for the Invoices page
GENERALEverything else, including automated notices that merely mention billing
SPAMPhishing and junk

Classification is rules first. The rules score weighted signals in the subject and body, and only when they are not confident (below 0.5) is an AI model asked. The Why? page lists every signal and its points.

Statuses ​

StatusMeaninghas_defect
OKThe documents match, or there was nothing to comparefalse
MISMATCHAt least one of the seven fields differs. defect_fields names themtrue
NEEDS_REVIEWshipdoc will not guess. review_reason says whyfalse

Reasons for review ​

review_reasonWhen it happens
missing_attachmentThe email says documents are attached (or still missing) but fewer than two files arrived
unreadableAn attachment is empty, corrupt, or has no text layer (a scan). shipdoc does not run OCR
wrong_doc_typeThe email does not carry exactly one SI and one BL, judged by the content of each file, not its name. A file called _BL that is really a commercial invoice is caught here
missing_valueOne of the seven fields is blank or holds a placeholder such as TBA, ??? or ____

A request to send the draft BL, with no files, is not an error: it is OK, because there is nothing to compare.

The seven fields ​

FieldCompared as
shipperCompany name, ignoring case, punctuation and legal suffixes
consigneeCompany name (the SI calls it Consignee, a BL may say To the Order of)
notify_partyCompany name
port_of_loadingPort name and UN/LOCODE, e.g. NANTONG, CHINA (CNNTG)
port_of_dischargePort name and UN/LOCODE (POD, Discharge Port mean the same)
container_countThe number, e.g. 6 from 6 x 40'HC
gross_weight_kgThe number in kilograms, e.g. 131058 from 131,058 KG

Labels vary between an SI and a BL, so fields are matched by meaning, not by position. The comparison itself is plain code and never uses AI.

Who decided ​

Every result carries decided_by:

ValueMeaning
ruleDeterministic rules decided
llmThe rules were not confident and an AI model classified the email
humanA reviewer overrode the result

Overrides are recorded with the reviewer's name in the result's notes.

Next ​

See How shipdoc decides for the step-by-step flow, or the API reference for the result format.

A student prototype built for the Averis × Monash Hackathon 2026. Not an Averis product.