Document Management & Recordkeeping

A customs recordkeeping system
that happens to read your documents.

Every uploaded original is stored immutably, hashed, and re-verified on every read. Every extracted fact traces back to a page and a box. One click assembles the audit package CBP would ask for — so 19 U.S.C. § 1509 recordkeeping stops being a shared drive and a prayer.

SHA-256
re-verified on every single read
±7d
audit package window, assembled in one click
5yr
CBP recordkeeping, designed for from day one

The problem

"Our process for five-year recordkeeping is 'don't delete the folder.'"

"Trade documents are in email, a shared drive, and the broker's system. No single index. Someone sent a revised invoice — is it the one we filed on?"

No system of record

"A CF-28 or audit request lands and we spend two weeks assembling the file."

Audit fire drill

"We can't prove a document wasn't altered after the fact."

No tamper-evidence

How Qubere addresses it

Immutable originals. Hash-verified reads. A one-click audit bundle.

  • The uploaded bytes are stored once, never mutated, and the hash is re-verified on every read.
  • One searchable index per tenant, linked to shipments and — for multi-leg — specific legs.
  • Reprocessing creates a new version; the "active" version is a protected pointer.
  • One click assembles a Reasonable Care package + Focused Assessment file for a ±7-day window around a filing.
  • Every action — upload, reprocess, view, quarantine, export — writes an immutable audit entry.

Immutable vault & provenance

If a stored document were ever altered, the next read fails the check.

Original bytes stored once, SHA-256 re-verified on every read. Every extracted field: page → bounding box → canonical artifact → original. Absence is preserved — a null page means the parser didn't report one, never a default.

  • Versioned processing; a slow late parse is kept for audit but never claims the pointer
  • Uploads malware-scanned; quarantined files visible, never silently dropped
  • Bulk upload is capped at 20 files per batch, with a structured, typed error on rejection — protecting intake throughput instead of leaving a batch to fail unbounded
  • Multi-document detection flags a merged PDF (e.g. invoice + packing list) for optional, human-confirmed splitting into new child documents — the original is never mutated
How to demo
/app/documents → open a document → show the checksum and "verified on read." That sentence lands with an enterprise IT or compliance buyer.
Trade Documents/commercial_invoice_88.pdf
AC
Alice · Acme
SHA-256a3f1c9e2…8b04 · re-verified on this read
Byte size / media type248 KB · application/pdf
Active parse versionv2 (v1 retained for audit)
Malware scanclean
Provenance chain — Invoice Total
ExtractionField "USD 142,400.00"
page 1 · bbox [412, 690, 566, 712] · element #/texts/47
canonical Document AI JSON → original PDF (hash verified)

One index · inbound email · reconciliation

Every trade document in one place — however it arrives.

Forward documents to a client-specific address. Clean files enter the document pipeline; clear matches attach within that client. Unknown senders and conflicting shipment identifiers wait in Email review, with evidence beside the decision.

  • Client email requires enablement and a clean malware scan
  • Auto-attach is a per-account policy tier (Off / Confident / Aggressive); Aggressive adds one LLM-assisted matching pass before falling back to broker review
  • No shipment preselected; updated Entry Proof stays a draft
  • A required field with no reading is flagged missing, never confused with a field that simply doesn't apply to that document type
How to demo
Document Email → copy the client address. Then Documents → Email review → preview a conflict, verify its identifiers, choose the shipment and attach.
Trade Documents
AC
Alice · Acme
DocumentTypeShipmentSourceState
bol_scanned_0912.pdfBill of LadingSHP-000144emailOCR retry
commercial_invoice_88.pdfCommercial InvoiceSHP-000144portalactive v2
packing_list_88.pdfPacking ListSHP-000144uploadconflict: total ≠ invoice
ReconciliationIssue · blocksFilingPacking list $141,900 vs invoice $142,400 · Δ $500

Source-of-truth precedence

A published policy resolves the conflict on the previous slide — automatically, and it's still on record why.

A $500 delta between packing list and invoice used to always freeze on a manual review. An account can instead publish a precedence policy — "packing list wins on total value" — and every future conflict on that field resolves the same way, with the resolution itself written once as a durable, auditable record.

  • Policies are DRAFT until published; only one PUBLISHED policy is ever live per account + field
  • No policy for a field → unchanged manual review queue, never a silent guess
  • A policy that can't unambiguously pick a winner returns REVIEW_REQUIRED instead of forcing a resolution
  • Every resolution is idempotent — re-running reconciliation never produces a second, conflicting audit entry for the same field
