Trade Repository
A commercial invoice isn't just "the shipment's file" — it's evidence for a party, a product classification, a license, and a filing, all at once. That cross-entity search now lives inside the unified Documents workspace, and the link layer underneath it makes a document many-to-many instead of one-to-one.
The problem
"A document only lives under the shipment it was uploaded to. If it's really evidence for a party or a product, there's nowhere to say so."
One document, one home
"I know we have the manufacturer's origin declaration somewhere — I just don't know which of forty shipments it's attached to."
No cross-entity search
"We built a separate document widget for parties, another for products, another for filings — and now they all behave slightly differently."
Duplicated document UI
How Qubere addresses it
Documents workspace
Free-text search across parsed document content (not just the file name) plus shipment and client, with filters for document type, status, and "linked to" entity type. Every row shows how many entities already reference that document — so you can tell at a glance whether a file is single-purpose or shared evidence.
| File | Type | Status | Shipment | Linked to |
|---|---|---|---|---|
| origin_declaration_88.pdf | Origin Declaration | verified | SHP-000144 | 3 entities |
| bol_scanned_0912.pdf | Bill of Lading | OCR retry | SHP-000144 | 1 entity |
| manufacturer_affidavit_12.pdf | Affidavit | verified | — | 2 entities |
One link table · shared document panel
A document-to-entity link records which entity, what kind of relationship (source document, supporting document, filing attachment, license evidence, origin evidence), who created it and when. The same panel renders on the party, product, and filing detail pages, and on the shipment workspace — one component, one API, no drift between them.
Objection handling
| "Can a document belong to more than one shipment?" | Yes — and to a party, product, license, or filing at the same time. That's the point of the link layer: the document is the file; the links are the facts about what it's evidence for. |
| "If we unlink something by mistake, is it gone?" | No. Unlinking marks the link inactive and records who did it and when; it never deletes the row. The history of "this was once evidence for X" survives. |
| "Does License get the same linked-documents panel?" | Not yet — License has its own, older document mechanism, and wiring it into this shared panel is deliberately deferred pending a product decision on how the two should coexist. |
The close
A single search surface across every document in the account, and a link layer that finally lets one file be evidence for a shipment, a party, a product, and a filing — all at once, all provable, none of it duplicated.
Next step: open the Documents workspace, filter by an entity type your team cares about, and follow one document to everything it's linked to.
Full detail: docs/apps/customs/sales/TRADE-REPOSITORY-AND-TRADE-DATA.md