SalesOrder

This component runs the Sales Order Entry (SOE) function and allows you to set up and maintain sales order header information which applies to all the lines on the order and sales order lines for entering individual transaction lines.

This component also provides various methods that allow you to progress sales orders through certain stages. If doing so, you must ensure that sales orders are at the correct stage in order to be processed. For example, you cannot invoice a sales order unless it is available for invoicing.

There are three ways to improve performance of sales order imports:

  • Restricting the payload - the payload definition for sales orders is composed of all data items that are used within Order Fulfilment. As your SunSystems installation may not use all available data items, you can reduce the time taken to process sales orders by ensuring that your payloads only include those data items that you wish to work with.

  • Reduce the number of processing options in SunSystems. If you are importing sales orders from an external application you can set up a particular sales type that does not carry out the various calculations, validations and lookups that would normally happen. For example, you might ensure that credit checking and inventory allocation do not occur at order entry. These can significantly increase the time taken to process an order entry. These can significantly increase the time taken to process a given Sales Order.
  • Ensure that any line numbers are in numerical order, as disordered line numbers will impact performance. If both the User Line Number (SalesOrder.Line.LineNumber) and the System Line Number (SalesOrder.Line.SalesOrderLineNumber) are provided, then the User Line Number is used.
Note: 
  • Where payload definition fields refer to static data, the data must already have been set up. For example, a supplier code must have been defined using the SunSystems Supplier function, or via the Supplier component.
  • Depending on how your sales type stages have been set up, some component methods will be not be relevant.
  • We do not support the import of Sales Orders using a 'Start of Document', 'Line' or 'End of Document' preset type. 'Start of Document' and 'Line' preset types can cause inconsistency in the line numbers. For example, when importing a new Sales Order using a 'Start of Document' preset type, the order is created with a preset line, then imported into a Sales Type that also creates a preset line.

    Creating new orders line using the 'End of Document' preset type will not work, because an empty line is required to insert the new lines information. However, the empty line is not present if this preset type has been used.

Methods

AcknowledgeLineOrder
Driver Type: SASI
Use this method to acknowledge one or more sales order lines. If no line numbers are specified in the payload, the entire order including all lines is acknowledged.
Allocate
Driver Type: SASI
Use this method to allocate a part quantity on a sales order line.
The quantity to be allocated is set in MiscellaneousInput2.
Note: 
  • Before you run the Allocate method, verify that there is sufficient stock to allocate. SSC does not report an error if there is insufficient stock, because SunSystems displays the insufficient stock message in the status bar, which is not detected by SSC.
  • For the Allocate method, it is recommended to use a separate sales order element for each sales order line in the input payload. That is, replicate the SalesOrderTransactionReference element for every individual line in an order, rather than adding all of the order lines within the one sales order element. This is because if an error occurs on one line, subsequent lines are not processed in that sales order element.
CreateOrAmend
Driver Type: SASI
Use this method to create or amend one or more sales orders. A sales order is created if it does not exist and amended if it does.
Note: 
  • Manual allocation is not supported by SSC. If the payload contains an Item that has an allocation type of Manual Allocation at Order Entry, no manual allocation takes place but the order is created.
  • If amending a sales order, SalesOrderTransactionReference must be provided. If SalesOrderTransactionReference is specified in the payload, but there is no existing order with this reference, then a new order is created. However, the new order may have a different transaction reference, depending on the Sales Transaction Type used, i.e. if the associated transaction reference format does not contain any items for a user to specify, then the sales order reference will be system generated, and the existing payload values not used.
