DEV Community

Cover image for Validating TSS Controlled Goods Data Before Submission
iCustoms
iCustoms

Posted on

Validating TSS Controlled Goods Data Before Submission

TSS controlled goods data validation means checking, before you submit, that every controlled line carries the right licence or certificate, the correct document and status codes, item-level data and, for SPS goods, a Net Mass. It also means confirming the reference numbers match the certificate itself, because health certificates are checked against CERTEX and a mismatch is likely to trigger an inspection.

Where controlled goods logic lives

Control status isn't a field you set. It comes from the measures and conditions attached to a commodity code on the Northern Ireland Online Tariff, for the correct country of origin, plus any footnotes on the commodity page.

The data model for a controlled goods line

A controlled line needs more fields than a standard movement. The field list below follows iCustoms' write-up on TSS customs data for controlled goods.

Field When it applies
Consignment and item-level entry summary data Controlled goods (standard movements need consignment level only)
Document code and status code Every certificate or licence (GOV.UK Appendix 5A and 5B)
National Additional Code Where the commodity code lookup returns one
Net Mass at item level All SPS controlled goods
Goods Domestic Status = NIDOM GB to NI domestic movements
Status code XW with "Waiver claimed" Products of animal origin or high-risk food where a CHED isn't required

Image suggestion: Image 4, "One Mismatch, One Outcome" | Alt text: Validation outcome where a declaration matching its certificate clears and a mismatch is referred

A pre-submission check in pseudocode

for line in declaration.lines:
    measures = ni_online_tariff.lookup(line.commodity_code, line.origin)
    if measures.require_document():          # read conditions and footnotes too
        assert line.document_code and line.status_code
        assert line.document_ref == line.certificate.reference
        if line.category == "SPS":
            assert line.net_mass is not None
if declaration.movement == "GB_TO_NI_DOMESTIC":
    assert declaration.goods_domestic_status == "NIDOM"
Enter fullscreen mode Exit fullscreen mode

Troubleshooting TSS controlled goods data

  • Inspection referral: compare the declaration reference with the health certificate, since CERTEX checks one against the other.
  • Missed control: re-read the footnotes on the commodity page.
  • Unexpected measures: re-run the lookup with the correct country of origin. Want to see these checks run automatically inside a TSS workflow? Watch a demo.

Top comments (0)