This document describes the data formats used when trading partners exchange EHF despatch advice information electronically (Norwegian: Elektronisk Handelsformat; EHF). It is prepared as part of the initiative taken by the Norwegian "The Norwegian Agency for Public and Financial Management" (Difi) within the standardization of electronic trade processes.

Reporting bugs
Please use Github Issues to report bugs and lack of content when discovered. Users currently not registered on Github may create an account for free.

Introduction

Background and Objective

The government white paper labeled “St.Meld. nr. 36 (2008-2009) Det gode innkjøp” (The good procurement), states among other things:

It’s the Government’s opinion that increased use of electronic solutions is important to improve and increase the efficiency of public procurement. The use of electronic solutions may reduce time spent on public procurement, increase the competition and arrange for purchases to be more transparent and easier to re-examine. By spending less time and money on procurement, resources will be available for both modernizing the public sector and more welfare. The goal for introducing electronic solutions is to contribute to a better, simpler and more secure procurement.

The previous «Ministry of Government Administration, Reform and Church Affairs» (FAD) considered use of open standards as a vital means to build a well-functioning public administration, with good internal collaboration and a high level of service for both inhabitants and businesses.

Definition of open standards:
An open standard is characterized by its reputation and will be maintained by a non-commercial organization, and the continuing development is based on decision processes open to every interested party. The standard is published and the documentation is available, either free of charge or for a small, insignificant fee. Anyone must be allowed to copy, distribute and use the standard free of charge or for a small, insignificant fee. The intellectual rights related to the standard (e.g. patents) are irrevocably available, without any royalties. There is no reservation regarding re-use of the standard.

The purpose of this document is to describe a common format for invoice messages in the Norwegian market, and to facilitate an efficient implementation and increased use of electronic collaboration regarding the invoicing process based on this format.

Target Audience

The target audience for this implementation guide is both accounting and IT professionals in organizations aiming at performing the fulfillment process completely or partially electronic. That means issuing a dispatch advice. This document may also benefit system suppliers, ERP suppliers and message brokers.

  • Accounting professionals are advised to read chapters 1 through 4.

  • Chapters 5 through 6 are for both accounting professionals as technical implementers

  • IT professionals may concentrate on chapters 7 through 8.

Document Structure

This document consists of the following chapters and contents:

  • Chapter 1 gives a short introduction describing the background and objective of this implementation guide.

  • Chapter 2 gives the change history of the document.

  • Chapter 3 describes the EHF formats in general.

  • Chapter 4 links to definitions relevant to this EHF format.

  • Chapter 5 links to general principles and conditions for the despatch advice.

  • Chapter 6 describes in detail central information elements.

  • Chapter 7 deals with validation.

  • Chapter 8 embraces appendices.

Mandatory Use

This version is valid from 10. December 2019, and is mandatory from the same date.

1. Changelog

1.1. Consequences of Implementing this version

Version 1.0.12 is a revision of EHF Despatch Advice 1.0, and this version is backwards compatible to EHF Despatch Advice 1.0. This means that any instance documents valid towards EHF Despatch Advice 1.0 is also valid in version 1.0.12. Please note that valid here reflects the validity against the implementation guide of EHF Despatch Advice 1.0, as this is the normative reference.

1.1.1. Registration in ELMA

Invoice and creditnote receivers capable of receiving EHF Despatch Advice 1.0 instance documents is also capable of receiving EHF Despatch Advice 1.0.12, so no change is needed in the registration in ELMA.

1.2. Version 1.x

Version 1.0.12 (2019-12-10)

Issue Description Type

-

Updated links to Github.

Guide

Version 1.0.11 (2019-02-27)

Issue Description Type

-

Fixing syntax, resulting in updated basic validation rules.

Syntax

Validation rules expected to be updated to trigger error in next release: All basic validation rules (EHF-TXX-BXXXXXX).

Version 1.0.10 (2018-11-15)

Issue Description Type

-

Moving example files into a example file archive. Appendix is updated with the new link.

Guide

-

Replacing listing of validation rules with links to all relevant validation rules.

Guide

-

Adding "basic" validation rules automatically created from syntax. Rules are identified as 'EHF-T16-BXXXXX' where 'XXXXX' is a running number.

Validator

Validation rules expected to be updated to trigger error in next release: All basic validation rules (EHF-TXX-BXXXXXX).

Version 1.0.9 (2018-09-12)

