Skip to content

Sage 200 Print Invoices XML

The Print Invoices task allows you to print invoices for existing sales orders and sales returns in Sage 200.

Tasks

Matching Sales Orders/Sales Returns

The following information is used to identify which order or return to print an invoice for. You must provide one of the following key fields to identify the document to update: UniqueId, SalesOrderNumber, Id or CustomerOrderNumber.

XML Field Sage Field Example Field Type Field Length Input Notes
UniqueId SOPOrderReturnID 236991 int - Dependant The Sage 200 Sales Order/Return database id (not visible in Sage UI).
SalesOrderNumber Order no/Return no 0000000024 string 20 Dependant The Sage 200 document number.
Id - 123 string 4000 Dependant The Zynk Id of the Sage 200 document; assumes that the document was imported in the same Workflow that the Print Invoices task is running from.
CustomerOrderNumber Customer order no 196 string 30 Dependant The Sage 200 customer order number; if more than one document exists with the same customer order no, the first match will be processed.
SalesOrderType Type SopInvoice enum - Optional The Sage 200 Sales Order type. Defaults to SopInvoice if not specified. Valid values:
SopInvoice - Sales Order
SopReturn - Sales Return
<?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">
  <SalesOrders>
    <!-- Matching Sales Order by UniqueId -->
    <SalesOrder>
      <UniqueId>236991</UniqueId>
      <SalesOrderType>SopInvoice</SalesOrderType>
    </SalesOrder>

    <!-- Matching Sales Order by SalesOrderNumber -->
    <SalesOrder>
      <SalesOrderNumber>0000000024</SalesOrderNumber>
      <SalesOrderType>SopInvoice</SalesOrderType>
    </SalesOrder>

    <!-- Matching Sales Order by Id -->
    <SalesOrder>
      <Id>123</Id>
      <SalesOrderType>SopInvoice</SalesOrderType>
    </SalesOrder>

    <!-- Matching Sales Return by CustomerOrderNumber -->
    <SalesOrder>
      <CustomerOrderNumber>196</CustomerOrderNumber>
      <SalesOrderType>SopReturn</SalesOrderType>
    </SalesOrder>
  </SalesOrders>
</Company>

The following information can be specified in the 'Print Details' section of the print invoices screen in Sage.

XML Field Sage Field Example Field Type Field Length Input Notes
InvoiceDate Invoice date 2024-01-04 DateTime - Optional Defaults to today's date if not specified.
<?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">
  <SalesOrders>
    <SalesOrder>
      <InvoiceDate>2024-01-04</InvoiceDate>
    </SalesOrder>
  </SalesOrders>
</Company>