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
Receiver — Customs Authority
Related transaction flows
Need help understanding this EDI flow?
Ask EDI AI →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:
| Segment | Name | Purpose |
|---|---|---|
| BGM | Beginning of Message | Declaration document type and reference number. |
| GDS | Nature of Transaction | Type of customs transaction (import, export, transit). |
| LOC | Place/Location Identification | Country of origin, destination, and border crossing points. |
| MEA | Measurements | Weight and volume of the declared goods. |
Interactive example
Click any segment below to see its business meaning.
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:
| Source | Source Field | Target Field |
|---|---|---|
| Customs Broker System | shipment.commodity_weight_kg | MEA+AAE (Measurement Value) |
| Customs Broker System | shipment.origin_country | LOC+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 →