CreateOrAmendAndGenerateInvoice
Driver Type: SASI
Use this method to create or amend a sales order and then to generate a sales invoice. If the sales order does not exist already it is created and the sales invoice is generated, otherwise it is amended and the sales invoice is generated.
Note: If amending a sales order, SalesOrderTransactionReference must be provided. If SalesOrderTransactionReference is specified in the payload, but there is no existing order with this reference, then a new order is created. However, the new order may have a different transaction reference, depending on the Sales Transaction Type used, i.e. if the associated transaction reference format does not contain any items for a user to specify, then the sales order reference will be system generated, and the existing payload values not used.
DeleteLineOrder
Driver Type: SASI
Use this method to delete one or more sales order lines. If no line numbers are specified in the payload, the entire order including all lines is deleted.
SalesOrderTransactionReference is mandatory. If the Line section is included in the payload, it must contain LineNumber or SalesOrderLineNumber. If both are provided, LineNumber is used.
DeleteLines
Driver Type: SASI
Use this method to delete specific lines from a sales order.
SalesOrderTransactionReference is mandatory, plus either LineNumber or SalesOrderLineNumber. If both are provided, LineNumber is used.
DeleteWholeOrder
Driver Type: SASI
Use this method to delete one sales order and all lines.
SalesOrderTransactionReference is mandatory.
GenerateInvoice
Driver Type: SASI
Use this method to generate a sales invoice from an existing sales order.
SalesOrderTransactionReference is mandatory.
HoldLineOrder
Driver Type: SASI
Use this method to hold one or more sales order lines. If no line numbers are specified in the payload, the entire order including all lines is held.
Query
Drivery Type: Export
Use this method to obtain sales order details or to extract sales order data from SunSystems.
ReleaseLineOrder
Driver Type: SASI
Use this method to release one or more sales order lines. If no line numbers are specified in the payload, the entire order including all lines is released.
SalesOrderTransactionReference is mandatory. If the Line section is included in the payload, it must contain LineNumber or SalesOrderLineNumber. If both are provided, LineNumber is used.
ReprocessWholeOrder
Driver Type: SASI
Use this method to reprocess the whole order specified in the input payload.
SalesOrderTransactionReference is mandatory.

Note on AbortOnZeroSubstitutionMessage

When creating or amending a sales order, if the payload element AbortOnZeroSubstitutionMessage is supplied with Y, and if the following zero substitution message is displayed:

"Value using formula SELLING_PRICE could not be calculated, as part of the information required by the formula is not available. A value of zero has been substituted",

the create or amend processing is aborted. If this element is set to anything other than Y, for example N, or no value, the create or amend processing continues. In this case, the zero substitution message is truncated in the Transfer Desk output, but is captured in full in the transfer log.

The element is defined in the payload as follows:

<?xml version="1.0" encoding="UTF-8"?>
<SSC>
<Payload>
   <SalesOrder>
					<FlagOptions>
         <AbortOnZeroSubstitutionMessage>Y</AbortOnZeroSubstitutionMessage>
      </FlagOptions>
   </SalesOrder>
</Payload>
</SSC>

Mandatory fields

General
As sales orders can be tailored to suit customer needs, there are no fields that are always mandatory. The minimum amount of data required for entering sales orders is small. However, you should bear in mind that the actual amount needed to create meaningful orders and to progress those orders is much larger. This is wholly dependent on how your system is configured.
As a guide you will probably find that the following need to be supplied:
  • Sales Definition Code - payload element: <SalesDefinitionCode>
  • Sales Order Transaction Reference - payload element: <SalesOrderTransactionReference>
  • Either:
    • User Line Number - payload element: <LineNumber>
    • Sales Order Line Number - payload element: <SalesOrderLineNumber>
  • Item Code - payload element: <ItemCode>
See individual methods for specific field requirements. SalesOrderLineNumber is never mandatory, but depending on the method, you will need either LineNumber or SalesOrderLineNumber.
Generating an Invoice
When generating an invoice, values for one or more of the following elements in the <GenerateInvoiceParams> group may need to be supplied:
  • Consolidation Group Name- payload element <ConsolidationGroupName>
  • Document Format Code - payload element <DocumentFormatCode>
  • Invoice Date - payload element <InvoiceDate>
  • Invoice Period - payload element <InvoicePeriod>
Note: At runtime the component validates the payload contents to ensure that the values supplied are correct. Various combinations of values may require other elements in the payload to be specified before the payload can be processed successfully.
Notes
Although the payload definition includes the <DemandQuantity> and <OriginalDemandQuantity> elements within the <Line> element, these must not be used when creating or amending the Sales Order Line quantity. Instead, you must provide it in the appropriate Value Label (<VLabnn>) element.
As Value Labels are user-configurable you should confirm that your values are specified in the correct <VLabnn> element before executing your payload. You can determine which element to use via the following steps:
  • Open Sales Type (STS) function in SunSystems.
  • Key the Sales Definition Code and press OK.
  • Click Value; a list of all value labels that exist for the Sales Definition Code is displayed.
  • Open Value Labels (VLB) function in SunSystems; choose the value label you are planning to use. The Value Label Identifier holds the value label number that you should use in your payload.
For example, in the SunSystems demonstration data, Value Label QUANTITY1 is assigned to Value Label 1. If you want to specify a Sales Order Line Quantity in your payload, then specify the quantity value in the <VSolVlabEntry_Val> subelement within <Vlab01>.

Related data

For each line:

  • Stage including Item Characteristic
  • Sales Order Standard Text
  • Sales Order Line Standard Text
  • Analysis Quantity 1-10
  • Value Labels 1-50.
Note: SunSystems is unable to export sales orders that have more than 33 value labels defined on them.