Issue Description Type

Updated rules for PEPPOL BIS.

Validator

#267

Adding a missing word in "Profiler og meldinger" section (Norwegian edition only).

Guide

Version 1.0.8 (2017-11-15)

Issue Description Type

#230

Updating rule EHF-COMMON-R011 (F) from warning to error.

Validator

#229

For easier maintenance and better transparency use PEPPOL BIS Schematron source in favour of copying generated XSLTs into this project.

Validator

#233

Updated chapter on validation to reflect use of EHF Common.

Guide

#245

Adding information related to new tax categories valid as of next release.

Guide

Version 1.0.7 (2017-09-14)

Issue Description Type

#215

Fixing context for a lot of rules for higher quality.

Validator

#222

Replacing rules with rules in EHF Common.

Validator

Validation rules expected to be updated to trigger error in next release: EHF-COMMON-R011
Mapping of rules for EHF Common in EHF Despatch Advice
New rule Description Old rule

Document in general

EHF-COMMON-R001 (F)

Document MUST not contain empty elements.

NOGOV-T16-R011 (F)

EHF-COMMON-R002 (F)

Document MUST not contain empty elements.

NOGOV-T16-R011 (F)

EHF-COMMON-R003 (W)

Document SHOULD not contain schema location.

New rule

EHF-COMMON-R004 (F)

Document MUST have a syntax identifier.

NOGOV-T16-R001 (F)

Validation of Norwegian organization numbers

EHF-COMMON-R010 (F)

MUST be a valid Norwegian organization number. Only numerical value allowed

NOGOV-T16-R010 (F)

EHF-COMMON-R011 (F)

When scheme is NO:ORGNR, a valid Norwegian organization number must be used. Only numerical value allowed

New rule

EHF-COMMON-R012 (F)

A VAT number MUST be valid Norwegian organization number (nine numbers) followed by the letters MVA.

Ignored

EHF-COMMON-R013 (F)

When scheme is NO:ORGNR, a valid Norwegian organization number must be used. Only numerical value allowed

Ignored

EHF-COMMON-R014 (F)

An endpoint identifier scheme MUST have the value 'NO:ORGNR'.

NOGOV-T16-R009 (F)

Validation of tax

EHF-COMMON-R020 (F)

Tax categories MUST be one of the follwoing codes: AA E H K R S Z

Ignored

Formating validation

EHF-COMMON-R030 (F)

A date must be formatted YYYY-MM-DD.

NOGOV-T16-R008 (F)

Validation of other identifiers

EHF-COMMON-R040 (W)

Invalid GLN number provided.

New rule

Code lists

EHF-COMMON-R100 (W)

Attachment is not a recommended MIMEType.

Ignored

Version 1.0.6 (2017-05-15)

Issue Description Type

#207

Updated validation artifacts for PEPPOL BIS from OpenPEPPOL.

Validator

#206

Updating links in 3.6 and code lists.

Guide

Version 1.0.5 Hotfix (2016-12-13)

Issue Description Type

#192

Removing EHF Core for Despatch Advice.

Validator

Version 1.0.5 (2016-11-15)

Issue Description Type

#165

Aligning chapter 5.3 with EHF Invoice and Credit Note.

Guide

#169

Fix minor bug in Despatch Advice example files.

Attachment

#169

Updating NOGOV-T16-R010 (F) to also verify checksum of organization number.

Validator

#179

Updated validation artifacts for PEPPOL BIS from OpenPEPPOL.

Validator

#67

Adding EHF Core for Despatch Advice.

Validator

#175

Change authoritative source of validation artifacts from XSLT to Schematron for NOGOV-T16.

Validator

Version 1.0.4 (2016-09-15)

Issue Description Type

#146

Converting guide to Asciidoctor format.

  • Aligning chapter 1 to other guides.

  • Aligning chapter 3 to other guides.

  • Removing chapter 7 in favor of GEFEG presentation found on VEFA.

  • Moving chapter 8 to chapter 7.

  • Moving chapter 9 to chapter 8.

  • Presentations and illustrations are changed due to new format.

Guide

Version 1.0.3 (2016-05-23)

Changes in validator:
  • New validation rule (EUGEN-T16-R007) to ensure Delivered Quantity is present.

  • Correction of rule EUGEN-T16-R002

Author:
  • Siw Meckelborg, Edisys Consulting AS

Version 1.0.2 (2015-09-01)

