Skip to content

Sage 200 Evolution Sales Order XML

The Sage 200 Evolution Sales Order XML format is used to create new sales orders in Sage 200 Evolution, and optionally progress the order through to an invoice.

Tasks

Minimal Sales Order XML

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

<?xml version="1.0" encoding="utf-8"?>
<SalesOrders>
  <SalesOrder>
    <Customer>
      <Code>ZYN001</Code>
    </Customer>
    <OrderItems>
      <OrderItem>
        <InventoryItem>
          <Code>PROD001</Code>
        </InventoryItem>
        <Quantity>1</Quantity>
      </OrderItem>
    </OrderItems>
  </SalesOrder>
</SalesOrders>

Header Information

The following info can be specified at the order header level in Sage.

The customer to import the sales order against can either be specified by Code, or can be looked up via ExternalId in the Truth Database if the customer was imported into Sage via Zynk.

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.

If not specified in the XML, the delivery and postal addresses will be picked up from the customer account.

Sage Field XML Field  Example  Field Type  Input 
N/A ExternalId 123 String Optional
Branch Branch/Code UK String Optional
Customer Customer/ExternalId 12345 String Dependant
Customer Customer/Code ZYN001 String Dependant
N/A TaxMode* Exclusive Enum Optional
External Order ExternalOrderNo 12345 String Optional
Order Date OrderDate 2021-11-24 DateTime Optional
Due Date DueDate 2021-11-24 DateTime Optional
Order Status OrderStatus/Code Pending String Optional
Priority OrderPriority/Description Normal String Optional
Invoice Number InvoiceNumber INV12345 String Optional
Invoice Date InvoiceDate 2021-11-24 DateTime Optional
Project Project/Code PROJ001 String Optional
Representative Representative/Code JOHN String Optional
Settlement Terms SettlementTerms/Code NET30 String Optional
Delivery Note DeliveryNote DEL12345 String Optional
Delivery Date DeliveryDate 2021-11-24 DateTime Optional
Delivery Method DeliveryMethod/Description FedEx String Optional
Exchange Rate ExchangeRate 1.0000 Double Optional
Delivery Address > Line 1 DeliverTo/Line1 i6 String Optional
Delivery Address > Line 2 DeliverTo/Line2 6-8 Charlotte Square String Optional
Delivery Address > Line 3 DeliverTo/Line3 Newcastle-upon-Type String Optional
Delivery Address > Line 4 DeliverTo/Line4 Tyne & Wear String Optional
Delivery Address > Line 5 DeliverTo/Line5 UK String Optional
Delivery Address > Code DeliverTo/PostalCode NE1 4XF String Optional
Postal Address > Line 1 InvoiceTo/Line1 i6 String Optional
Postal Address > Line 2 InvoiceTo/Line2 6-8 Charlotte Square String Optional
Postal Address > Line 3 InvoiceTo/Line3 Newcastle-upon-Type String Optional
Postal Address > Line 4 InvoiceTo/Line4 Tyne & Wear String Optional
Postal Address > Line 5 InvoiceTo/Line5 UK String Optional
Postal Address > Code InvoiceTo/PostalCode NE1 4XF String Optional
Description Description Sales Order String Optional
Discount % DiscountPercent 5.00 Double Optional
Messages > Line 1 MessageLine1 Message 1 String Optional
Messages > Line 2 MessageLine1 Message 2 String Optional
Messages > Line 3 MessageLine1 Message 3 String Optional

*TaxMode - Enum Values: Exclusive, Inclusive

