Order States
Creating
During creation of an order (the order already exists, but not all lines are created yet), the order is in state creating
. This is the only state in which the order or its order lines can be edited. Ususally, an order only spends a short time in this state. Often you wouldn’t even see it, as this state is part of a creation transaction or code in the host driver.
New
After an order has been created, either through the host connector, or through the client, it gets the state new
. In this state, the order cannot be changed anymore and is ready to be started. As long as the order has this state, it can be safely cancelled or removed, as no stock has been assigned to it yet.
Available
When an order is started (using the wms_order_start
database function, probably called from the order scheduler), it will assign stock to its lines and set the state to available
, which in this case means “available for order picking”. An order that is in state available
can be grabbed to become busy
.
Grabbing usually happens in the PocketApp.
Busy
This state means the order is being processed by an order picker. A user is connected to the order (the orderuserid
is filled in). In this state, you are allowed to call wms_orderline_finish
on its lines. Orders in busy
can be released to return to available
, or blocked to go to blocked
.
Blocked
An order that is blocked
will be left alone by the system. You cannot grab it, or do anything else with it, except unblock it.
Expedition
Outbound orders have an extra state that others to not have: expedition
. This means the order has been picked and waiting on an expedition location to be processed further. This way we can keep any carriers connected to the order, until it is shipped.
Done
This means the order is completely done and fully processed by Sapphire. At this point it safe to send any results to the host.
Finished
When finished
, the order can be archived or removed. it is completely picked, and also has been sent to the host.
Cancelled
Any order in any state can be cancelled at any time, and this will always succeed. After cancellation, stock and cariers have been released and the order get the state cancelled
.