Skip to main content

Trade Document Lifecycle

A trade document in Klervex goes through a defined lifecycle from initial data input to final archival. Understanding this lifecycle helps you build reliable workflows and avoid common mistakes.

Lifecycle Stages

Document Lifecycle: Input → Validate → Generate → Fill → Upload & Extract → Regenerate → Verify

1. Input

Shipment data enters Klervex through one of three methods:

  • Document upload — upload existing trade documents (PDFs, scans, Excel files) and let Klervex extract the data automatically
  • Manual entry — enter shipment details directly in the dashboard form
  • API submission — send structured JSON data via the API

Regardless of input method, the result is a structured shipment record with parties, line items, routing, and packaging details.

2. Validate

Before any document is generated, Klervex runs deterministic compliance checks:

  • HS code validation — codes checked against WCO 6-digit base and country-specific extensions (US HTS 10-digit, EU CN 8-digit)
  • Sanctions screening — all parties checked against OFAC SDN list
  • Cross-field consistency — weights match across documents, values add up, Incoterms match the transport mode
  • Country-specific rules — US requires 10-digit HTS codes, EU requires EORI numbers, India requires IEC codes
  • Document eligibility — EUR.1 only for EU FTA partners, USMCA only for US/Canada/Mexico, DGD only for hazardous goods

Validation is synchronous and returns results in under 1 second. No documents are generated until validation passes.

3. Generate

Klervex generates customs-grade PDFs for each selected document type. The generation process:

  • Renders professional layouts with correct trade document formatting
  • Populates all available data from the validated shipment record
  • Marks missing fields (B/L number, container number, signatures) as fillable PDF form fields
  • Locks compliance-critical fields (weights, values, HS codes) as static content
  • Computes a SHA-256 verification hash for each document
  • Prints the hash and verification URL in the document footer

Generation is asynchronous and typically completes in 2-10 seconds per document.

4. Fill

After generation, documents may have fillable fields for data that was not yet available:

Field TypeExampleWhen It Arrives
Transport referenceB/L number, AWB numberAfter carrier booking confirmation
Container detailsContainer number, seal numberAt port of loading
Vessel/flightVessel name, voyage numberAfter carrier schedule confirmation
SignaturesInspector signature, customs stampAt point of inspection or clearance

Fill these fields using any PDF reader (Adobe Acrobat, Foxit Reader, or a browser). The locked fields cannot be modified.

5. Upload & Extract

Once all fillable fields are complete, upload the filled PDF back to Klervex:

  • Klervex reads form field values directly from the PDF — no AI processing, instant results
  • Each extracted field is mapped to the corresponding shipment data path (e.g., B/L number, vessel name)
  • You can review the extracted values before proceeding
  • Multiple filled documents can be uploaded before finalizing (e.g., Bill of Lading and VGM Declaration)

Upload via the dashboard or the extract-filled-fields API endpoint.

6. Regenerate

After extracting field values, regenerate clean documents with the complete data set:

  • Extracted values are merged into the shipment record
  • New documents are generated from scratch with the full data — no form fields, native rendering quality
  • A new SHA-256 verification hash is computed for each regenerated document
  • A verification stamp is applied to the document footer
  • The result is identical to a document that was generated with all data available from the start

The regenerated documents are the official versions for customs submission, trading partner distribution, and long-term archival.

7. Verify

Any party can verify a Klervex document:

  • Enter the document hash at klervex.com/verify
  • Or use the verification URL printed in the document footer
  • The system confirms: the document was generated by Klervex, it has not been modified, and the timestamp of generation

Verification works for both the original (fillable) document and the finalized version. Finalized documents also show a link to the original hash for traceability.

Best Practices

Generate early, upload and regenerate later

Do not wait for all data to be available before generating documents. Generate with what you have, fill in transport details when they arrive, then upload and regenerate. This saves time and lets you review the document layout before the shipment is ready.

Always regenerate before submission

Fillable PDFs can be accidentally modified by anyone with a PDF editor. Always upload filled documents and regenerate before submitting to customs authorities or sharing with trading partners.

Regenerate for data corrections, fill for missing data

If a weight was recorded incorrectly or a consignee changed, update the shipment data and regenerate. If you just need to add a B/L number that was assigned after generation, fill the field in the PDF. Do not try to correct validated data by editing form fields.

Keep the audit trail

Every generation cycle is timestamped and hashed. Use version history to track changes and resolve disputes. Previous versions remain verifiable even after the downloadable copy expires.

Match regenerated documents to the verification hash

When submitting documents to customs or trading partners, always include or reference the verification hash. This allows the recipient to independently confirm the document has not been altered since it was generated by Klervex.