How to demo
Publish a precedence policy for a field, then show a new conflicting document resolve on its own — and the resolution record naming exactly which policy decided it.
Trade Documents/Reconciliation
AC
Alice · Acme
commercial_invoice_88.pdf$142,400
packing_list_88.pdf$141,900 · selected
Resolution record
Policy appliedPACKING_LIST source always wins
StatusRESOLVED · written once
AuditableYes — part of the Reasonable Care package

Document Rules Studio

Account-specific recordkeeping logic, tested before it ever runs on a real document.

A broker's per-account requirement — always flag a packing list with no signature, always route a certain client's invoices for a second look — is authored as a typed, versioned rule instead of a code change or a note in someone's head, and it goes through the exact same audit trail as every other action on the record.

  • Every rule version moves through DRAFT → TESTING → APPROVED → PUBLISHED → RETIRED — only one version is ever live
  • Test Version runs a draft against one real document and shows the result without changing anything
  • Published rules evaluate automatically during document classification, with every match recorded
  • Lives in the Doc Studio sidebar item — Overview, Document Rules Studio, Field Precedence and Simulator tabs in one place
How to demo
Show a published rule's version history — retired versions kept, exactly one live version — as the same kind of durable record an examiner would expect from any other recordkeeping control.
Doc Studio/Document Rules
AC
Alice · Acme
Version history
v3PUBLISHED · live
v2RETIRED
v1RETIRED
Full version history retained — a durable record of exactly what logic applied when

Field-level explanation

An examiner asks "why is this the value on file" — and the answer is one click, not a reconstruction project.

Next to any field on record is an explain control that reads the same provenance chain — source document, page, confidence signals, and any precedence or reconciliation decision that touched it — and states it as a short, sourced answer instead of prose someone has to write by hand for an audit response.

  • Built from the same extraction and resolution records already on file — nothing new is computed for the explanation
  • The exact kind of traceability a Focused Assessment or CF-28 response asks for, available without assembling anything
How to demo
Click explain on a resolved field and show the popover naming the exact source document, page, and the precedence policy that decided it — the answer to "why" in one click.
Shipment SHP-2026-000144/Field Review
AC
Alice · Acme
Why this value?
Value$141,900
Sourcepacking_list_88.pdf · page 1
Decided byField Precedence policy · PACKING_LIST wins
Same provenance and precedence records shown elsewhere — ready for an audit response as-is

Correction-learning rule suggestions

Repeat corrections become a recorded, reviewable pattern — not fixed the same way by hand every time.

Every recorded field-review correction is aggregated by field and document type. Once a field crosses a real repeat-correction threshold, it surfaces as a suggestion — evidence a reviewer can act on, never an auto-applied change to the record.

  • Surfaces only once a field/document-type pair has at least 5 recorded events and a combined correction+rejection rate above 40%
  • Accept creates a DRAFT-only Document Rules Studio rule — it still goes through Test & Publish, never auto-published
  • Dismiss is durably recorded per field + document type, so a decision already made doesn't keep resurfacing
How to demo
Show a repeat-correction pattern on a field, accept it into a draft rule, and show a separately dismissed suggestion staying dismissed after reload.
Doc Studio/Document Rules/Suggestions
AC
Alice · Acme
hsCode · COMMERCIAL_INVOICE
Sample size11 events
Corrected + rejected rate63%
Accept creates a DRAFT rule only · Dismiss is remembered per field + document type

Audit room · Reasonable Care package

The audit response is a button.

One click assembles a Reasonable Care package and a Focused Assessment file for a ±7-day window around a filing — the declaration, the classification decisions with evidence, the documents, the timeline. Every compliance audit run is timestamped and exportable as importer due-diligence evidence.

  • The § 1484 Reasonable Care record, on demand
  • Bulk export of shipments and documents by client, period, or audit scope
How to demo
On a filing → Generate Audit Package → walk the contents. "Before: two weeks of a person. After: one click and a ±7-day evidence bundle."
QBR-2026-3231761·Audit Room
AC
Alice · Acme
Contents
Canonical declarationv3 · frozen snapshot
Classification decisions3 lines · GRI analysis · rulings cited · reviewer identity
Source documentsCommercial Invoice, Packing List, MBL · hashes
Compliance audit runs2 · timestamped · findings by severity
Timelineupload → extract → classify → validate → transmit → release
Focused Assessment file included · satisfies 19 U.S.C. § 1484 Reasonable Care

Automatic customer document package

The moment an Entry Proof publishes, the customer's package is already waiting.

Publishing an Entry Proof now automatically assembles a customer-visible package — every document tagged for customer visibility, plus a generated CBP Form 7501 PDF — into a single zip stored as a new, portal-visible ShipmentDocument. Nobody has to remember to build it by hand.

  • Runs right after the Entry Proof publish commits, so the package always reflects the version that was actually filed
  • Non-blocking on failure — a package-generation problem never rolls back or delays the publish itself
  • A generation failure is recorded as its own audit-log entry, not silently swallowed
