Sage 200 Evolution Purchase Invoice XML
The Sage 200 Evolution Purchase Invoice XML format is used to process existing purchase orders in Sage 200 Evolution, resulting in an invoice being generated. Purchase orders can either be processed in full or partially.
Tasks
Minimal Purchase Invoice XML
The XML below represents the minimum information required to create a purchase invoice.
<?xml version="1.0"?>
<PurchaseInvoices>
<PurchaseInvoice>
<OrderNo>NCLPO0007</OrderNo>
<AutoCompleteOrder>true</AutoCompleteOrder>
</PurchaseInvoice>
</PurchaseInvoices>
Duplicate Prevention
If the Prevent Reprocessing setting is enabled, Zynk will check to see if the ExternalId provided in the XML has already been imported. If the record has already been processed it will be skipped, and output to the Fail File.
| Sage Field | XML Field | Example | Field Type | Input |
|---|---|---|---|---|
| N/A | ExternalId | 25 | Int | Dependant |
<?xml version="1.0"?>
<PurchaseInvoices>
<PurchaseInvoice>
<ExternalId>PI0001</ExternalId>
</PurchaseInvoice>
</PurchaseInvoices>
Identifying The Purchase Order To Process
The following information can be specified to identify the purchase order you want to process. At least one of the following fields must be specified.
| Sage Field | XML Field | Example | Field Type | Input |
|---|---|---|---|---|
| N/A | Id* | 25 | Int | Dependant |
| Order No | OrderNo | NCLPO0007 | String | Dependant |
| N/A | OrderExternalId* | TEST0001 | String | Dependant |
*Id - The IDs of purchase orders are not visible in Sage, but can be obtained via the Export Purchase Orders task.
*OrderExternalId - If the purchase order was imported into Sage by Zynk, and an ExternalId was specified at the time, the same value can be provided here to match the purchase order.
<?xml version="1.0"?>
<PurchaseInvoices>
<PurchaseInvoice>
<Id>25</Id>
<OrderNo>NCLPO0007</OrderNo>
<OrderExternalId>TEST0001</OrderExternalId>
</PurchaseInvoice>
</PurchaseInvoices>
Automatically Processing The Purchase Order
If you want to process all outstanding lines on the purchase order, you can instruct Zynk to do this for you automatically.
| Sage Field | XML Field | Example | Field Type | Input |
|---|---|---|---|---|
| N/A | AutoCompleteOrder | true | Boolean | Optional |
<?xml version="1.0"?>
<PurchaseInvoices>
<PurchaseInvoice>
<AutoCompleteOrder>true</AutoCompleteOrder>
</PurchaseInvoice>
</PurchaseInvoices>
Specifying The Lines To Process
If you want to process specific lines and quantities on the purchase order, you will need to provide an OrderItems collection in the XML.
We support processing lines for both the ST and GL modules into Sage. The module will be inferred automatically based on whether you provide an inventory item code or GL account code in the XML.
We also support changing the unit price of the lines on the purchase order before processing it.
| Sage Field | XML Field | Example | Field Type | Input |
|---|---|---|---|---|
| N/A | Id* | 42 | String | Dependant |
| # | Index | 1 | String | Dependant |
| Item | InventoryItem/Code | PROD001 | String | Dependant |
| Item | GlAccount/Code | 4000 | String | Dependant |
| N/A | ToProcess | 1 | Double | Required |
| Price | UnitSellingPrice | 10.00 | String | Optional |
*Id - The IDs of purchase order lines are not visible in Sage, but can be obtained via the Export Purchase Orders task.
<?xml version="1.0" encoding="utf-8"?>
<PurchaseInvoices>
<PurchaseInvoice>
<OrderItems>
<OrderItem>
<!-- ST line -->
<Id>42</Id>
<Index>1</Index>
<InventoryItem>
<Code>PROD001</Code>
</InventoryItem>
<ToProcess>1</ToProcess>
<UnitSellingPrice>10.00</UnitSellingPrice>
</OrderItem>
<OrderItem>
<!-- GL line -->
<Id>43</Id>
<Index>2</Index>
<GlAccount>
<Code>4000</Code>
</GlAccount>
<ToProcess>1</ToProcess>
<UnitSellingPrice>10.00</UnitSellingPrice>
</OrderItem>
</OrderItems>
</PurchaseInvoice>
</PurchaseInvoices>