Tullverket

EDI – Support during the development phase

Here you will find useful information when developing an EDI system solution for customs handling.

The system your company develops must have the functionalities needed to submit correct information to Swedish Customs. For example:

  • aggregate goods items
  • manage contingency plans in the system
  • provide an overview of "started - not completed" cases
  • calculate, for example, customs value and statistical value correctly
  • ensure that the information displayed when the message is signed is the same as what is submitted to Customs
  • clearly distinguish between and be able to send and receive test and production messages, by using a test indicator
  • manage exchange logs: message log (archive), communication log and transfer log
  • make it easy for system users to understand the status of messages and error codes, so they can clearly describe problems when contacting IT support
  • use terms and definitions applied in our technical specifications and declaration guides.

The technical specifications provided by Swedish Customs describe the content and structure of the EDI messages. The system your company develops must follow our technical specifications.

Start by reviewing

  1. Envelope specification (SCTS-ENV)
  2. Response message specification (SCTS-RESP)
  3. Code lists (SCTS-CL)
  4. Guidelines on security for electronic interchange EDI
  5. EDI communication guidelines
  6. Technical specifications for the relevant customs procedure, and in parallel also consult the declaration guide for the message.

Swedish Customs applies a PKI-based security concept. The system your company develops must comply with the security requirements set out in the guidelines.

Swedish Customs currently provides the option to submit data electronically using OFTP2 via TLS. Data is transmitted via the Internet using OFTP2. Your system must comply with RFC5024, which describes the protocol for OFTP version 2.

This web service allows you to download current code lists to be used in your IT-system. Most codes are described in both Swedish and English, while some codes are only described in one of the languages.

Here you can search information about codes needed for customs procedures. The web service is available both in Swedish and English.

Swedish Customs' database for tariff file distribution is updated nightly with data directly from the European Commission. Subscribers can download updates via the Internet to keep their own system updated.

Technical information can be found here:

The EDI system should have exchange logs, i.e. message log (archive), communication log and transfer log. For practical and legal reasons, these should be accessible for the agreed retention period. These functions and logs are necessary for Swedish Customs to be able to provide troubleshooting support in the event of any errors or operational disruptions.

Exchange logs:

  • A message log is an archive of which messages have been sent and received.
  • A communication log should contain information that allows tracking of the virtual files (OFTP) and communication receipts, as well as OFTP error codes exchanged.
  • A transfer log should contain information about Sender, Recipient, Date, Time, Message Type, Transfer Reference/MessageID and status.

A link beween Transfer Reference/MessageID and virtual file name (OFTP) should also exist, for example in the transfer log, so that it is possible to link entries in the message log with events in the communication log (what was sent when).

LRN

All electronic messages (declarations or notifications) that are submitted to Swedish Customs must be assigned a LRN (Local Reference Number). Each LRN must be unique (the same LRN cannot be used in different flow of messages). LRN is used as a reference number for the message until Customs has accepted the information and assigned a MRN (Master Reference Number).

LRN is used as a reference when you contact our IT support to inquire about a declaration or notification which has not received an MRN. LRN is also used as a reference when contacting our information service or the customs clearance offices.

Format

The EU legislation stipulates that LRN must be used by all member states for electronic data interchange with economic operators and it is up to each member state to decide which format that should be used. Swedish Customs uses a fixed format for LRN consisting of an alphabetic portion, a numeric portion and the check digit, example XYZ000001C (C = check digit). Exception: in NCTS (transit) the LRN starts with a country code and year, followed by the same format as for the other messages.

Allocation of LRN series

When a company is granted an EDI-registration for communication with Swedish Customs they are also assigned a LRN series. The series consists of two or three alphabetic characters and must be used to generate LRN for each declaration and notifications that are submitted to Customs. Additional LRN series can be applied for if needed. When the current LRN series is running out, the company should apply in good time for a new series.

The Swedish Customs provides a company test environment where your company can test EDI messages using your own test data. The test environment is available 24/7 without time limitations. General information about test data and test restrictions in the company test environment is available both for system developers and declarants.

To control whether a specific EDI message is sent to the Swedish Customs' production environment or to the test environment, the test indicator must be used correctly. When receiving messages, the system must also take the test indicator into account to avoid mix-ups. A missing test indicator or the value "0" means production environment. Other valid values mean test environment (currently only the value "1" is used. For more information see the relevant technical specification.

There are advantages to developing systems that can handle both test and production in the same EDI connection.

Swedish Customs can provide support in customs-specific technical matters. In other respects, we assume that your company has knowledge of, for example, message formats and communication protocols as well as the technical guidelines used for communication and security.

If you need support during troubleshooting, we expect that:

  • you appoint a contact person for the testing process who coordinates your contact with the EDI test function
  • you can provide a system description of the system configuration and communication setup, if needed
  • the system has exchange logs
  • you use terms and definitions applied in our technical specifications and declaration guides.

The transition to fully digitised customs management is underway. Here you can follow what is happening in the next few years. You can also read about other ongoing developments.