Other ERPsFree generatorPDF, Excel, Word exportSYSPROAll SYSPRO tools

SYSPRO SORTOI Sales Order Import XML Generator

This generator produces the two XML strings SYSPRO's SORTOI business object (Sales Order Import) needs, the parameters and the document, plus a C# program that logs on and posts them with e.net Transaction.Post. It targets SYSPRO 7 and SYSPRO 8.

Fill in

A = add, C = change, D = cancel

Validate checks only; Import validates and imports if there are no errors

Only applies when AlwaysUsePriceEntered is Y

N = warnings returned as errors, Y = ignore warnings, W = return them as warnings

Generated code
Download:

Parameters XML (xmlParameters)

<?xml version="1.0" encoding="Windows-1252"?>
<SalesOrders xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="SORTOI.XSD">
  <Parameters>
    <Process>Validate</Process>
    <WarehouseListToUse>FG</WarehouseListToUse>
    <AcceptEarlierShipDate>N</AcceptEarlierShipDate>
    <AlwaysUsePriceEntered>N</AlwaysUsePriceEntered>
    <AllowZeroPrice>N</AllowZeroPrice>
    <IgnoreWarnings>N</IgnoreWarnings>
  </Parameters>
</SalesOrders>

Document XML (xmlIn)

<?xml version="1.0" encoding="Windows-1252"?>
<SalesOrders xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="SORTOIDOC.XSD">
  <Orders>
    <OrderHeader>
      <CustomerPoNumber>PO-55120</CustomerPoNumber>
      <OrderActionType>A</OrderActionType>
      <Customer>0000001</Customer>
      <OrderDate>2026-10-22</OrderDate>
      <Warehouse>FG</Warehouse>
      <RequestedShipDate>2026-10-29</RequestedShipDate>
    </OrderHeader>
    <OrderDetails>
      <StockLine>
        <CustomerPoLine>1</CustomerPoLine>
        <LineActionType>A</LineActionType>
        <StockCode>A100</StockCode>
        <Warehouse>FG</Warehouse>
        <OrderQty>10</OrderQty>
        <Price>[Price (blank = SYSPRO pricing)]</Price>
      </StockLine>
    </OrderDetails>
  </Orders>
</SalesOrders>

C# e.net call (Interop.Encore)

using System;
using System.IO;

class PostSortoi
{
    static void Main()
    {
        Encore.Utilities util = new Encore.Utilities();
        Encore.Transaction trn = new Encore.Transaction();

        // Operator, OperatorPassword, CompanyId, CompanyPassword, Language, LogLevel, EncoreInstance, XmlIn
        string guid = util.Logon("ADMIN", "", "EDU1", "", Encore.Language.ENGLISH, 0, 0, "");
        try
        {
            string xmlParameters = File.ReadAllText(@"C:\SYSPRO\SORTOI_params.xml");
            string xmlIn = File.ReadAllText(@"C:\SYSPRO\SORTOI_doc.xml");
            string xmlOut = trn.Post(guid, "SORTOI", xmlParameters, xmlIn);
            Console.WriteLine(xmlOut);
        }
        finally
        {
            util.Logoff(guid);
        }
    }
}

Element names and their order follow SORTOI.XSD and SORTOIDOC.XSD in the SYSPRO Business Object Library; the XSD sequence is strict, so keep the order shown when you add elements. Verify against the schemas shipped with your SYSPRO 7 or 8 release. The C# uses the e.net COM interop (Encore) classes; confirm the Logon parameters and licensing for business objects in your e.net documentation. If you leave Price blank, remove the empty Price element rather than sending it, so SYSPRO prices the line. Run with Process Validate first, then switch to Import.

Building a SYSPRO order feed?

Send us a sample order and your SYSPRO release and we will check the SORTOI XML, parameters and error handling.

Optional. The tool and every export work without this. No spam.

Was this tool useful?

How to use it

