CUSDECEDIFACTLogistics & Fulfillment

Customs Declaration Message

UN/EDIFACT CUSDEC is used to submit customs declarations for imported or exported goods to a customs authority.

In this guide

EDIFACT CUSDEC moves from Importer / Exporter / Customs Broker to Customs Authority (Declarant → Customs Authority) via AS2, SFTP, VAN. The interactive diagram below traces every business and technical step the message passes through — press Play Flow to watch it travel, or click any step for detail.

How it works

How EDIFACT CUSDEC Works

Sender

Importer / Exporter / Customs Broker

Receiver

Customs Authority

Direction

Declarant → Customs Authority

Standard

UN/EDIFACT

Version

D.01B

Transport

AS2 / SFTP / VAN

Business Purpose

Logistics & Fulfillment

Sender — Importer / Exporter / Customs Broker

EDI Transmission

CUSDEC

Customs Declaration Message

UN/EDIFACT D.96A / D.01B

AS2SFTPVAN

Receiver — Customs Authority

Need help understanding this EDI flow?

Ask EDI AI →
Figure: EDIFACT CUSDEC workflow from Importer / Exporter / Customs Broker through EDI transmission to Customs Authority. Standard: UN/EDIFACT D.96A / D.01B · Transaction: CUSDEC · Direction: Declarant → Customs Authority

EDIFACT CUSDEC workflow. Steps: Compile Shipment Data, Generate CUSDEC, Submit to Customs, Customs Receives Declaration, Review & Release, Final Delivery. Transmitted from Importer / Exporter / Customs Broker to Customs Authority via AS2, SFTP, VAN, following UN/EDIFACT D.96A / D.01B.

Overview

Enables electronic customs clearance, reducing border delays by allowing customs authorities to pre-screen shipment and duty information.

Sender

Importer / Exporter / Customs Broker

Receiver

Customs Authority

Direction

Declarant → Customs Authority

Standard / Version

UN/EDIFACT D.96A / D.01B

Segment structure

Key segments that make up this transaction set:

SegmentNamePurpose
BGMBeginning of MessageDeclaration document type and reference number.
GDSNature of TransactionType of customs transaction (import, export, transit).
LOCPlace/Location IdentificationCountry of origin, destination, and border crossing points.
MEAMeasurementsWeight and volume of the declared goods.

Interactive example

Click any segment below to see its business meaning.

EDIFACT CUSDEC — interactive EDI message visualizer

UNH

This is an envelope or control segment. Select a highlighted segment on the left (shown in green) for a full business explanation.

View raw EDI
UNH+1+CUSDEC:D:96A:UN'
BGM+830+DEC-2210+9'
GDS+1'
LOC+153+US:162:6'
LOC+7+CA:162:6'
MEA+AAE+G+KGM:245'
UNS+S'
UNT+6+1'

Mapping example

A representative field-level mapping from a common source system into this transaction:

SourceSource FieldTarget Field
Customs Broker Systemshipment.commodity_weight_kgMEA+AAE (Measurement Value)
Customs Broker Systemshipment.origin_countryLOC+153 (Place/Location)

Validation rules

  • Country codes in LOC must be valid ISO 3166-1 alpha-2 codes.
  • Declared weight/measurements must be consistent with the commercial invoice and packing list.
  • GDS nature-of-transaction codes must align with the customs authority's accepted code list.

Common errors & troubleshooting

Shipment held for manual customs review

Cause: Declared value or weight doesn't reconcile with the accompanying commercial invoice.

Fix: Cross-validate CUSDEC figures against the INVOIC/commercial invoice before submission.

Frequently asked questions

The message structure is standardized under UN/EDIFACT, but individual customs authorities (e.g., EU, US CBP equivalents) often require specific code lists and additional national data elements.

Still have questions about CUSDEC?

Ask EDI AI →