Changes in validator:
  • Update of PEPPOL and BII validation artefacts

  • Empty elements will generate error, not warning (rule NOGOV-T16-R011)

Author:
  • Siw Meckelborg, Edisys Consulting AS

Version 1.0.1 (2015-03-07)

Validation changes:
  • Validation of all mandatory and recommended elements.

  • Validation of datatypes (VAT number, date etc.)

  • Only organisational numbers are valid in EndpointID.

Editorial changes:
  • Added ruleID to message table

  • Adding Dependant to description of elements.

  • Added chapter 2.1 and new chapter 3.3

  • Update of chapter 8.3

Author:
  • Siw Meckelborg, Edisys Consulting AS

Version 1.0.0 (2013-10-10)

Approved

Author:
  • Edisys Consulting AS

2. Electronic Commerce Format (EHF)

2.1. About EHF

EHF is an anagram of the Norwegian expression «Elektronisk handelsformat» (Electronic Commerce Format).

EHF is based on the work performed by CEN BII. This is further adjusted to comply with the Norwegian accounting regulations and current practices for the different business processes in the Norwegian market. Difi pursues the goal to cover the full trading process using EHF documents, both before and after awarding (signing of a contract).

Documents, from the tender catalogue to the credit note will be gathered under the EHF umbrella. During 2013 Difi will prepare for the use of EHF formats in what is known as the post award process, i.e. the part of the business process that starts when a supplier and a customer have signed a contract.

By using the EHF documents the collaboration between the supplier and the customer will be predictable. Elements from the tender Catalogue will be re-used in the Order, and elements from the Order will be re-used in the Invoice. This leads to a holistic use of all the documents under the EHF umbrella.

Difi has chosen to use CEN BII as a base for the EHF formats and the Universal Business Language (UBL) as a foundation for the implemented syntax. Both EHF and UBL are open standards and as such not liable to any licensing fees or royalties.

EHF is managed and maintained by Difi.

2.2. Information Consistency

The different EHF formats mentioned above contain a number of common information elements (supplier, customer, item etc.). It is important to preserve consistency in those common information elements, and that means that elements with identical content are declared in the same way and as far as possible given the same element tag name.

EHF invoicing formats will for instance re-use elements from the Catalogue and Order to ensure consistency between the messages and to make sure that the information from the business transactions are reflected in the invoicing documents. This makes it possible to implement an efficient and automated control of the invoice and the originating transactions.

2.3. Empty Elements

The use of empty elements is prohibited in UBL, which is the base for EHF. The reason for this, is that empty elements may be interpreted to have a certain meaning, it could mean that the information was not available at the time of sending as an example. In addition, numeric- and date elements have requirements that would generate validation errors if they were empty.

The use of empty elements is, for the above mentioned reasons, not allowed in EHF.

2.4. Message Transport

Open PEPPOL Transport Infrastructure will provide an efficient use and transport of the EHF formats. The objective is to make it easy for parties in different countries to do cross-border trade. Experience shows that it is easy to implement electronic messaging in Norway, because most of the service providers use standard processes.

It must be noted that every document scheduled for this infrastructure must be validated with no fatal errors by Difi’s own validation service. This is likely to be done by the document issuer or by the service provider on behalf of the document issuer.

According to circular P-10/2012 FAD recommends all central government agencies to use this transport infrastructure.

2.5. Profiles and Messages

In line with the underlying methodology for the EHF formats (cf. CEN BII) the electronic messages included in a specific format will be exchanged between the parties as a part of an electronic collaboration process – a profile.

CEN BII has defined a profile as “A specification of how one or more Business Processes are executed by specifying the business rules governing its business collaborations and the information content (data model) of the electronic business transactions exchanged.”

If possible, the EHF is using profiles prepared by BII or PEPPOL. Examples of relevant profiles are:

Profile Document types

Invoice only (bii04)

Invoice

Credit note only (biixx)

Credit note

Invoice and credit note (bii05)

Invoice, Credit note

Invoice, credit note and reminder (biixy)

Invoice, Credit note, Reminder

Order and invoice (bii06)

Order, Order response, Invoice, Credit note

The messages being exchanged within a profile are customized to comply with the requirements given for that particular business document.

A CustomizationID is used to identify the business rules that apply to the document in question, i.e. the whole set of business rules the document issuer founded the document on.

