DEV Community

Cover image for Building Blocks of TSS Customs Automation: A Technical View
Kristi Hampson
Kristi Hampson

Posted on

Building Blocks of TSS Customs Automation: A Technical View

The four capabilities in engineering terms

TSS customs automation reduces to four services: a document extraction service, a validation engine, a classification model, and a reuse index. Each is a different problem class and each fails differently.

Document extraction

Layout-aware extraction combines OCR with template or transformer-based field detection. It performs well on structured invoices and packing lists. It degrades on photographs, low-DPI scans, and multi-page manifests with inconsistent tables. Build for a confidence score on every field, not a global one.

Validation

This is the deterministic layer. Format rules, code lists, cross-field consistency, and TSS submission constraints, including the 99-item cap, sit here. It is the most reliable component and the one that stops most rejections. Full context in the TSS AI declaration handbook.

Classification suggestion

Retrieval over past declarations plus a language model over commodity descriptions produces a ranked shortlist. It is a decision-support surface, not an authority. The legal authority is a BTI or ATaR from HMRC.

Enrichment and reuse

A canonical product ID plus a versioned line record lets the system recognise a repeat and carry forward tariff code, origin, and valuation elements. Stable product data is the only thing that makes this reliable.

What to expose in the UI

Confidence scores, override actions, and a clean audit log for every field. Silent auto-accept is the anti-pattern.

What to log

Extraction source, model version, confidence, human overrides, submission timestamps, and rejection reasons. This is your compliance product.

See the architecture in action. Watch a demo.

Top comments (0)