Shipment Delivery Specification (Export from Gravity)
Version (most recent 5)
Version | Date | Details |
---|---|---|
1.1 | Mar 22, 2024 | XSD Update
|
Introduction
This document is intended to provide specification requirements to enable the file-based Integration of Shipment Delivery Export within Gravity Supply Chain’s (GSC) Purchase Order Management (POM) product.
File Specification
File Type
The file format used to integrate Shipment Delivery data into GSC must be XML. The XML file must adhere to the XSD in the document below.
File Name Convention
All Shipment Delivery exported files must follow the naming convention listed here:
CUSTOMERNODECODE_ShipmentDeliveryExport_YYYYMMDD hhmmss.xml
File Transfer
XML files generated will be transferred by push to an external FTP server (Customer/Forwarder). The Customer/Forwarder should provide credentials during implementation.
Error Handling
Should the XML file generation, Export process or File transfer encounter any errors, they would be logged and presented on the platform.
Schema
Booking Elements
Element | Description | Mandatory? | Data Type | Max Length | Example |
BookingReference | A unique booking reference assigned to the shipment delivery job | Y | nvarchar |
| PUA-1585 |
DateBooked | Date when the pick-up instruction was submitted | Y | dateTime |
| 2024-01-20 |
BookedBy | Username of the user who submitted the instruction (for Export only) | Y | nvarchar |
| Peter.Chan |
CustomerCode | Customer Code | Y | nvarchar |
| ABCD |
HaulierCode | Haulier Code | Y | nvarchar |
| TR1234 |
ShipmentPickUpLocation | Place where the shipment is ready to be picked up for the delivery | N | nvarchar |
|
|
PlannedShipmentPickUpDate | Expected date time when the shipment pick-up should be performed | N | dateTime |
| 2024-02-19T07:49:03 |
CargoDeliveryLocationNode | Place where the shipment should be delivered to | N | See section Node Elements | ||
CargoDeliveryLocationName | Name of the place where the shipment should be delivered to | Y | nvarchar |
|
|
CargoDeliveryLocationContactPerson | Contact person name of the place where the shipment should be delivered to | N | nvarchar |
|
|
CargoDeliveryLocationPhone | Contact phone number of the place where the shipment should be delivered to | N | nvarchar |
|
|
CargoDeliveryLocationEmail | Contact email of the place where the shipment should be delivered to | N | nvarchar |
|
|
CargoDeliveryLocationAddress | Address of the place where the shipment should be delivered to | N | nvarchar |
|
|
PlannedInDCDate | Expected date time when the shipment should be delivered to | Y | dateTime |
| 2024-02-19T07:49:03 |
EmptyContainerPickUpLocationNode | Node where the empty container is ready to be picked up for the return to carrier premises | N | See section Node Elements | ||
EmptyContainerPickUpLocationName | Place name where the empty container is ready to be picked up for the return to carrier premises | N | nvarchar |
|
|
EmptyContainerPickUpLocationContactPerson | Contact person name for the empty container pick-up | N | nvarchar |
|
|
EmptyContainerPickUpLocationPhone | Contact phone number for the empty container pick-up | N | nvarchar |
|
|
EmptyContainerPickUpLocationEmail | Contact email for the empty container pick-up | N | nvarchar |
|
|
EmptyContainerPickUpLocationAddress | Address where the empty container is ready to be picked up for the return to carrier premises | N | nvarchar |
|
|
PlannedEmptyContainerPickUpDate | Expected date time when the empty container should be picked up | N | dateTime |
| 2024-02-19T07:49:03 |
EmptyContainerDeliveryLocation | Place where the empty container should be delivered to | N | nvarchar |
|
|
PlannedEmptyContainerDeliveryDate | Expected date time when the empty container should be delivered to | N | dateTime |
| 2024-02-19T07:49:03 |
EmptyContainerReturnDeadline | Deadline of returning the empty container | N | dateTime |
| 2024-02-19T07:49:03 |
BookingOrders | List of 3PL Shipment Booking included in the scheduled pick-up | Y | See section Booking Order Elements |
Booking Order Elements
Element | Description | Mandatory? | Data Type | Max Length | Example |
Number | When Sea Freight then Container Number | Y | nvarchar | 250 | ABCD1234567 |
OrderNumber | Purchase Order Number | Y | nvarchar | 250 | PO01230213812 |
Identifier | Purchase Order Call-Off Reference | N | nvarchar | 50 | ID8901238123 |
BookingItems | List of order items included | Y | See section Booking Item Elements |
Booking Item Elements
Element | Description | Mandatory? | Data Type | Max Length | Example |
VendorBookingReference | A unique reference represents a vendor shipment booking created in the system | N | nvarchar | 250 | VEN-1234 |
ItemCode | Product number/Item Code | Y | nvarchar | 50 | 100013344 |
Description | Item / Product Description | N | nvarchar | 500 | T-Shirts |
SKU | SKU (if available) | N | nvarchar | 100 | 80018839298 |
Colour | Colour of item (if available) | N | nvarchar | 50 | Blue |
Size | Size of item (if available) | N | nvarchar | 50 | Large |
Quantity | Pieces | Y | decimal |
| 68 |
PackType | Pack Type | N | nvarchar | Refer to PackType | |
Cartons | Cartons | N | int |
| 12 |
CBM | Cubic Metres | N | decimal | 18,2 | 65.32 |
Weight | Weight | N | decimal | 18,2 | 32.46 |
Cancelled | Cancelled flag | N | bool |
| false |
Node Elements
Element | Description | Mandatory? | Data Type | Max Length | Example |
Code | Code of Node | Y | nvarchar | 1000 | MCRN |
Name | Node name which is the UI display value in GRA | Y | nvarchar | 1000 | MACARON |
Description | Description of the Node | N | nvarchar | 200 | Food |
Address | Address of Node | N | See Node Address Elements section |
Node Address Elements
Element | Description | Mandatory? | Data Type | Max Length | Example |
Line1 | Line1 | N | nvarchar | 100 | Rm 801-807, 8/F, Hoplite Industrial Building |
Line2 | Line2 | N | nvarchar | 100 | 3-5 Wang Tai Road, Shenzhen Bay |
Line3 | City | N | nvarchar | 100 | Shenzhen |
Line4 | State/Province | N | nvarchar | 100 | Guandong |
PostCode | Postcode/Zip | N | nvarchar | 50 | 31515412 |
N | nvarchar | 250 | Tim.R@mlogistics.com | ||
Fax | Fax | N | nvarchar | 20 | +854423512 |
Telephone | Telephone | N | nvarchar | 20 | +8432173475 |
Longitude | Longitude | N | decimal | 12 | 121.45806 |
Latitude | Latitude | N | decimal | 12 | 31.22222 |
Contact | Contact Name | N | nvarchar | 100 | Tim R |
CountryCode | Country Code | N | nvarchar | 50 | CN |
XSD
<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Bookings" type="ArrayOfBooking" />
<xs:complexType name="ArrayOfBooking">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="Booking" type="Booking" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Booking">
<xs:all>
<xs:element minOccurs="1" maxOccurs="1" name="BookingReference" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="DateBooked" type="xs:dateTime" />
<xs:element minOccurs="1" maxOccurs="1" name="BookedBy" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="CustomerCode" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="HaulierCode" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="ShipmentPickUpLocation" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="PlannedShipmentPickUpDate" type="xs:dateTime" />
<xs:element minOccurs="0" maxOccurs="1" name="CargoDeliveryLocationNode" type="Node" />
<xs:element minOccurs="1" maxOccurs="1" name="CargoDeliveryLocationName" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="CargoDeliveryLocationPhone" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="CargoDeliveryLocationEmail" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="CargoDeliveryLocationContactPerson" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="CargoDeliveryLocationAddress" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="PlannedInDCDate" type="xs:dateTime" />
<xs:element minOccurs="0" maxOccurs="1" name="EmptyContainerPickUpLocationNode" type="Node" />
<xs:element minOccurs="0" maxOccurs="1" name="EmptyContainerPickUpLocationName" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="EmptyContainerPickUpLocationAddress" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="EmptyContainerPickUpLocationPhone" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="EmptyContainerPickUpLocationEmail" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="EmptyContainerPickUpLocationContactPerson" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="PlannedEmptyContainerPickUpDate" type="xs:dateTime" />
<xs:element minOccurs="0" maxOccurs="1" name="EmptyContainerDeliveryLocation" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="PlannedEmptyContainerDeliveryDate" type="xs:dateTime" />
<xs:element minOccurs="0" maxOccurs="1" name="EmptyContainerReturnDeadline" type="xs:dateTime" />
<xs:element minOccurs="1" maxOccurs="1" name="BookingOrders" type="ArrayOfBookingOrder" />
</xs:all>
</xs:complexType>
<xs:complexType name="ArrayOfBookingOrder">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="BookingOrder" type="BookingOrder" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="BookingOrder">
<xs:all>
<xs:element minOccurs="1" maxOccurs="1" name="Number" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="OrderNumber" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Identifier" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="BookingItems" type="ArrayOfBookingItem" />
</xs:all>
</xs:complexType>
<xs:complexType name="ArrayOfBookingItem">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="BookingItem" type="BookingItem" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="BookingItem">
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="VendorBookingReference" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="ItemCode" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Description" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="SKU" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Colour" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Size" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="Quantity" type="xs:decimal" />
<xs:element minOccurs="0" maxOccurs="1" name="PackType" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Cartons" type="xs:int" />
<xs:element minOccurs="0" maxOccurs="1" name="CBM" type="xs:decimal" />
<xs:element minOccurs="0" maxOccurs="1" name="Weight" type="xs:decimal" />
<xs:element minOccurs="0" maxOccurs="1" name="Cancelled" type="xs:boolean" />
</xs:all>
</xs:complexType>
<xs:complexType name="Node">
<xs:all>
<xs:element minOccurs="1" maxOccurs="1" name="Code" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="Name" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Description" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Address" type="NodeAddress" />
</xs:all>
</xs:complexType>
<xs:complexType name="NodeAddress">
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="Line1" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Line2" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Line3" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Line4" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="PostCode" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Email" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Fax" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Telephone" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Longitude" nillable="true" type="xs:decimal" />
<xs:element minOccurs="0" maxOccurs="1" name="Latitude" nillable="true" type="xs:decimal" />
<xs:element minOccurs="0" maxOccurs="1" name="Contact" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="CountryCode" type="xs:string" />
</xs:all>
</xs:complexType>
</xs:schema>
Sample Shipment Delivery XML file
<?xml version="1.0" encoding="utf-8"?>
<Bookings>
<Booking>
<BookingReference>ICC-123</BookingReference>
<DateBooked>2019-04-28T12:12:12</DateBooked>
<BookedBy>chris.wong</BookedBy>
<CustomerCode>ABC_COMPANY</CustomerCode>
<HaulierCode>HAULIERABC</HaulierCode>
<ShipmentPickUpLocation>Pick up location</ShipmentPickUpLocation>
<PlannedShipmentPickUpDate>2019-04-28T12:12:12</PlannedShipmentPickUpDate>
<EmptyContainerReturnDeadline>2019-04-28T12:12:12</EmptyContainerReturnDeadline>
<WarehouseNode>
<Code>DC123</Code>
<Name>DC 123</Name>
<Address>
<Line1>Line 1</Line1>
<Line2>Line 2</Line2>
<Line3>Line 3</Line3>
<Line4>Line 4</Line4>
<PostCode>101010</PostCode>
<Email>chris.wong@email.com</Email>
<CountryCode>GB</CountryCode>
</Address>
</WarehouseNode>
<PlannedInDCDate>2019-04-28T12:12:12</PlannedInDCDate>
<EmptyContainerPickUpLocation>Pick up location</EmptyContainerPickUpLocation>
<PlannedEmptyContainerPickUpDate>2019-04-28T12:12:12</PlannedEmptyContainerPickUpDate>
<EmptyContainerDeliveryLocation>Delivery Location</EmptyContainerDeliveryLocation>
<PlannedEmptyContainerDeliveryDate>2019-04-28T12:12:12</PlannedEmptyContainerDeliveryDate>
<EmptyContainerReturnDeadline>2019-04-28T12:12:12</EmptyContainerReturnDeadline>
<BookingOrders>
<BookingOrder>
<Number>REF-123</Number>
<OrderNumber>10011</OrderNumber>
<Identifier>1</Identifier>
<BookingItems>
<BookingItem>
<VendorBookingReference>VEN-12345</VendorBookingReference>
<ItemCode>6900018992</ItemCode>
<Description>Converse</Description>
<SKU>900012911</SKU>
<Colour>Blue</Colour>
<Size>10</Size>
<Quantity>945</Quantity>
<PackType>Carton</PackType>
<Cartons>6</Cartons>
<CBM>123.45</CBM>
<Weight>123.45</Weight>
<Cancelled>false</Cancelled>
</BookingItem>
</BookingItems>
</BookingOrder>
</BookingOrders>
</Booking>
</Bookings>