The example CustomizationID below indicates that the contents of the current message is based on business rules determined by BII (urn:www.cenbii.eu:transaction:biitrns010:ver2.0), extended, customized and clarified by PEPPOL (urn:www.peppol.eu:bis:peppol5a:ver2.0) and further extended, customized and clarified in this implementation guide regarding the Norwegian businesses (urn:www.difi.no:ehf:faktura:ver2.0).

<cbc:CustomizationID>urn:www.cenbii.eu:transaction:biitrns10:ver2.0:extended:urn:www.peppol.eu:bis:peppol5a:ver2.0:extended:urn:www.difi.no:ehf:faktura:ver2.0</cbc:CustomizationID>

2.6. Use of Collaboration Agreements

The combination of the ELMA registration and the implementation guides referred to in that context eliminates the need for any formal collaboration agreement between the sender and the receiver. The ELMA registration verifies that an actor has declared the ability and the commitment to receive business documents composed according to the specific implementation guide, and any party is free to send the business document to this actor.

Exchanging Catalogue and Order requires no registration in ELMA, and actors are advised to include the use of electronic messages in the purchase contract or to supply an collaboration agreement as an attachment, in order to link the electronic collaboration with the mercantile regulations and thus achieve a regularly revision of the electronic process.

2.7. Versioning

Difi claims the right to exchange the current format with a new one as and when needed. If so, Difi will inform the public via the web site and their registered users via e-mail.

Difi manages the formats in this way:

Main Version

A new main version will be announced at least 5 months prior to release. When a main version is released, there will be at least a 12 months implementation period before the new version is made mandatory.

Difi intends to relate every main version to the regulations concerning IT standards in the public sector.

Sub Version

A new sub version will be announced at least 3 months prior to release and is made mandatory 5 months after release.

All sub versions must be backwards compatible. 2 months after the new sub version has become mandatory, the support (validation service and implementation guide) is ceased for preceding versions.

Revision

A revision is in principle a result of bug fixing the latest sub version, and will be announced at release time and should be implemented without further delay.

3. Definitions

The table below gives the definitions of key concepts of the fulfillment process.

Supplier

The supplier is the legal person or organization who provides a product or service.
Examples of supplier roles: seller, despatch party, creditor, economic operator.

Despatch Party

The Despatch Party is the person or organization who provides (despatch) the goods or services. The role is carried out by the supplier or on behalf of the supplier. (Despatch Party is sometimes known as the Consignor)

Seller

The seller is the legal person or organization who sells goods or services to the customer. The role is carried out by the supplier or on behalf of the supplier.

Customer

The customer is the legal person or organization who is in demand of a product or service.
Examples of customer roles: buyer, consignee, debtor, contracting authority.

Consignee

The consignee is the person or organization to which the products will be shipped and who is taking possession. The role is carried out by the customer or on behalf of the customer.

Buyer

The buyer is the legal person or organization who buys or purchases the goods or services. The role is carried out by the customer or on behalf of the customer.

Originating party

The party who will eventually receive and consume the goods and on whose behalf the buyer makes the purchase.

Shipment

A contractual arrangement whereby an identifiable collection of goods items is to be transported from one party (usually a Supplier) to another party (usually a Customer).

Consignment

The transportation of an identifiable collection of goods items from one party (the Despatch Party) to another party (the Consignee) via one or more modes of transport.

Transport Handling Unit

A description of individual handling units in which the line items are packed.

4. Principles and Prerequisites

This chapter describes the principles and assumptions that underlie the use of EHF fulfillment process. This is basically similar to the CEN BII2 30 Dispatch Only.

4.1. Despatch Advice Messages in General

The electronic transaction described in this implementation guide is the despatch advice message. The Despatch Advice message is used in the fulfillment process by the supplier to notify the receiver about the despatch and delivery period for the goods being sent, as well as details about the goods for cross checking with the order and ultimately the despatch advice is used for declaring how the despatched goods are packed.

4.2. Functionality and Roles

The diagram below shows the roles involved in the fulfillment process.

Functions and roles

4.3. Profiles and messages

All messages contains ProfileID and CustomizationID. ProfileID identifies what business process a given message is part of, and CustomizationID identifies the kind of message and the rules applied.

Profiles are connected to one business process, and may contain multiple document types. Valid document instances must contain corresponding ProfileID and CustomizationID.

The listing below are related document types connected to the role of receiver in the conversation. Registration in ELMA describes the receivers capabilities.

