GS1 XML Ecom Technical User Guide I1 PDF
GS1 XML Ecom Technical User Guide I1 PDF
GS1 XML Ecom Technical User Guide I1 PDF
Document Summary
Document Item Current Value
Document Title GS1 XML MR3 eCom Technical User Guide
Date Last Modified 08.06.2012
Current Document Issue 1
Status For publishing
Document Description
Contributors
Name Organization
Ewa Iwicka GS1 GO
Coen Janssen GS1 GO
Disclaimer
Whilst every effort has been made to ensure that the guidelines to use the GS1 standards contained in the
document are correct, GS1 and any other party involved in the creation of the document HEREBY STATE that
the document is provided without warranty, either expressed or implied, of accuracy or fitness for purpose, AND
HEREBY DISCLAIM any liability, direct or indirect, for damages or loss relating to the use of the document. The
document may be modified, subject to developments in technology, changes to the standards, or new legal
requirements. Several products and company names mentioned herein may be trademarks and/or registered
trademarks of their respective companies.
Table of Contents
1. Introduction ............................................................................................................................... 5
1.1. Purpose of this Document .................................................................................................................. 5
1.2. Scope of this document...................................................................................................................... 5
1.3. Target audience ................................................................................................................................. 5
10. Main differences between the GS1 XML 3.0 and 2.0 ...................................................... 26
10.1. Reasons for change ......................................................................................................................... 26
10.2. Main changes in the GS1 XML design ............................................................................................. 27
1. Introduction
1.1. Purpose of this Document
This document is intended to clarify the technical aspects of the GS1 XML Business Message
Standard Major Release 3.
Example
If the Order BMS 2.6.0 required a change to the common library that affected all messages, the new
version was renamed Order BMS 3.0.0.
Example
<xsd:annotation><xsd:documentation>
....
Version Information:
Version Number: 3.0
Date of creation: August 2011
....
</xsd:annotation></xsd:documentation>
Note: The file names of the GS1 XML schemas do not contain version numbers, so e.g. both Order
3.0 and Order 3.1 will have the file name: Order.xsd.
4. Code lists
Code lists are the standardised lists of values allowed at the given location of the eCom message.
GS1 uses values from two types of sources:
Code lists defined and maintained outside of GS1 - by external organisations (agencies)
Code lists defined and maintained by GS1
This approach provides flexibility for trading partners to select the code list appropriate to their usage,
while also restricting the list to those that have been identified as valid options to support a specific
context.
Example
A Colour Code List with values such as 1 representing the National Retail Federation (NRF)
Standard Colour & Size Codes; 2 representing the Pantone Matching System.
If the restricted list selected by trading partners is the National Retail Federation Standard Colour
Code List, and the manufacturer wants to send a colour code that represents dark blue, they could
send the code value of 401 (the NRF 3-digit numeric code for dark blue).
Values are Intrinsic to the message essential to the processing of the message (e.g. type of
invoice) and not reused by any other messages
Code lists are immutable not capable of or susceptible to change
Code lists have manageable size under 50 values
The code lists whose values are enumerated within the XML schema are referred to as
enumerations.
Example
The Day of the Week Enumeration or Document Status Enumeration published in the BMS Shared
Common Library.
The code lists are versioned independently of the Business Message Standards, although the BMS
publications may recommend use of the minimum code list version or higher version that is applicable
to a specific release.
Example
[Code List] Version 3 or higher is recommended. Refer to the Global Data Dictionary or [Business
Message Standard] for the list of values.
GTIN-8 0 0 0 0 0 0 N1 N2 N3 N4 N5 N6 N7 N8
In GS1 XML, the data type of GTIN is defined as 14 numeric characters (see 6.2.1). Thus, the full 14
digits must be transmitted. Shorter formats MUST be filled in with leading zeroes up to 14 digits.
Note: Due to differences in syntax, the format of GTIN in both GS1 eCom standards: EANCOM and
GS1 XML are different.
In GS1 XML the format is defined as exactly 14 digits, which means that any GTIN that is
originally shorter than 14 digits needs to be filled up to 14 characters by adding the leading
zeroes
In GS1 EANCOM the format is numeric, which means that the non-significant leading zeroes
must be removed, since its data type is defined as numeric up to 14 digits (n..14). EDIFACT
syntax does not allow transmitting non-significant leading zeros for numeric fields.
However, all these formats still convey the same GTIN identifier. GS1 recommends that GTIN should
be stored in a 14-digit format. It can be transmitted in eCom messages or encoded in bar codes in a
format that suites the syntax rules or bar code symbology.
The following W3C data types ARE NOT USED in GS1 standards:
normalizedString ENTITIES unsignedLong
token NMTOKEN unsignedShort
Name NMTOKENS long unsignedByte
NCName language double
ID int anyURI
IDREF short QName
IDREFS byte NOTATION
ENTITY
< creationDateTime>2011-03-22T09:30:47.0</creationDateTime>
indicates 47 seconds and 0 milliseconds like in the example above
<creationDateTime>2011-03-22T09:30:47.233</creationDateTime>
indicates 47 seconds and 233 milliseconds
1
UTC Stands for Coordinated Universal Time
Attribute specifying
Example: namespace of the
<extension> message extension
<eb_meat:meatItemContainmentExtension xmlns:eb_meat="urn:gs1:ecom:unprepared_meat:xsd:3"
xsi:schemaLocation="urn:gs1:ecom:unprepared_meat:xsd:3
Attribute specifying
../Schemas/gs1/ecom/MeatItemContainmentExtension.xsd"> location of the
message extension
<!EXTENSION CONTENT-->
schema
</extension>
Relative access
Content of the path to the message
message extension extension schema
7. GS1 namespaces
7.1. GS1 namespace structure
The namespaces in GS1 reflect the domain, the interchange which the schema is used in and the
major version of the schema release. The GS1 namespaces have the format of the Uniform Resource
Names (URN). All URNs have the following structure:
<URN>= "urn:" <NID> ":" <NSS>
where:
<NID> is the Namespace Identifier
<NSS> is the Namespace Specific String
In all the GS1 namespaces, gs1 is used for the NID. The NSS of all URNs assigned by GS1 have the
following hierarchical structure:
urn:gs1:<domain>:<interchange>:<type>:<version-id>
where:
domain GS1 Business Area, Service, Technology, e.g. eCom
interchange Artefact within the GS1 Domain, e.g. Order
type Resource type, e.g. xsd
version-id Version of the Interchange, e.g. 3
Examples:
urn:gs1:ecom:ecom_common:xsd:3 - the GS1 namespace for eCom common library
urn:gs1:shared:shared_common:xsd:3 - the GS1 namespace for shared common library
urn:gs1:ecom:order:xsd:3 - the GS1 namespace for eCom Order
Note: NSS in GS1 namespaces is case-sensitive, even though in the RFC 2141 is specified as not
sensitive.
Example:
GS1 XML schema: definition of
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" unqualifying elements
and attributes
elementFormDefault="unqualified" attributeFormDefault="unqualified">
Qualified root
GS1 XML instance: element
<order:orderMessage xmlns:order="urn:gs1:ecom:order:xsd:3"
xmlns:sh="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:gs1:ecom:order:xsd:3 ../Schemas/gs1/ecom/Order.xsd">
<sh:StandardBusinessDocumentHeader>
Qualified SBDH
<!SBDH CONTENT--> element
</sh:StandardBusinessDocumentHeader>
<order> Unqualified
<!ORDER DOCUMENT CONTENT--> elements of
business document
</order>
</order:orderMessage>
In the GS1 XML release 3.0 the business message components are defined in the XML schemas of
three levels:
Shared Common schema contains all the components that can be re-used across domains, e.g.
eCom and GDSN, such as GS1 Identification Keys, Party Identification, etc.
Domain Common contains all the components that can be re-used within one domain, e.g.
eCom, such as Transactional Party Identification, Order Type Code. The domain specific
components are defined using the shared components when available. Thus, the
eComCommon.xsd needs to import the SharedCommon.xsd
Message and extension schema defines the structure of the actual message and the business
document, as well as the content of the potential extensions. The document and extension
specific components are defined using the shared and domain specific components when
available. Thus, the BusinessMessage.xsd (e.g. Order.xsd, Invoice.xsd) needs to import the
SharedCommon.xsd and eComCommon.xsd
The Standard Business Document Header component is defined in its own set of schemas, while the
structure of the header is defined in the StandardBusinessDocumentHeader.xsd that needs to be
imported into the BusinessMessage.xsd.
Example
Every business message schema imports at least the following three schemas:
<xsd:import namespace="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader"
schemaLocation="../../sbdh/StandardBusinessDocumentHeader.xsd"/>
<xsd:import namespace="urn:gs1: shared:shared_common:xsd:3"
schemaLocation="../shared/SharedCommon.xsd"/>
<xsd:import namespace="urn:gs1:ecom:ecom_common:xsd:3"
schemaLocation="eComCommon.xsd"/>
These paths reflect the following folder structure:
Note: The file names of the GS1 XML schemas do not contain version numbers, therefore special
care must be taken if multiple versions of business messages are used in the same system. For
more details about versioning please refer to GS1 XML versioning
2
The architecture currently used by the GDSN is described in the GS1 XML Message Architecture Implementation Guide
9.2. Benefits
The separation of transport and routing information from the business document allows delivering the
message to the right addressee and the correct business application without accessing the content of
the business document. The later may be either impractical or impossible, if the document content is
encrypted for security reasons.
Allowing for only one document type in the message ensures the correct routing within the company.
For example, all the business documents are passed to the financial or ordering systems.
The SBDH has been designed to be independent of the specific transport protocol used. Information
contained in the SBDH can be used by communication applications to determine routing, whether the
transport protocol used is ebMS, AS2, or any other protocol.
Using one common document header enables integration of documents between internal applications,
enterprise applications, and business-to-business infrastructure by providing a consistent interface
between applications. It allows any application to determine the logical routing requirements and/or the
logical processing requirements of a document based on the information contained in the SBDH.
SBDH contains information for communication applications about:
Document Routing identifies message sender and receiver; used by message exchange hubs,
marketplaces, etc.
Document Identification used by the middleware to identify and route the message to the
appropriate business application without opening or parsing it
Document Processing Context provides parameters for processing the business document in
the context of a business choreography exchange and identifies specific guidelines document that
has been used as a base for creating the instance document
Payload a container for the business document
Detailed guidelines how to implement the SBDH with the GS1 XML standard have been documented
separately in the Standard Business Document Header (SBDH) Version 1.3 Technical Implementation
Guide, available at the GS1 website: www.gs1.org/services/gsmp/kc/ecom/xml/xml_sbdh.html.
DocumentType
Abstract extended by:
Order
Invoice
Despatch Advice
<order:orderMessage>
<!STANDARD BUSINESS DOCUMENT HEADER CONTENT-->
<order>
Status of the <creationDateTime>2011-01-12T12:00:00.000-05:00</creationDateTime>
business document
<documentStatusCode>ORIGINAL</documentStatusCode>
Version of the business
<documentActionCode>ADD</documentActionCode> document content
The action that should
be performed on the <documentStructureVersion>3.0</documentStructureVersion>
business document <lastUpdateDateTime>2011-01-15T12:00:00.000-05:00</lastUpdateDateTime>
<!--BUSINESS DOCUMENT CONTENT-->
</order>
</order:orderMessage> Content of the Date and time when the
business document document was updated
Message
SBDH
Business Document 1
Business Document 2
Business Document 3
...
Business Document 10,000
Below is an example of an XML instance containing one SBDH and three Business Documents in
this case the Orders:
<order:orderMessage>
<sh:StandardBusinessDocumentHeader>
<!-- STANDARD BUSINESS DOCUMENT HEADER CONTENT-->
</sh:StandardBusinessDocumentHeader>
<order>
<!FIRST ORDER DOCUMENT CONTENT-->
</order>
<order>
<!SECOND ORDER DOCUMENT CONTENT-->
</order>
<order>
<!THIRD ORDER DOCUMENT CONTENT-->
</order>
</order:orderMessage>
10. Main differences between the GS1 XML 3.0 and 2.0
The review of the GS1 XML design has been done based on feedback from user community who
experienced difficulties in implementation of MR2 and requested significant changes.
Note: The table above does not cover the changes made in the messages, based on the user
requirements. For that please refer to the respective BMS, section Summary of Changes.