Operations
One shipment, four documents
What changes when you treat a case, not a document, as the unit of work.
Oct 2026 · 5 min read
Most document tools are built around a single document: one PDF in, one record out. Real processes rarely work that way. A shipment arrives as a commercial invoice, a packing list, a shipping advice and a customs declaration. They come from different senders, in different formats, hours or days apart. The work is not reading each of them. The work is making sure they agree.
Where document-at-a-time breaks
When every document is processed on its own, each one can pass its own checks while the set is still wrong. The invoice says forty cartons, the packing list says thirty-eight. The declared value does not match the invoice total. The consignee on the shipping advice is a different entity from the one on the invoice.
None of those errors live inside a single document. They live between documents. So the matching ends up where it always was: with a person, a mail folder and a spreadsheet, cross-checking by hand what the automation was supposed to handle.
The case as the unit of work
StencilFlow starts from the business event instead: a shipment, an order, an invoice against a contract. We call it a case. Documents are linked to a case by a reference that already exists in your process, such as a container, purchase order or order number.
- The case ID follows from the reference, so reprocessing a document never creates a duplicate case.
- Every run, review and output is recorded in the history of that one case.
What changes when you think in cases
The checks that matter most become possible. Quantities can be compared line by line across the invoice and the packing list. Values, parties and codes can be checked against each other and against your own reference data. A rule can say: release only when all four documents are present and agree.
Decisions are made once, per case. Each case ends in one of three outcomes: straight through, human review or exception, with the reason recorded. A reviewer sees every document of the case side by side, with the failed check on top, instead of hunting through an inbox for the other three.
Output is complete. Your ERP, customs system or TMS receives one coherent record for the shipment, not four partial updates that someone has to reconcile later.
Many documents, one email
Sometimes the case arrives all at once. An import shipment of food ingredients can come with ten Certificates of Analysis in a single email, one per batch, next to the invoice and the packing list. Handled one PDF at a time, that is ten separate checks and a person comparing them in their head.
- Extraction loops over every attachment, so all ten certificates are read the same way, with the same fields.
- Business rules are defined across all of them: every batch on the packing list has a certificate, every certificate is within specification, and batch numbers and quantities match the invoice.
- The final output, with every flagged rule marked, can be reviewed next to the input documents, so a reviewer sees exactly which certificate and which value caused the flag.
Not just for logistics
The same pattern shows up wherever a decision depends on more than one document:
- Order intake: the email body, a purchase order PDF and an attachment with delivery details.
- Supplier invoice control: the invoice, the contract prices and the goods receipt.
- Supplier price lists: the new list, the current shop export and the margin rules.
Before you ask what a document says, ask which event it belongs to. That is the question that turns document handling into document operations.