Scheduling Order Command CSV

The Scheduling Order Command import file causes state changes for existing orders that have been scheduled. Scheduling Orders are generated from a source Work or Supply Order as part of the scheduling process, which leaves these newly-generated orders in an unreleased state.

It is possible that after generation, there is an issue in the scheduling process, leaving the order in an unscheduled state. For example, should the order have an End Request Date very far out in the future, it would be left in an unscheduled state, rather than unreleased.

These are available states for an order:

State
Description

Unreleased

The default state for a Scheduling Order after being created and scheduled successfully

Locked

The order has been locked but not yet released

Released

The order has been locked and released, and is available for transaction

In Progress

The order has been released and has been transacted at least once

On Hold

This value is more an additional descriptor than an actual state, and can be applied to orders that are Unreleased, Locked, Released or In Progress

Closed

The close state indicates the order is excluded from all scheduling and transaction operations

Unscheduled, Error

An issue in the scheduled process can leave an order in these states

This command file is designed to change the state of an order. Note that not all state changes are available.

File Format

The file format contains three required fields, as indicated by the

Column Name
Type
Values

OrderNumber

text(50)

The identifier of the Scheduling Order

Location

text(32)

The location of the Scheduling Order

Command

text(11)

A text command, see below

EntryDate

datetime

Optional date/time value in the timezone for the location; if not provided, the instance timezone for the location will be used

The following string values are the available commands:

  • lock

  • unlock

  • release

  • unrelease

  • hold

  • unhold

  • close

  • reopen

When the command is applied the EntryDate field is first consulted. If no value is provided, then the current date/time value at the location's timezone is used.

Allowed State Transitions

Since not every command is available for every state, errors can be generated. The general rule is an error will be generated:

  • For invalid OrderNumber / Location

  • Invalid command strings

  • Any valid command was unable to execute the request

Note that commands to change a state to an order already in that state won't generate error messages. For example, an order that is already Locked given a "lock" command will not generate a message, neither will a Released order given a "reopen" command.

This table documents allowable actions for the various states of an order. A response message of None indicates success.

Current State
Command
Response Message

Unreleased

lock, unlock, release, unrelease, hold, unhold, close, reopen

None

Locked

lock, unlock, release, unrelease, hold, unhold, close, reopen

None

Released

lock, unlock, release, unrelease, hold, unhold, close, reopen

None

In Progress

lock, unlock, release, unrelease, hold, unhold, close, reopen

None

On Hold

lock, unlock, release, unrelease, hold, unhold, close, reopen

None

Closed

reopen, close

None

Closed

lock, unlock, release, unrelease, hold, unhold

Error

Unscheduled / Error

all commands will error except close, which is allowed

Error

An all cases, an response message of Error is returned for non-existent OrderNumber / Location or for invalid Command strings.

Usage

The import CSV file allows multiple commands for the same OrderNumber / Location. The commands are parsed in order, and errors are reported should subsequent steps no longer be available.

For example, a single command import file could contain these 5 commands for the same unlocked, unreleased order:

  1. lock

  2. lock

  3. hold

  4. close

  5. release

The first command locks. The second is a duplicate, and since it is valid, does not report an error. The hold command puts the order on hold, and the close command then closes the order.

The last command in this single file, however, attempts to release a closed order, which isn't allowed. The import of this file would therefore leave the order successfully closed, and report an error that releasing is not possible.

Last updated