Out of Stock Order Splitter
Automatically review selected Linnworks orders, split out-of-stock items into separate orders where required, and assign an out-of-stock identifier for easier review.
Orders containing both available and unavailable items can slow down fulfilment if they need to be reviewed manually. The Out of Stock Order Splitter macro helps automate this process by checking selected Linnworks orders, identifying items that cannot be fully fulfilled from the order location, and splitting those items into a separate order where applicable.
This macro reviews each selected order, checks stock availability at the order fulfilment location, separates available and out-of-stock quantities, and uses Linnworks order splitting to create a new order for the out-of-stock items. It also assigns the OUT OF STOCK! identifier to orders that require review and adds internal order notes to explain the split.
With this automated approach, your team can keep fulfilment moving for available items while clearly identifying orders or split orders that contain out-of-stock items.
Keep order fulfilment moving by automatically separating out-of-stock items and marking them for review.
Configure the Macro
Once the app is installed, you need to create a macro configuration so the system knows which macro to run when the rule is triggered.
This setup can be adjusted anytime based on your operational requirements.
Steps to Configure
Go to Apps > Macro Configuration and click + Add new configuration.

Select the OutOfStockOrderSplitter macro and click Create Configuration

This creates a new configuration where the selected order IDs are passed to the macro when it runs from the rule.
In the Macro Configuration screen, add the configuration name.

Example configuration name:
Out of Stock Order Splitter
This macro does not require additional user-entered parameter values. The OrderIds value is provided automatically by the selected orders or rule context.
Make sure to enable the macro to continue with the Rule Engine configuration.

Note: If the macro is not enabled, it will not appear in the Action value list when setting up the rule.
Go to Orders > Rules engine and click + Add new rule.

Key Benefits
Enter the rule name and click Create.

Click Add new, select Condition, set the condition as required, and save it.


Add the macro action and click Save.


In the Add action window, enter the Action name, for example:
OutOfStockOrderSplitter
-
Set Action type to:
Execute a macro -
In Action value, select:
OutOfStockOrderSplitter -
Click Save
Note: If the macro is not enabled, it will not appear in the Action value list when setting up the rule.
Review the saved rule setup.

