MovementOrder

This component allows you set up and maintain movement orders and runs the Movement Order Entry (MOE) function.

This component also provides various methods that allow you to progress movement orders through certain stages. If doing so, you must ensure that movement orders are at the correct stage in order to be processed.

Depending on how your movement type stages have been set up, some component methods will be not be relevant.

Note: You must define movement types for your business unit before you can enter movement transactions.

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

  • Restricting the payload - the payload definition for movement orders is composed of all data items that are used within order fulfillment. As your SunSystems installation may not use all available data items, you can reduce the time taken to process movement 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 movement orders from an external application you can set up a particular Movement type that does not carry out the various calculations, validations and lookups that would normally happen. These can significantly increase the time taken to process a given Movement Order.
  • Ensure that any line numbers are in numerical order, as disordered line numbers will impact performance. If both the User Line Number (MovementOrder.MovementOrderLine.UserLineNumber) and the System Line Number (MovementOrder.MovementOrderLine.LineNumber) are provided, then User Line Number is used.

You should of course ensure that any data you do import is correct.

Note: We do not support the import of Movement 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 Movement Order using a 'Start of Document' preset type, the order is created with a preset line, then imported into a Movement 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

ConfirmLineOrder
Driver Type: SASI
Use this method to confirm one or more movement order lines. If no line numbers are specified in the payload, the entire order, including all lines, is confirmed.
MovementOrderReference is mandatory. If the MovementOrderLine section is included in the payload, it must contain UserLineNumber or LineNumber. If both are provided, UserLineNumber is used.
CreateOrAmend
Driver Type: SASI
Use this method to create or amend one or more movement orders. A movement order is created if it does not exist and amended if it does.
Note: If amending a movement order, MovementOrderReference must be provided. If MovementOrderReference 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 Movement Type used, i.e. if the associated transaction reference format does not contain any items for a user to specify, then the movement order reference will be system generated, and the existing payload values are not used.
CreateorAmendandConfirm
Driver Type: SASI
Use this method to create or amend a movement order and then to confirm it. If the movement order does not exist already it is created and then confirmed, otherwise it is amended and then confirmed.
Note: If amending a movement order, MovementOrderReference must be provided. If MovementOrderReference 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 Movement Type used, i.e. if the associated transaction reference format does not contain any items for a user to specify, then the movement order reference will be system generated, and the existing payload values are not used.
CreateOrAmendWithSerialNumbers
Driver Type: SASI
Use this method to create or amend a movement order with serial numbers or amend an existing movement order. SSC supports serial number for both Issues and Receipts but the serial number data has separate payload sections for each.
Specific to Receipts: When generating the receipt note from the movement order line, it selects all lines to process, creates all lines and uses the quantities entered on the movement order lines to get the serial numbers to be generated. Split lines/quantities are not supported for this method.
Masking is not supported in SSC, so you must ensure that the correct serial number format is entered in the payload, and that the corresponding serial number is valid. It is not possible to use a format consisting of part constant and part user input serial numbers. The supported formats are as follows:
  • System generated serial numbers - Serial Number format contains a constant value and a number stream. The serial numbers are automatically generated, but an empty tag must be provided in the payload.
  • User entered serial numbers - Serial Number format is defined as user input only. No constant values or number streams are in use. The serial numbers must be provided in the payload. One serial number per quantity is required, for example, a line with quantity 3 requires three serial numbers.
The serial numbers must be in a specific format for the input payload. The serial numbers follow the line details with one SerialNumbersForLine tag for each line; these must be supplied in the same order as the lines. See the example payload using CreateOrAmendWithSerialNumbers.
Note: Serial numbers can only be added when the receipt note is created. For example, any serial number processing in the amendment of a movement order will fail with the message Nothing generated, if the receipt note has already been created.

Specific to Issues: The serial numbers for an item are added immediately after a line is entered. The serial numbers for Issues should be entered within the line level <IssueSerialNumbers> section of the payload. The number of serial numbers must match the quantity of items for the line. The order is not important but each serial number specified must be a valid serial number for the item code and it must be available for allocation. See the example payload using CreateOrAmendWithSerialNumbers.

Note: This applies to both Receipts and Issues. Serial number entry is only supported when creating a Movement Order. If amending a movement order, MovementOrderReference must be provided. If MovementOrderReference 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 Movement Type used, i.e. if the associated transaction reference format does not contain any items for a user to specify, then the movement order reference will be system generated, and the existing payload values are not used. This method does not support ‘round tripping’ or internal/external transfer since the serial numbers are not exported.
DeleteLineOrder
Driver Type: SASI
Use this method to delete one or more movement order lines. If no line numbers are specified in the payload, the entire order including all lines is deleted.
MovementOrderReference is mandatory. If the MovementOrderLine section is included in the payload, it must contain UserLineNumber or LineNumber. If both are provided, UserLineNumber is used.
DeleteLines
Driver Type: SASI
Use this method to delete specific lines from a movement order.
MovementOrderReference is mandatory and either UserLineNumber or LineNumber must be specified. If both are provided, UserLineNumber is used.
DeleteWholeOrder
Driver Type: SASI
Use this method to delete a movement order and all lines.
MovementOrderReference is mandatory.
HoldLineOrder
Driver Type: SASI
Use this method to hold one or more movement order lines. If no line numbers are specified in the payload, the entire order including all lines is held.
MovementOrderReference is mandatory. If the MovementOrderLine section is included in the payload, it must contain UserLineNumber or LineNumber. If both are provided, UserLineNumber is used.
Query
Driver Type: Export
Use this method to obtain movement order details or to extract movement order data from SunSystems.
ReleaseLineOrder
Driver Type: SASI
Use this method to release one or more movement order lines. If no line numbers are specified in the payload, the entire order including all lines is released.
MovementOrderReference is mandatory. If the MovementOrderLine section is included in the payload, it must contain UserLineNumber or LineNumber. If both are provided, UserLineNumber is used.