Enter a customer, customer PO number, dates, warehouse, stock code and quantity that exist in your company. Leave Price empty (and drop the empty Price element) to let SYSPRO price the line from the customer's price code, or enter a price and set AlwaysUsePriceEntered to Y. Keep Process on Validate for the first run: SORTOI checks everything and returns errors in the output XML without creating the order. When the output is clean, switch Process to Import and post again. Save the two XML blocks to files or pass them as strings from your integration.

Where this lives in SYSPRO

SORTOI is a transaction (post) business object in the Sales Orders area, called through e.net Solutions with Transaction.Post. The schema files SORTOI.XSD and SORTOIDOC.XSD, with sample SORTOI.XML and SORTOIDOC.XML, are documented in the SYSPRO Business Object Library and are typically installed in the Base\Schemas folder on the application server. Orders created this way appear in Sales Order Entry like any other order, with the customer PO number you passed. The output XML returns the SYSPRO sales order number and any warnings per line.

  • Logon returns a session GUID; always Logoff in a finally block
  • Business object calls consume e.net licences
  • Use CustomerPoNumber with OrderActionType C or D to change or cancel

Parameters you will actually change

Process takes Validate or Import; Validate is the schema default. WarehouseListToUse limits which warehouses lines can use. AcceptEarlierShipDate decides whether a requested ship date earlier than SYSPRO would calculate is accepted. AlwaysUsePriceEntered and AllowZeroPrice control pricing (AllowZeroPrice only applies when AlwaysUsePriceEntered is Y), and setting AllowZeroPrice to Y without a reason invites free-goods mistakes. IgnoreWarnings N returns warnings as errors, W returns them as warnings, and Y lets orders through with warnings such as credit or stock messages, which suits trusted EDI feeds but hides problems on manual feeds. The XSD defines many more, such as AllowDuplicateOrderNumbers, ReserveStock and IncludeDimensionAnalysis; add them in schema order.

Gotchas

The parameter and document schemas are sequences, so an element out of order fails validation even when the name is right. Dates use CCYY-MM-DD. Customer and stock codes must match SYSPRO exactly, including leading zeros. OrderActionType applies to the whole order and LineActionType to each line; changing an order needs the original CustomerPoNumber. Leaving Logon sessions open exhausts e.net licences, so always call Logoff. Test against a copy company before pointing an EDI or web feed at production.

Frequently Asked Questions

What is SORTOI in SYSPRO?

SORTOI is the SYSPRO business object for Sales Order Import. It creates, changes or cancels sales orders from XML: a parameters document controls behaviour such as validation and pricing, and the document XML holds order headers and lines. It is called through e.net Solutions with Transaction.Post.

Does SYSPRO have an API?

SYSPRO's integration layer is e.net Solutions: business objects such as SORTOI are called through Logon, Query, Setup and Transaction methods, from COM or .NET, and through web services in newer releases. Business objects are documented in the SYSPRO Business Object Library with their XML schemas and samples.

How do I validate a SORTOI import without creating the order?

Set Process to Validate in the parameters XML. SORTOI validates the order and returns any errors and warnings in the output XML but does not import it. When the output is clean, change Process to Import, which validates again and imports only if there are no errors.

What integration options does SYSPRO offer?

Common options are e.net business objects called from your own code, SYSPRO's import programs for file-based loads, and integration or EDI tools built on top of e.net. For real-time order creation from a web shop or EDI translator, calling SORTOI through e.net is the standard route.

If you want staff to ask SYSPRO about orders, stock and customers in plain English on your own servers, with any SORTOI writes kept behind an approval step, we can set that up.

ArchRay builder
Design the on-prem AI stack for SYSPRO: model, GPUs, RAG pipeline, guardrails
See memory, speed and cost as you swap parts, then export the diagram. Free, in your browser.
Open the builder

Keep exploring

Free tools

ERP fixes and how-tos

AI on your ERP

Integrations

Software