How to Use a Script to Consolidate BackOrdered Line Items

If an order has multiple backorders, you can consolidate those backorders into one order by using a script.

Infoplus Support can help with general questions about how scripting works. For help with a specific script or its outputs, you will need to submit a Pro Services request for paid support. Pro Service request form can be found here.

When inventory (that is allowed to be placed on backorder) cannot be allocated to an Order (e.g. low quantity, frozen status, etc.), a new Order record (per backorder item) with a status of "Back Order" for the outstanding quantity will be created.




NOTE: Items can only be placed on backorder when the Item record indicates so. To indicate that an item can be placed on backorder, you need to select Yes in the Backorder field which you'll find in the Purchasing tab of the Item record. 

Status Backorder Consolidator: 


If an order has multiple backorders you can consolidate those backorders into one order. 


1. Access the Script table. Two ways:
From the Dashboard: Click the Apps tab, click the Scripts App, then click the Script table.
From the Quick Actions shortcut: Press a dot (period) on your keyboard, then select the Script table from the list of Quick Actions.

2. Click the Create New button at the top right of the page then the  "Creating New Script" screen appears.


3. Complete the necessary fields at the top: 
- Input 'Backorder Consolidator' in the Name field.
- Select 'Record' as the Script Type.
- Select 'Beta' as the  API Version, then copy and paste the below script in the Code field:

4. Create a new Smart Filter for Orders that are in a Backorder state and do not have the "ran-bo-consolidator" tag. Name the Smart Filter and save it.


5. Create a Script Plan using the Smart Filter and script that was just created.

Click "Create New".

Give the Script Plan a name and add the Script and the Smart Filter to the Script Plan. Click Save.

6. Use this KB to set up the Scheduled Plan to run the automation for consolidating Backorders.