CustomizationID is a string without spaces. The list below contains spaces in CustomizationID to make them easier to read. Make sure to remove any spaces before use.

4.3.1. Profile 30 - Despatch Advice

ProfileID

urn:www.cenbii.eu:profile:bii30:ver2.0

Type CustomizationID Role

Despatch Advice

urn:www.cenbii.eu:transaction:biitrns016:ver1.0 :extended:urn:www.peppol.eu:bis:peppol30a:ver1.0 :extended:urn:www.difi.no:ehf:pakkseddel:ver1.0

Contracting Authority

4.4. Use of UBL 2.1

This version of EHF Despatch Advice is based on UBL XML schema version 2.1.

4.5. The Fulfillment Process

The fulfillment process includes issuing and sending the despatch advice message from a supplier to a customer and receiving of the goods at the customer’s site.

The main activities supported by this message are:

Transport

Full description of how the goods are packed and delivered. A delivery is taken to be a number of items that are despatched as a single consignment to a single delivery address.

Ordering

States what is shipped; the quantity of goods shipped and what is outstanding.

Receiving goods

Full support of the process of receiving goods into a warehouse, inventory, in stores or simply at a reception counter.

The diagram below shows the fulfillment process by using the EHF despatch advice message. This process is based on profile 30 in CENBII2 (BII30 – Dispatch only).

Fulfillment process

5. Description of Selected Parts

This chapter describes selected parts of the information contents of the EHF Despatch advice message. Go to chapter 7 for the complete information contents.

5.1. Roles and Actors

The following roles may be specified in the format. The same actor may play more than one role depending on the handling routine.

Consignee (UBL:DeliveryCustomerParty)

The consignee is the person or organization to which the products will be shipped and who is taking possession. The role is carried out by the customer or on behalf of the customer.
Consignee is mandatory information in EHF.

Despatch Party (UBL:DespatchSupplierParty)

The Despatch Party is the person or organization who provides (despatch) the goods or services. The role is carried out by the supplier or on behalf of the supplier.
(Despatch Party is sometimes known as the Consignor)
Despatch party is mandatory information in EHF.

Buyer (UBL:BuyerCustomerParty)

The buyer is the legal person or organization who buys or purchases the goods or services. The role is carried out by the customer or on behalf of the customer.
Buyer is optional information in EHF.

Seller (UBL:SellerSupplierParty)

The seller is the legal person or organization who sells goods or services to the customer. The role is carried out by the supplier or on behalf of the supplier.
Seller is optional information in EHF.

Originating party (UBL:OriginatorCustomerParty)

The party who will eventually receive and consume the goods and on whose behalf the buyer makes the purchase.
Originating party is optional information in EHF.

Example: Consignee information in in an EHF Despatch advice message.
<cac:DeliveryCustomerParty>
  <cac:Party>
  <cbc:EndpointID schemeID="NO:ORGNR">123456789</cbc:EndpointID>
    <cac:PartyIdentification>
      <cbc:ID schemeID="GLN">5790000435944</cbc:ID>
    </cac:PartyIdentification>
    <cac:PartyName>
      <cbc:Name>Reciever Company</cbc:Name>
    </cac:PartyName>
    <cac:PostalAddress>
      <cbc:ID>25</cbc:ID>
      <cbc:StreetName>Reciever Street 1</cbc:StreetName>
      <cbc:AdditionalStreetName>Reciever Building</cbc:AdditionalStreetName>
      <cbc:CityName>Reciever City</cbc:CityName>
      <cbc:PostalZone>9000</cbc:PostalZone>
      <cbc:CountrySubentity>Region A</cbc:CountrySubentity>
      <cac:Country>
        <cbc:IdentificationCode listID=ISO3166-1:Alpha2>NO</cbc:IdentificationCode>
      </cac:Country>
    </cac:PostalAddress>
  </cac:Party>
  <cac:DeliveryContact>
    <cbc:Name>Tim</cbc:Name>
    <cbc:Telephone>987654321</cbc:Telephone>
    <cbc:Telefax>4546474849</cbc:Telefax>
    <cbc:ElectronicMail>Tim@RecieverCompany.no</cbc:ElectronicMail>
  </cac:DeliveryContact>
