Skip to content

Sage 200 Evolution Sales Invoice XML

The Sage 200 Evolution Sales Invoice XML format is used to process existing sales orders in Sage 200 Evolution, resulting in an invoice being generated. Sales orders can either be processed in full or partially.

Tasks

Minimal Sales Invoice XML

The XML below represents the minimum information required to create a sales invoice.

<?xml version="1.0"?>
<SalesInvoices>
  <SalesInvoice>
    <OrderNo>NCLPO0007</OrderNo>
    <AutoCompleteOrder>true</AutoCompleteOrder>
  </SalesInvoice>
</SalesInvoices>

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"?>
<SalesInvoices>
  <SalesInvoice>
    <ExternalId>PI0001</ExternalId>
  </SalesInvoice>
</SalesInvoices>

Identifying The Sales Order To Process

The following information can be specified to identify the sales 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 sales orders are not visible in Sage, but can be obtained via the Export Sales Orders task. *OrderExternalId - If the sales 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 sales order.

<?xml version="1.0"?>
<SalesInvoices>
  <SalesInvoice>
    <Id>25</Id>
    <OrderNo>NCLPO0007</OrderNo>
    <OrderExternalId>TEST0001</OrderExternalId>
  </SalesInvoice>
</SalesInvoices>

Automatically Processing The Sales Order

If you want to process all outstanding lines on the sales 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"?>
<SalesInvoices>
  <SalesInvoice>
    <AutoCompleteOrder>true</AutoCompleteOrder>
  </SalesInvoice>
</SalesInvoices>

Specifying The Lines To Process

If you want to process specific lines and quantities on the sales 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 sales 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 sales order lines are not visible in Sage, but can be obtained via the Export Sales Orders task.

<?xml version="1.0" encoding="utf-8"?>
<SalesInvoices>
  <SalesInvoice>
    <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>
  </SalesInvoice>
</SalesInvoices>