Sage 200 Goods Despatch Note (GDN) XML
The Import Goods Despatched Notes task allows you to despatch items on sales orders in Sage 200. The task supports despatching specific items or all stock allocated to the order.
Tasks
XML
Any fields not documented below are not supported with our imports.
Examples of where in the XML the fields should appear are shown in the samples below. Sample import file for despatching items on an order:
<?xml version="1.0" encoding="utf-8"?>
<Company
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DespatchNotes>
<DespatchNote>
<OrderNumber>0000001579</OrderNumber>
<GoodsNotes>
<GoodsNote>
<Type>GoodsDespatchedNote</Type>
<Date>2014-01-01T00:00:00</Date>
<Sku>PROD001</Sku>
<Quantity>3</Quantity>
</GoodsNote>
<GoodsNote>
<Type>GoodsDespatchedNote</Type>
<Date>2014-01-01T00:00:00</Date>
<Sku>PROD002</Sku>
<Quantity>1</Quantity>
</GoodsNote>
</GoodsNotes>
<TrackingInfo>
<Courier>DPD</Courier>
<ConsignmentNo>123456789</ConsignmentNo>
<Incoterm>CFR - Cost and Freight [2010]</Incoterm>
<Reason>Sale</Reason>
<Weight>10.25</Weight>
<Pieces>1</Pieces>
<Notes>Leave next door if no answer</Notes>
</TrackingInfo>
</DespatchNote>
</DespatchNotes>
</Company>
In each of the following sections most of the XML has been omitted to make the samples easier to read, you will need to provide the above as a minimum to create a goods despatched note. The whole structure of the Company schema is used below as a reference of where fields should be in the object model.
Despatch Note
The following information can be specified at the despatch note level. The CustomerOrderNumber or the OrderNumber are used to identify which sales order the despatch note is for.
| Sage Field | XML Field | Example | Field Type | Field Length | Input |
|---|---|---|---|---|---|
| - | Id* | 43527 | string | 255 | Optional |
| Order No | OrderNumber | 0000001579 | string | 20 | Required, if a CustomerOrderNumber has not been provided |
| Customer Order No | CustomerOrderNumber | 02-139483-383 | string | 30 | Required, if an OrderNumber has not been provided |
| - | InvoiceDate* | 2021-11-01T00:00:00 | date | - | Optional |
- Id* - Used internally by Zynk for duplicate prevention. We recommend setting this to the despatch ID from the source system.
- InvoiceDate* - Used if the Auto Print Invoice setting is enabled in the task settings. Any successfully printed invoices in Sage 200 will have this as there invoice date. If no InvoiceDate is specified in the data and the setting is enabled in the task settings, the date of the import will be used as the invoice date in Sage 200.
<?xml version="1.0" encoding="utf-8"?>
<Company
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DespatchNotes>
<DespatchNote>
<Id>43527</Id>
<OrderNumber>0000001579</OrderNumber>
<CustomerOrderNumber>02-139483-383</CustomerOrderNumber>
</DespatchNote>
</DespatchNotes>
</Company>
Goods Note
The following information is required at the goods note level, to identify which items to despatch, and the quantity. Alternatively, all items which are ready for despatch can be despatched automatically, by not providing a GoodsNotes collection in the XML.
| Sage Field | XML Field | Example | Field Type | Field Length | Input |
|---|---|---|---|---|---|
| - | Type* | GoodsDespatchedNote | enum | - | Required |
| Required Date | Date* | 2014-01-01T00:00:00 | date | - | Optional |
| Item Code | Sku | PROD001 | string | 30 | Required |
| Qty to Despatch | Quantity | 3 | decimal | - | Required |
- Type* - The type must be set to 'GoodsDespatchedNote'
- Date* - If the date is not provided, it will default to the current date
<?xml version="1.0" encoding="utf-8"?>
<Company
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DespatchNotes>
<DespatchNote>
<GoodsNotes>
<GoodsNote>
<Type>GoodsDespatchedNote</Type>
<Date>2014-01-01T00:00:00</Date>
<Sku>PROD001</Sku>
<Quantity>3</Quantity>
</GoodsNote>
</GoodsNotes>
</DespatchNote>
</DespatchNotes>
</Company>
Tracking Information
The following information can be specified if the 'Record tracking on despatch' option is enabled in SOP Settings in Sage. The task supports setting this information on both new and existing despatches.
If you want to update the tracking on an existing despatch, you will need to provide either the UniqueId or DocumentNumber in your XML, to identify which despatch you want to update. UniqueId corresponds to the SOPDespatchReceipt.SOPDespatchReceiptID column in the Sage database, and can be seen in success file if the despatch was imported via Zynk, or in the output file of the Export Despatch Notes task. DocumentNumber corresponds to the despatch number shown in the Sage UI.
| Sage Field | XML Field | Example | Field Type | Field Length | Input |
|---|---|---|---|---|---|
| - | UniqueId | 21017 | integer | - | Dependant |
| Despatch No | DocumentNumber | 0000000061 | string | 20 | Dependant |
| Courier | Courier | DPD | string | 60 | Optional |
| Consignment No | ConsignmentNo | 123456789 | string | 60 | Optional |
| Incoterm | Incoterm | CFR - Cost and Freight [2010] | string | 60 | Optional |
| Reason for export | Reason | Sale | string | 60 | Optional |
| Weight | Weight | 10.25 | decimal | - | Optional |
| Pieces | Pieces | 1 | integer | - | Optional |
| Notes | Notes | Leave next door if no answer | string | 256 | Optional |
<?xml version="1.0" encoding="utf-8"?>
<Company
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DespatchNotes>
<DespatchNote>
<UniqueId>21017</UniqueId>
<DocumentNumber>0000000061</DocumentNumber>
<TrackingInfo>
<Courier>DPD</Courier>
<ConsignmentNo>123456789</ConsignmentNo>
<Incoterm>CFR - Cost and Freight [2010]</Incoterm>
<Reason>Sale</Reason>
<Weight>10.25</Weight>
<Pieces>1</Pieces>
<Notes>Leave next door if no answer</Notes>
</TrackingInfo>
</DespatchNote>
</DespatchNotes>
</Company>