</cac:DeliveryCustomerParty>
Example: Information regarding the Despatch party in a EHF Despatch advice message.
<cac:DespatchSupplierParty>
  <cac:Party>
  <cbc:EndpointID schemeID="NO:ORGNR">954321376</cbc:EndpointID>
    <cac:PartyIdentification>
      <cbc:ID schemeID="GLN" >5790000435968</cbc:ID>
    </cac:PartyIdentification>
    <cac:PartyName>
      <cbc:Name>Sender Company</cbc:Name>
    </cac:PartyName>
    <cac:Contact>
      <cbc:Name>John</cbc:Name>
      <cbc:Telephone>123456789</cbc:Telephone>
      <cbc:Telefax>8273741728</cbc:Telefax>
      <cbc:ElectronicMail>John@SenderCompany.no</cbc:ElectronicMail>
    </cac:Contact>
  </cac:Party>
</cac:DespatchSupplierParty>
Example: Buyer information in a EHF Despatch advice message.
<cac:BuyerCustomerParty>
  <cac:Party>
    <cac:PartyIdentification>
      <cbc:ID schemeID="GLN">5790000436057</cbc:ID>
    </cac:PartyIdentification>
    <cac:PartyName>
      <cbc:Name>Buyer Company</cbc:Name>
    </cac:PartyName>
  </cac:Party>
</cac:BuyerCustomerParty>
Example: Seller information in a EHF Despatch advice message.
<cac:SellerSupplierParty>
  <cac:Party>
    <cac:PartyIdentification>
      <cbc:ID schemeID="GLN">5790000435951</cbc:ID>
    </cac:PartyIdentification>
    <cac:PartyName>
      <cbc:Name>Seller Company</cbc:Name>
    </cac:PartyName>
    <cac:Contact>
      <cbc:Name>Allan</cbc:Name>
      <cbc:Telephone>43444546</cbc:Telephone>
      <cbc:Telefax>12345678</cbc:Telefax>
      <cbc:ElectronicMail>Allan@SellerCompany.no</cbc:ElectronicMail>
    </cac:Contact>
  </cac:Party>
</cac:SellerSupplierParty>
Example: Originator party in a EHF Despatch advice message.
<cac:OriginatorCustomerParty>
  <cac:Party>
    <cac:PartyIdentification>
      <cbc:ID schemeID="GLN">5790000436057</cbc:ID>
    </cac:PartyIdentification>
    <cac:PartyName>
      <cbc:Name>Originator</cbc:Name>
    </cac:PartyName>
  </cac:Party>
</cac:OriginatorCustomerParty>

5.2. Order Reference

Used to provide a reference to the purchase order on which the Despatch Advice is based. There may be multiple Despatch Advices to cover one purchase order. Each Despatch Advice relates to one purchase order. The reference to Order Line-ID is required in the UBL syntax. To cater for scenarios where no order line reference exist a dummy value must be applied. The dummy value must consist of the characters NA (Not Applicable).

Example header level.
<cac:OrderReference>
  <cbc:ID>4321</cbc:ID>
</cac:OrderReference>
Example Line level.
<cac:OrderLineReference>
  <cbc:LineID>5</cbc:LineID>
</cac:OrderLineReference>
Example Line level, alternative.
<cac:OrderLineReference>
  <cbc:LineID>NA</cbc:LineID>
</cac:OrderLineReference>

5.3. Shipment

Description of the actual shipment that contains the goods that are being despatched.

5.3.1. Shipment ID

In some uses of the Despath Advice, there is no unique identifier assigned to the shipment. However, the UBL syntax requires the Shipment ID. Consequently, to be able to use elements such as GrossWeightMeasure or CarrierParty, the Shipment/ID must be filled in. To cater for scenarios where no ID exist a dummy value must be applied. The dummy value must consist of the characters NA (Not Applicable).

Example
<cac:Shipment>
  <cbc:ID>NA</cbc:ID>
  <cbc:Information>Free text information relating to the Shipment</cbc:Information>
  <cbc:GrossWeightMeasure unitCode="KGM" unitCodeListID="UNECERec20">23</cbc:GrossWeightMeasure>
  <cbc:GrossVolumeMeasure unitCode="MTQ" unitCodeListID="UNECERec20">27</cbc:GrossVolumeMeasure>
  <cac:Consignment>
    <cbc:ID>12345</cbc:ID>
    <cac:CarrierParty>
      <cac:PartyName>
        <cbc:Name>CarrierPart</cbc:Name>
      </cac:PartyName>
    </cac:CarrierParty>
  </cac:Consignment>
  <cac:Delivery>
    <cac:EstimatedDeliveryPeriod>
      <cbc:StartDate>2013-03-15</cbc:StartDate>
      <cbc:StartTime>08:00:00</cbc:StartTime>
      <cbc:EndDate>2013-03-16</cbc:EndDate>
      <cbc:EndTime>12:00:00</cbc:EndTime>
    </cac:EstimatedDeliveryPeriod>
    <cac:Despatch>
      <cbc:ActualDespatchDate>2013-03-13</cbc:ActualDespatchDate>
      <cbc:ActualDespatchTime>08:00:00</cbc:ActualDespatchTime>
    </cac:Despatch>
  </cac:Delivery>
