Commodity Codes
Commodity codes (CN8 in EU terminology, also known as tariff numbers)
classify physical goods for customs and statistical purposes. Every
intra-EU shipment and every import / export needs the right code on
the paperwork.
This module adds CN8 validation on top of ERPNext's standard Customs
Tariff Number doctype, plus the Intrastat-related metadata fields on
Items and supply-chain doctypes.
Where codes are stored
ERPNext has a Customs Tariff Number doctype (built-in to ERPNext).
Each Item links to one via the standard customs_tariff_number field.
This module:
- Validates the format when you save a Customs Tariff Number record —
8 digits for CN8, optionally up to 10 digits for HS/TARIC sub-codes. - Rejects clearly invalid codes (letters, wrong length).
- Flags codes that have been deprecated in the current annex if a
replacement is known.
If you ship something that genuinely doesn't have a code (services,
intangibles), tick Skip Commodity Code Validation on the Item — the
Intrastat report will then exclude that item from the goods totals.
Intrastat metadata on Items
This module adds two custom fields to Item:
- Intrastat Supplementary Unit (
intrastat_supplementary_unit) —
the secondary unit of measure that the CN8 code requires. Common
values: pieces, pairs, kilograms net, litres, square metres.
Required for items in commodity-code chapters that have one (most
textiles, footwear, and lighting do). - Skip Commodity Code Validation (
skip_commodity_code_validation) —
bypass the CN8 validator. Use for services, intangibles, and
composite items where the code is set at the line level.
Intrastat metadata on supply-chain doctypes
For Intrastat reporting, the same shipment needs a transport mode
and a region code. These can be set at multiple levels — the most
specific wins:
| Doctype | Field | When to use |
|---|---|---|
| Shipping Rule | intrastat_transport_code |
Per shipping method (e.g., your air-freight rule uses 4, your road rule uses 3) |
| Stock Entry | intrastat_transport_code |
Per stock movement, for subcontracting where shipping rule isn't relevant |
| Subcontracting Receipt | intrastat_transport_code |
Per receipt of subcontracted goods |
| Warehouse | intrastat_region_code |
The NUTS region of the warehouse |
If none of these are set, the EU Intracommunity Settings defaults
apply. So at minimum: set the EU-wide defaults once, override per
Warehouse or Shipping Rule only where they differ.
Transport codes (Intrastat)
| Code | Mode |
|---|---|
| 1 | Sea |
| 2 | Rail |
| 3 | Road |
| 4 | Air |
| 5 | Postal consignment |
| 7 | Fixed transport installations (pipelines) |
| 8 | Inland waterway |
| 9 | Self-propelled (vehicle moving under its own power) |
Most NL SMBs use 3 (Road) for road freight or 4 (Air) for international
parcels. Set the default in EU Intracommunity Settings, override at the
Shipping Rule level if needed.
Where to look codes up
- TARIC consultation — official EU lookup, free
- Your customs broker if you have one
- The annual CN8 revision (published Oct for the following year) from the European Commission
What this module does not do
- Set codes automatically. You still need to classify each Item. The
module validates what you set; it doesn't guess. - TARIC duty rates. This is statistics + customs paperwork, not duty
calculation. For duty rates and import VAT, you'll need a TARIC tool
or your broker. - HS-to-CN8 conversion. If you receive paperwork with 6-digit HS
codes, you'll need to add the 7th and 8th digits manually (the CN8
drills down to EU-specific subdivisions).