<?xml version="1.0" encoding="utf-8"?>
<SalesOrders>
  <SalesOrder>
    <ExternalId>123</ExternalId>
    <Branch>
      <Code>UK</Code>
    </Branch>
    <Customer>
      <ExternalId>12345</ExternalId>
      <Code>ZYN001</Code>
    </Customer>
    <TaxMode>Exclusive</TaxMode>
    <ExternalOrderNo>12345</ExternalOrderNo>
    <OrderDate>2021-11-24</OrderDate>
    <DueDate>2021-11-24</DueDate>
    <OrderStatus>
      <Code>Pending</Code>
    </OrderStatus>
    <OrderPriority>
      <Code>Normal</Code>
    </OrderPriority>
    <InvoiceNumber>INV12345</InvoiceNumber>
    <InvoiceDate>2021-11-24</InvoiceDate>
    <Project>
      <Code>PROJ001</Code>
    </Project>
    <Representative>
      <Code>JOHN</Code>
    </Representative>
    <SettlementTerms>
      <Code>NET30</Code>
    </SettlementTerms>
    <DeliveryNote>DEL12345</DeliveryNote>
    <DeliveryDate>2021-11-24</DeliveryDate>
    <DeliveryMethod>
      <Description>FedEx</Description>
    </DeliveryMethod>
    <ExchangeRate>1.0000</ExchangeRate>
    <DeliverTo>
      <Line1>i6</Line1>
      <Line2>6-8 Charlotte Square</Line2>
      <Line3>Newcastle-upon-Tyne</Line3>
      <Line4>Tyne &amp; Wear</Line4>
      <Line5>UK</Line5>
      <PostalCode>NE1 4XF</PostalCode>
    </DeliverTo>
    <InvoiceTo>
      <Line1>i6</Line1>
      <Line2>6-8 Charlotte Square</Line2>
      <Line3>Newcastle-upon-Tyne</Line3>
      <Line4>Tyne &amp; Wear</Line4>
      <Line5>UK</Line5>
      <PostalCode>NE1 4XF</PostalCode>
    </InvoiceTo>
    <Description>Sales Order</Description>
    <DiscountPercent>5.00</DiscountPercent>
    <MessageLine1>Message 1</MessageLine1>
    <MessageLine2>Message 2</MessageLine2>
    <MessageLine3>Message 3</MessageLine3>
  </SalesOrder>
</SalesOrders>

Line Information

We support importing 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.

Sage Field XML Field  Example  Field Type  Input 
Item InventoryItem/Code PROD001 String Dependant
Item GlAccount/Code 4000 String Dependant
Branch Branch/Code UK String Optional
Description Description Test Product String Optional
Warehouse Warehouse/Code NEWCASTLE String Optional
Quantity Quantity 1 Double Optional
UOM Unit/Code Each String Optional
Price UnitSellingPrice 10.00 String Optional
Tax Type TaxType/Code EXEMPT String Optional
Lot Lot/Code LOT String Optional
Disc % DiscountPercent 20.00 Double Optional
Disc % Discount 2.00 Double Optional
Message Note Leave by the door String Optional
<?xml version="1.0" encoding="utf-8"?>
<SalesOrders>
  <SalesOrder>
    <OrderItems>
      <OrderItem>
        <!-- ST line -->
        <InventoryItem>
          <Code>PROD001</Code>
        </InventoryItem>
        <Branch>
          <Code>UK</Code>
        </Branch>
        <Description>Test Product</Description>
        <Warehouse>
          <Code>NEWCASTLE</Code>
        </Warehouse>
        <Quantity>1</Quantity>
        <Unit>
          <Code>Each</Code>
        </Unit>
        <UnitSellingPrice>10.00</UnitSellingPrice>
        <TaxType>
          <Code>EXEMPT</Code>
        </TaxType>
        <Lot>
          <Code>LOT</Code>
        </Lot>
        <DiscountPercent>20.00</DiscountPercent>
        <Discount>2.00</Discount>
        <Note>Leave by the door</Note>
      </OrderItem>
      <OrderItem>
        <!-- GL line -->
        <GlAccount>
          <Code>2340>009</Code>
        </GlAccount>
        <Branch>
          <Code>UK</Code>
        </Branch>
        <Description>Test Product</Description>
        <Quantity>1</Quantity>
        <Unit>
          <Code>Each</Code>
        </Unit>
        <UnitSellingPrice>10.00</UnitSellingPrice>
        <TaxType>
          <Code>EXEMPT</Code>
        </TaxType>
        <Lot>
          <Code>LOT</Code>
        </Lot>
        <DiscountPercent>20.00</DiscountPercent>
        <Discount>2.00</Discount>
        <Note>Leave by the door</Note>
      </OrderItem>
    </OrderItems>
  </SalesOrder>
</SalesOrders>

Processing the Order

We support automatically completing the sales order by setting <AutoCompleteOrder> to true. This will process all lines on the order, generating an invoice for them, and will archive the sales order.

You can also process specific quantities for each line by specifying the <ToProcess> quantity at the line level. This will generate a partial invoice for the sales order. The <ToProcess> quantities will be overridden if <AutoCompleteOrder> is true.

Sage Field XML Field  Example  Field Type  Input 
N/A AutoCompleteOrder true Boolean Optional
N/A OrderItem/ToProcess 1 Double Optional
<?xml version="1.0" encoding="utf-8"?>
<SalesOrders>
  <SalesOrder>
    <AutoCompleteOrder>true</AutoCompleteOrder>
    <OrderItems>
      <OrderItem>
        <ToProcess>1</ToProcess>
      </OrderItem>
    </OrderItems>
  </SalesOrder>
</SalesOrders>