</cac:Shipment>

5.4. Despatch Line

Description of items that are being despatched.

5.4.1. Item Description and Identification

Each despatch line contains elements for description and identification of the item. Normally only one of the identifiers is needed in the message.

Example
<cac:Item>
  <cbc:Name>Item123</cbc:Name>
  <cac:SellersItemIdentification>
    <cbc:ID>010120401</cbc:ID>
  </cac:SellersItemIdentification>
  <cac:StandardItemIdentification>
    <cbc:ID schemeID="GTIN" >05704368124358</cbc:ID>
  </cac:StandardItemIdentification>
</cac:Item>

5.4.2. Outstanding Quantity

The outstanding element on the Despatch line is both used to signal the outstanding quantity and to inform about delivery discrepancies.

The handling of “The outstanding quantity which will never be delivered” is done like this: The amount that is declared in the element OutstandingQuantity is equivalent to the amount that will be delivered in a later Despatch. This implicitly means that the missing items that are NOT declared in the OutstandingQuantity cant or will not will be delivered.

Example 1. Example 1

10 items are ordered, 6 items are delivered and the rest of 4 items will be delivered later:

Quantity ordered: 10
Quantity delivered: 6
Outstanding quantity: 4

<cbc:DeliveredQuantity unitCode="EA" unitCodeListID="UNECERec20”>6</cbc:DeliveredQuantity>
<cbc:OutstandingQuantity unitCode="EA" unitCodeListID="UNECERec20">4</cbc:OutstandingQuantity>
Example 2. Example 2

10 items are ordered. 6 items are delivered and the rest of 4 items will NOT be delivered:

Quantity ordered: 10
Quantity delivered: 6
Outstanding quantity: 0

<cbc:DeliveredQuantity unitCode="EA" unitCodeListID="UNECERec20">6</cbc:DeliveredQuantity>
<cbc:OutstandingQuantity unitCode="EA" unitCodeListID="UNECERec20">0</cbc:OutstandingQuantity>
Example 3. Example 3

10 items are ordered. 6 items are delivered and 3 will be delivered later and 1 item will NOT be delivered:

Quantity ordered: 10
Quantity delivered: 6
Outstanding quantity: 3

<cbc:DeliveredQuantity unitCode="EA" unitCodeListID="UNECERec20">6</cbc:DeliveredQuantity>
<cbc:OutstandingQuantity unitCode="EA" unitCodeListID="UNECERec20">3</cbc:OutstandingQuantity>

5.4.3. Hazardous Item

The EHF Despatch Advice also contains the possibility to inform the Consignee about Hazardous Items. This is done by informing the dangerous regulation code for example ADR (Road transport), IMDG (transport by sea) or RID (railroad transport). When declaring hazardous items it is recommended to use the UNDG code to inform about the convention the item is declared hazardous under. When the UNDG code has been declared the Hazard class is declared. The Hazard class corresponds to the hazardous class of the item for example class 2.3 which indicates Poisonous Gas.

Additionally is it is important to state that the transport handling unit is containing Hazardous risks.

See beneath for an example of declaring hazardous items.

Example
<cac:HazardousItem>
  <cbc:UNDGCode listID="UNCL8273">ADR</cbc:UNDGCode>
  <cbc:HazardClassID>2.3</cbc:HazardClassID>
</cac:HazardousItem>

5.4.4. Serial Numbers

If each of the delivered items is marked with an individual serial number, these numbers may be sent in the Despatch Advice on Item level.

Example
<cac:Item>
  <cac:ItemInstance>
    <cbc:SerialID>OR250RHZ444</cbc:SerialID>
  </cac:ItemInstance>
  <cac:ItemInstance>
    <cbc:SerialID>OR250RHZ4445</cbc:SerialID>
  </cac:ItemInstance>
  <cac:ItemInstance>
    <cbc:SerialID>OR250RHZ4446</cbc:SerialID>
  </cac:ItemInstance>