Mandatory fields

As movement orders can be tailored to suit customer needs, there are no fields that are always mandatory. The minimum amount of data required for entering movement orders is very 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:

General
  • Movement Order Definition Code - payload element <MovementOrderDefinitionCode>
  • Movement Order Reference - payload element <MovementOrderReference>
  • Either User Line Number - payload element <UserLineNumber> or Line Number - payload element <LineNumber>.

See individual methods for specific field requirements.

Standard text
  • When creating or attaching standard text associated with a Movement Order, values for the following must be supplied:
    • Standard Text Class Code - payload element <StdTextMo_StdTextClassCode>
    • Standard Text Code - payload element <StdTextMo_StdTextCode>.
  • When creating or attaching standard text associated with a Movement Order Line, values for the following must be supplied:
    • Standard Text Class Code - payload element <StdTextMo1_StdTextClassCode>
    • Standard Text Code - payload element <StdTextMo1_StdTextCode>
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.

Related data

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

Example Payload using CreateOrAmendWithSerialNumbers

Receipt

For an example payload, two items codes are used - ITMAUTO, with automated serial numbers, and ITMUSER, with user generated serial numbers. A payload for a three line movement order is given below:

<MovementOrder>
...
   <MovementOrderLine>
      <DemandQuantity>2</DemandQuantity>
      <ItemCode>ITMAUTO</ItemCode>
      <LineNumber>1</LineNumber>
      ...
   </MovementOrderLine>
   <MovementOrderLine>
      <DemandQuantity>4</DemandQuantity>
      <ItemCode>ITMAUTO</ItemCode>
      <LineNumber>2</LineNumber>
      ...
   </MovementOrderLine>
   <MovementOrderLine>
      <DemandQuantity>3</DemandQuantity>
      <ItemCode>ITMUSER</ItemCode>
      <LineNumber>3</LineNumber>
      ...
   </MovementOrderLine>
   <SerialNumbersForLine>
      <SerialNumbers></SerialNumbers>
   </SerialNumbersForLine>
   <SerialNumbersForLine>
      <SerialNumbers>
         <SerialNumber>USERENTERED1</SerialNumber>
      </SerialNumbers>
      <SerialNumbers>
         <SerialNumber>USERENTERED2</SerialNumber>
      </SerialNumbers>
      <SerialNumbers>
         <SerialNumber>USERENTERED3</SerialNumber>
      </SerialNumbers>
   </SerialNumbersForLine>
</MovementOrder>

Issue

The example payload here uses the same two items codes as the Receipts example - ITMAUTO, with automated serial numbers, and ITMUSER, with user generated serial numbers. However, for Issues the serial number format used does not make any difference – the requirement is for the correct number of valid serial numbers for the item code. The example below assumes that Value Label 1 is used for Quantity (i.e. 3 of ITMAUTO and 2 of ITMUSER):

<MovementOrder>
...
   <MovementOrderLine>
      <ItemCode>ITMAUTO</ItemCode>
      <LineNumber>1</LineNumber>
      ...
      <VLAB1>
         <Base>
            <VMolVlabEntry_Val>3.00000</VMolVlabEntry_Val>        
         </Base>
      </VLAB1>
      <IssueSerialNumbers>
         <IssueSerialNumber>
            <SerialNumber>A000004</SerialNumber>
         </IssueSerialNumber>
         <IssueSerialNumber>
            <SerialNumber>A000123</SerialNumber>
         </IssueSerialNumber>
         <IssueSerialNumber>
            <SerialNumber>A000041</SerialNumber>
         </IssueSerialNumber>
      </IssueSerialNumbers>
   </MovementOrderLine>
   <MovementOrderLine>
      <ItemCode>ITMUSER</ItemCode>
      <LineNumber>2</LineNumber>
      ...
      <VLAB1>
         <Base>
            <VMolVlabEntry_Val>2.00000</VMolVlabEntry_Val>
         </Base>
      </VLAB1>
      <IssueSerialNumbers>
         <IssueSerialNumber>
            <SerialNumber>USERENTERED5</SerialNumber>
         </IssueSerialNumber>
         <IssueSerialNumber>
            <SerialNumber>USERENTERED4</SerialNumber>
         </IssueSerialNumber>
      </IssueSerialNumbers>
   </MovementOrderLine>
</MovementOrder>