-
Verify the condition and action are connected correctly
-
Click Save in the bottom-right corner to save the rule
Orders with unavailable items can cause fulfilment delays if the full order is held back. This macro helps reduce those delays by splitting out-of-stock items into a separate order and marking the relevant order for review.
Reduce Manual Stock Review
Eliminates the need to manually check every selected order item and decide whether the order should be split.
Keep Available Items Moving
Helps separate unavailable items so available items can continue through fulfilment where applicable.
Flag Out-of-Stock Orders
Assigns the OUT OF STOCK! identifier to orders that contain out-of-stock items requiring review.
Prevent Repeat Processing
Adds a macro-run tracking extended property so the same order is not processed repeatedly.
Save Operational Time
Allows teams to process multiple selected orders in one macro run instead of splitting orders manually.
Add Clear Order Notes
Adds internal notes to explain whether the split order contains out-of-stock or in-stock items.
How It Works
The macro checks each selected order, compares item quantities against stock availability at the fulfilment location, and splits out-of-stock items into a separate order when both available and out-of-stock items exist.
Step 1
The macro starts execution and writes Macro Started to the log.
Step 2
It loops through each order ID provided in the OrderIds parameter.
Step 3
For each order, the macro retrieves the order details and existing extended properties.
Step 4
The macro checks whether a macro-run tracking extended property already exists. If it exists, the order is skipped.
Step 5
It identifies the order fulfilment location and checks stock availability for each order item at that location.
Step 6
The macro separates items into available and out-of-stock item lists based on the stock availability logic.
Step 7
If the order contains both available and out-of-stock items, the macro creates an order split for the out-of-stock items.
Step 8
The macro calls the Linnworks order split function and creates the split order using the original postal service and fulfilment location.
Step 9
It adds internal notes to the new split order to identify whether it contains out-of-stock or in-stock items.
Step 10
If a split order contains out-of-stock items, the macro creates the OUT OF STOCK! identifier if needed and assigns it to the order.
Step 11
If all items are out of stock, the macro does not split the order. Instead, it adds an internal note and assigns the OUT OF STOCK! identifier to the original order.
Step 12
After processing, the macro adds a macro-run tracking extended property to prevent the same order being processed again.
Step 13
The macro logs split results, skipped orders, stock values, errors, and completion status.
Usage of App
This macro is designed to split selected orders automatically once it is configured and triggered from the Rule Engine. It is useful when orders may contain a mix of available and unavailable items and the unavailable items need to be separated for review.
OrderIds
Defines the Linnworks order IDs that should be processed. Only these selected orders are checked and may be split.
Fulfilment Location
The macro checks stock availability at the order fulfilment location.
Stock Availability Check
The macro compares each order item quantity against the available stock level for that item at the order location.
Order Split Behaviour
When both available and out-of-stock items exist, the macro splits the out-of-stock items into a separate order.
Out-of-Stock Identifier
Orders containing out-of-stock items are assigned the OUT OF STOCK! identifier.
Internal Order Notes
The macro adds internal notes explaining whether a split order contains out-of-stock or in-stock items.
Repeat Run Protection
The macro adds a tracking extended property after processing so the same order is not processed again.
Execution Logging
The macro records the start, order number, item quantity, stock level, split results, identifier assignment, skipped orders, errors, and completion.
Key Points to Remember
-
The macro processes only the order IDs provided in OrderIds
-
The macro checks stock at the order fulfilment location
-
The macro can split out-of-stock items into a separate order
-
The original postal service is retained for the split request
-
If all items are out of stock, the order is not split and receives the OUT OF STOCK! identifier
-
If a split order contains out-of-stock items, it receives the OUT OF STOCK! identifier
-
Internal notes are added to explain the split result
-
A macro-run tracking extended property is added after processing to prevent repeat runs
-
Orders that already have the macro-run tracking property are skipped
-
The current stock logic should be tested with sample orders before production use
Once the macro is running, it helps separate fulfilment-ready items from items that need out-of-stock review.
What You Can Expect
-
Selected orders are checked automatically
The macro reviews each order passed into the OrderIds parameter -
Stock is checked by fulfilment location
Each order item is compared against available stock at the order location -
Mixed orders may be split
Orders containing both available and out-of-stock items can be split into separate orders -
Out-of-stock orders are marked
Orders or split orders containing out-of-stock items receive the OUT OF STOCK! identifier -
Internal notes are added
Notes are added to explain the split result and original order reference -
Repeat processing is prevented
A tracking extended property is added so the macro does not process the same order again -
Execution is logged
The macro records stock values, split results, identifiers, notes, skipped orders, and errors
Overall Impact
This macro improves out-of-stock handling, reduces manual split work, and helps fulfilment teams process available items while clearly marking unavailable items for review.
What To Do After the Macro Runs
After the macro has completed, review split orders and orders marked with OUT OF STOCK! to decide the next fulfilment or customer service action.
Steps to Follow
Step 1
Open Linnworks and locate the orders included in the OrderIds parameter.
Step 2
Run the macro through the configured rule action.
Step 3
Review the macro logs to confirm which orders were split, skipped, or marked out of stock.
Step 4
Review any newly created split orders and check the internal notes.
Step 5
Filter or review orders with the OUT OF STOCK! identifier.
Step 6
Decide whether out-of-stock orders need replenishment, customer contact, cancellation, or delayed fulfilment.
Step 7
Continue normal picking, packing, or dispatch processing for fulfilment-ready orders.
Why This Matters
Handling out-of-stock items early helps:
-
Reduce fulfilment delays
-
Keep available items moving
-
Make stock exceptions easier to review
-
Reduce manual order splitting
-
Improve visibility for customer service and warehouse teams
-
Prevent the same order being processed repeatedly by the macro
Best Practices
To get the most value from this macro, test the stock logic carefully and use clear rule conditions before applying it to a large order set.
Recommended Guidelines
-
Test with sample orders first
Run the macro on a small controlled set of orders to confirm split behaviour -
Review stock data accuracy
Make sure available stock values are accurate at each fulfilment location -
Use clear rule conditions
Configure the Rule Engine so only intended orders are passed to the macro -
Review split orders after execution
Check newly created orders and internal notes before continuing fulfilment -
Monitor the OUT OF STOCK! identifier
Use the identifier to manage orders that need review or customer service action -
Avoid repeat manual runs
The macro adds a tracking extended property after processing, so repeated runs on the same order are skipped
Accurate stock data and careful testing are important because this macro can split orders and assign out-of-stock identifiers automatically.
Example Scenario
To better understand how this works, here’s a simple example:
Selected order:
- Order A contains three items
Stock result:
-
SKU-001 has enough stock at the fulfilment location → Treated as available
-
SKU-002 has insufficient stock for the full ordered quantity → The unavailable quantity is separated
-
SKU-003 is fully out of stock based on the macro logic → Added to the out-of-stock split
Macro result:
-
A split order is created for the out-of-stock items
-
The split order receives an internal note referencing the original order
-
The split order receives the OUT OF STOCK! identifier
-
The original order receives a macro-run tracking extended property
What This Means
-
Available items can continue through fulfilment
-
Out-of-stock items are separated for review
-
Orders requiring attention are easy to find using the OUT OF STOCK! identifier
-
The original order is protected from being processed repeatedly
Final Summary
The Out of Stock Order Splitter macro helps selected Linnworks orders handle unavailable stock more efficiently by checking item availability, splitting out-of-stock items into a separate order where applicable, and assigning the OUT OF STOCK! identifier for review.
By reducing manual stock checks, adding internal notes, and preventing repeat processing, this macro supports cleaner fulfilment workflows and better out-of-stock visibility.