</cac:Item>

5.4.5. Batch/LOT Numbers, Expiry Date and Best Before Date

The Batch number (LOT number) applies to all items in the despatch line.

Expiry date is used for medical drugs.

Best before date is often used for food.

Example 1
<cac:ItemInstance>
  <cac:LotIdentification>
    <cbc:LotNumberID>898A129</cbc:LotNumberID>
    <cbc:ExpiryDate>2015-07-01</cbc:ExpiryDate>
  </cac:LotIdentification>
</cac:ItemInstance>
Example 2:
<cac:ItemInstance>
  <cbc:BestBeforeDate>2015-04-15</cbc:BestBeforeDate>
</cac:ItemInstance>

5.4.6. Transport Handling Unit

The items on a Despatch line may be packed in several transport handling units which are the physical handling units such as box, container, pallet, etc. containing the consignment.

Serial shipping container code (SSCC) issued by GS1 may be used to identify the transport handling unit. Note that the same physical handling unit may contain items from different despatch lines. Implemented by referencing the same SSCC code in the ID element of the TransportHandlingUnit on several despatch lines.

Example
<cac:TransportHandlingUnit>
  <cbc:ID schemeID="SSCC" schemeAgencyName="GS1">123456789012345675</cbc:ID>
  <cbc:TransportHandlingUnitTypeCode listID="UNECERec21">CT</cbc:TransportHandlingUnitTypeCode>
    <cbc:ShippingMarks>Free text information that is written/printed on to the transport handling unit</cbc:ShippingMarks>
  <cac:MeasurementDimension>
    <cbc:AttributeID schemeID="UNCL6313">AAB</cbc:AttributeID>
    <cbc:Measure unitCode="KGM">23.00</cbc:Measure>
  </cac:MeasurementDimension>
</cac:TransportHandlingUnit>

6. Validation

To optimize the flexibility in the validation process, each EHF document is validated in different stages with shifting focus in every stage. The pyramid below illustrates the different stages.

Pyramid of Validation

6.1. Validation Principles

Stages in the validation process:

  • Validation of syntax against UBL 2.1 Schema, for example:

    • Tag names and attributes must be correctly written and follow the UBL 2.1 sequence

    • All UBL 2.1 mandatory tag names must be present.

    • The element’s contents must be according to the element’s type definition.

  • Validation against CEN BII Core to verify that the message is according to international requirements, like:

    • Valid codes for currencies, countries, tax etc.

    • Mandatory tag names according to CEN BII Core.

    • Logical correlations between information element, i.e. that start date is at least lower than end date, sub totals must be totaled, multiplications give the correct result etc.

  • Validation against PEPPOL (EU) rules and regulations

  • Validation against EHF Common rules containing rules common to all EHF document types.

  • Validation against EHF rules and Norwegian legislation, like:

    • Organisation number must be specified for the seller/supplier.

    • «Your ref» must be specified.

    • Addresses, postal zone number and post office/city must be specified for the buyer/customer.

6.2. Dynamic Validation

The combination of ProfileID and CustomizationID in an XML document defines the validation rules applied to the document.

CustomizationID may be extended with more elements for specific trade or business validation rules.

6.3. Validation Rules per ProfileID and CustomizationID

6.5. Validation Service

Difi’s Validator is an application program used to validate EHF XML-files.

Further information can be found here: https://vefa.difi.no/ehf/knowledge-base/validation/

7. Appendix

Appendix A: Structure Table

Attached is structure tables providing a structured overview of the document types.

Appendix B: Message table

Attached is complete message table for the document types.

Appendix C: Code Lists

Current code lists for EHF:

Appendix D: UBL 2.1

This implementation guide builds upon UBL 2.1 Schemas available from OASIS.

These schemas are used when performing syntax validation.

Please see the UBL 2.1 homepage for information about the standard or further resources available.

Schemas in use

Appendix E: Schematron

Validation files based on Schematron may be found in our Github repoistory. Release "2021-02-15" is used for the current version of resources and branch "master" is for development and review.

Difi provides validation artifacts as Schematron and not as XSLT as of release 2016-11-15.

Appendix F: Example files

Example files are provided to help implementers. Example files for this implementation guideline is included in the example file archive.