How to demo
Publish an Entry Proof, then switch to the client portal — the customer document package is already sitting there with the Form 7501 inside, no manual step in between.
Shipment SHP-2026-000144/Entry Proof
AC
Alice · Acme
Customer document package · auto-generated
ContentsCommercial Invoice, Packing List, BOL, Form 7501 (generated)
Portal visibilityCUSTOMER
Triggered byEntry Proof publish · non-blocking
A generation failure is written to the audit log instead of silently disappearing

Cross-shipment duplicate detection

A document that already exists on another shipment gets flagged, not silently re-filed.

Every inbound attachment — whether it lands through normal processing or is released out of quarantine — is checked against documents already on file elsewhere in the account. A match surfaces as an advisory notification to the people who can act on it, without ever blocking storage or parsing.

  • Fires on both the standard attachment-processing path and quarantine release — one detection rule, not two
  • Advisory only: storage, parsing, and release all continue regardless of the result
  • Routed to every role-holder with document-update permission on the account, deduplicated so the same match doesn't spam the same person twice
  • Surfaces in the notification center under its own Possible duplicate label in the Documents category
How to demo
Upload the same invoice against two different shipments — the second upload stores and parses normally, but the account's document-update role holders get a "matches N document(s) already on file" notification.
Notifications
AC
Alice · Acme
TypeDOCUMENT_POSSIBLE_DUPLICATE
Message"commercial_invoice_88.pdf" matches 1 document(s) already on file.
EntityShipmentDocument
Routed toaccount role-holders with document.update
Storage, parsing, and quarantine release all proceed regardless of this notification

Relevance-ranked full-text search

Search the document index like a search engine, not a filter form.

A GIN-indexed, weighted full-text vector now sits on every document, so a search term ranks the best match first instead of just filtering. Filenames and identifiers weigh higher than incidental text, and the same query still works even against a database that hasn't run the latest migration.

  • Weighted A/B/D full-text vector, generated at the database level so it's always in sync with the row
  • Relevance becomes a real, selectable sort column — and the default the moment a search term is present with no explicit sort
  • A live-vector fallback keeps ranked search working on databases mid-migration, instead of hard-failing
How to demo
Search the document index for a partial invoice number or filename fragment — the closest match lands at the top, not buried in upload-date order.
Trade Documents/Search
AC
Alice · Acme
DocumentRankShipment
commercial_invoice_88.pdf0.91SHP-000144
acme-manufacturing-rate-card.csv0.44SHP-000112
packing_list_88.pdf0.31SHP-000144
ts_rank over a GIN-indexed, weighted tsvector — falls back to a live vector on pre-migration databases

Canonical file naming

"invoice_final_v3_scan (2).pdf" becomes a name you can actually file by.

Alongside the untouched original filename, every document now carries a generated, canonical display name — {documentType}_{shipmentNumber}_{YYYYMMDD}{ext} — built the moment the document intelligence agent classifies it. The messy inbound name stays on record; the canonical name is what people actually see.

  • Purely additive — the original fileName is never overwritten or lost
  • Wired into classification, the documents API/query, and the document list UI in one pass
  • A backfill script applies canonical names to documents uploaded before this shipped, so the index isn't split between old and new naming
How to demo
Upload a file named something meaningless like scan0007.pdf — after classification, the document list shows COMMERCIAL_INVOICE_SHP-2026-000144_20260927.pdf instead.
Trade Documents
AC
Alice · Acme
Original filenamescan0007.pdf
Canonical nameCOMMERCIAL_INVOICE_SHP-2026-000144_20260927.pdf
Built fromdocumentType + shipmentNumber + classification date
Original filename retained on the record — canonical name is display-only

Objection handling

Every hard question, answered directly.

"Do you replace our DMS / SharePoint?"For trade documents, yes — with provenance and audit-packaging those systems don't have. It's not a general enterprise content platform.
"Retention policy / legal hold?"Originals are immutable and audit-logged. Formal retention-schedule automation and legal-hold workflow aren't first-class yet — the guarantee today is "nothing is mutated or silently deleted."
"Can we bulk-import our back catalog?"Documents can be uploaded in bulk and extraction runs on each. There's no dedicated historical-archive migration tool — scope a large back-file as a services engagement.

The close

"Hash-verified on every read. The audit response is a button."

Immutable originals, versioned processing, and a one-click ±7-day evidence bundle. That's the § 1509 answer.

Next step: bring a recent entry file. We'll upload the documents, show the provenance and reconciliation, then generate the audit package you'd hand CBP.

Full detail: docs/apps/customs/sales/document-management.md