Skip to content

OrderFlow Advanced Concepts

OrderFlow Ltd.

Document Version: 4.2.4

Document Built: 2024-02-16

This document and its content is copyright of OrderFlow Ltd. All rights reserved.
You may not, except with our express written permission, distribute, publish or commercially exploit the content.
Any reproduction of part or all of the contents in any form is prohibited.

Allocation and Assignment

Allocation and Assignment

Order Line Entities

Stock Allocation

Stock allocation is the process of identifying whether there is stock present in the warehouse to fulfil the order lines in a shipment. It is performed on a line by line basis. Based on the priority of the outstanding shipments, and other criteria, OrderFlow determines, for each order line, whether there is sufficient stock in the warehouse to meet the order line's stock requirement.

In detail, OrderFlow is typically configured to perform stock allocation automatically on a schedule, although it is also possible to view the current allocation status and to trigger the allocation function from the user interface.

Allocation Process

Invocation of the allocation process results in the following operation sequence:

  1. For the specified channel, all products in order lines awaiting allocation are extracted from the database.
  2. For each product extracted:

    • 'Candidate' created or out of stock order lines for the product (that are in ready, out of stock or reset shipments) are extracted from the database, in the order defined by the "Order Line Allocation Sort Expression" application property.
    • Additionally, the quantities of stock (for the product) in allocatable locations is extracted. (These locations are ordered according to the "Assignment Location Sort Expression" application property.)
    • The 'allocation quantities', i.e. the quantities of all order lines in allocated, move pending, pickable or picked states (for the product) are also extracted.
    • If the total of the allocation quantities is equal to (or exceeds) the total quantities in allocatable locations, then all the candidate order lines for the product are marked out of stock immediately, and the allocation process ends for that product. (I.e. there is no spare stock for the product.)
    • If, on the other hand, there is more stock in allocatable locations than the stock already allocated (i.e. there is available stock), then each candidate order line is allocated its required quantity of the product in turn. The order line's state updated to allocated.

      • If an order line requires more stock than the remaining amount, then it and all subsequent lines are marked as out of stock. (This is to prevent a situation where a high-quantity line never gets allocated its stock, because it is always given to lower quantity lines.)
  3. Finally, the parent shipments of those order lines that have had allocation
    attempted will have their state updated, according to the following conditions:

    • Shipments that have at least one order line out of stock are marked as out of stock.
    • Shipments that are either in the ready or out of stock state, but whose order lines have progressed to a state at least as far down the process as the shipment 'allocated' state, will be marked as allocated. (This uses the 'progress indication' mechanism, which is expanded upon in the Progress Indication section below.)

Note that this means that allocation may be attempted for the same product across different channels. However, this does not cause a problem as the process will effectively be skipped for a product that has already undergone the allocation process.

The following diagram depicts an example allocation for product Prod_B:

Allocation Example

Note that no Order Line Location entries are created during the allocation process.

If there is sufficient stock for a shipment's order lines in the warehouse, then the states of the entities after allocation will typically be as shown below.

States Following Successful Allocation

Progress Indication

OrderFlow already has a flexible state transition model (for orders, shipments and order lines), using the State Definition and Operation Definition configurable entities. The scriptable nature of the target states in operation definitions allows the transitions between states to be carefully controlled, and to vary based on any aspect of the order / shipment / order lines involved.

However, sometimes workflows can become so complex that maintaining such scripts to define state transitions can become unwieldy. In some cases, certain states in the workflow may need to be skipped, depending upon the shipment context.

To provide an alternative, each State Definition entity can be assigned a Progress Indication value. This is a number between 0 and 100, which gives an indication of the position of the state in the workflow. The default progress indication values are shown in the following diagram:

Progress Indicators

Progress indication values are used during allocation and assignment to determine whether a shipment can be moved to the next state, based on the progress indication of the states of the shipment's order lines. For example, a shipment whose order lines are all in the allocated state can be progressed to the allocated state, as they both have the same progress indication value.

Additionally, if the "Progress Indication State Control" application property is set, the progress indication values are used to determine whether a parent entity's state should be transitioned, based on the progress indication values of all its children, for any state operation.

Stock Assignment

The allocation process assigns the correct states to order lines and shipments depending upon whether the required stock is present in the warehouse.

The stock assignment process goes one step further, and assigns stock from specific locations to allocated order lines. It is possible that an order line could be fulfilled by stock residing in multiple locations, so OrderFlow holds this association in a separate Order Line Location entity.

The assignment process is very similar to the allocation process, but it applies to order lines & shipments in different states, and it creates Order Line Location entities if successful.

  1. For the specified channel, all products in order lines awaiting assignment are extracted from the database.
  2. For each product extracted:

    • 'Candidate' allocated or move pending order lines for the product (that are in released or move pending shipments) are extracted from the database, again in the order defined by the "Order Line Allocation Sort Expression" application property.
    • Additionally, the quantities of stock (for the product) in pickable locations is extracted. (These locations are ordered according to the "Assignment Location Sort Expression" application property.)
    • The 'assigned quantities' i.e. the quantities of all order lines that have an existing Order Line Location record (for the product) are also extracted. (These will be in pickable locations.)
    • If the total of the assigned quantities is equal to (or exceeds) the total quantities in pickable locations, then all the candidate order lines for the product are marked as move pending (if they are not already in this state), and the assignment process ends for that product.
    • If, on the other hand, there is more stock in pickable locations than the stock already assigned (i.e. there is available pickable stock), then each candidate order line is assigned its required quantity of the product from one or more of the pickable locations in turn.
      The order line's state is updated to pickable.

      • If an order line requires more stock than the remaining amount available in pickable locations, then it and all subsequent lines are marked as move pending. (This is to prevent a situation where a high-quantity line never gets assigned its stock, because it is always given to lower quantity lines.)
  3. Finally, the parent shipments of those order lines that have had allocation
    attempted will have their state updated, according to the following conditions:

    • Shipments that have at least one order line in a 'move pending' state are marked as move pending.
    • Shipments that are either in the released or move pending state, but whose order lines have progressed to a state at least as far down the process as the shipment 'pickable' state, will be marked as assigned. This will progress the shipment to its pre-pick state, which is affected by several factors, including its courier state, the result of any configured 'can pick' script, and whether it is a consolidating shipment. If there is no reason not to, the shipment will be progressed to the pickable state.

Note

If the product is configured to have the 'primary only' picking strategy then just the primary picking location is used to assign stock from.

The following diagram depicts an example assignment for product Prod_B. Note that this is not intended to follow on from the allocation example, as in this case there are is additional stock in non-pickable locations, and the 7 candidate lines are all allocated:

Assignment Example

If there is sufficient stock for a shipment's order lines in pickable locations (and there are no reasons for the shipment to enter another pre-pick state),
then the states of the entities after assignment will typically be as shown below.

States Following Successful Assignment