DEV Community

Cover image for Designing a Progressive Submission Workflow for TSS
iCustoms
iCustoms

Posted on

Designing a Progressive Submission Workflow for TSS

The problem with monolithic submissions

Real shipment data does not arrive in one clean package. Invoices, weights and transport details land at different times, from different people. If your submission logic waits for a complete payload, you become the bottleneck.

Model the state machine

Treat a declaration as a state machine. Draft, partially populated, ready for validation, submitted, accepted or rejected. Each state has its own transitions.

Use progressive builds

The API allows you to add fields incrementally. The TSS API workflow guide explains this operational model well.

Persist every response

Every JSON response is audit material. Store it against the declaration record with a timestamp.

Want to see this state machine in production? Watch a demo.

Top comments (0)