What is a Replenishment Plan?

When inventory in one location is low or zero, you can set up triggers to notify warehouse workers to move the same inventory from one location to the location with the low quantity. 

Note: The Replenishment Plan requires some scripting knowledge. The script is not a “plug-and-play” solution. You will need to edit the Zone IDs on the script to match the location’s Zone IDs. 

Use Case: The Replenishment Plan example below uses custom fields, scripts, a script plan, and a report. 

How to Create a Replenishment Plan in Infoplus: 

Step 1: Create Three Custom Fields

To learn how to create a custom field, read this article on custom fields.  

  1. Using your quick actions menu (.), navigate to the “Custom Fields” table

  2. Select Create New in the top right

  1. Use the tables below to help you fill in the necessary information. You will need to make two custom fields. 

    1. The “Name” needs to match exactly as the script is calling the names of these fields.  

Field 1: 

Record Type


Field Type



Needs Replenished



Tab Label



Field 2:

Record Type


Field Type



Replen From



Tab Label



Step 2: Add the Script

  1. Using your quick actions menu (.), navigate to the “Script” table

  2. Select Create New in the top Right

  3. Use the fields listed below

  4. Copy and paste the script noted below

  5. Edit the script to customize for your needs

    1. The Zone IDs will need to match your site’s Zone IDs


Replenishment Script

Script Type


Record Type


Example Replenishment Plan Script: 

// search inventory detail to see if sku is in a pickable location or not

//// if yes, make sure there is adequate quantity to fill open orders

//// if no, search overstock locations to see if sku can be replenished

////// if sku cannot be replenished, update custom field

var pickQty = 0;

var totalPickQty = 0;

var overstockQty = 0;

var totalOverstockQty = 0;

// this is looping through each unit then doing all the searches

// can optimize by first getting all warehouseLocationIDs associated with pick locations and then filter inventory search

// search inventory to find pickable quantity --> any items in zone id 19

if(record.availableQuantity > 0)


    var searchInventory = infoplusApi.search(“inventoryDetail”, “sku eq ‘” + record.sku + “‘”, null, null, null);

    for(var j=0; j<searchInventory.size(); j++)


        var inventory = searchInventory.get(j);

        var searchLocation = infoplusApi.search(“location”, “id eq ‘” + inventory.warehouseLocationId + “’”, null, null, null);

        var location = searchLocation.get(0);

        // only get inventory from pickable locations

        if(location.zoneId == 18)


            pickQty = inventory.quantity;

            totalPickQty += +pickQty;

            utils.log(“Found Pickable Quantity of ” + pickQty + ” in ” + location.address + “.”);

            if (pickQty >= record.openOrderQuantity)


              utils.log(“There is sufficient replenishment quantity for ” + record.sku + ” this location.“);

              record.customFields.put(“needsReplenished”, “false”);




              utils.log(“There is insufficient replenishment quantity for ” + record.sku + ” in this location. Continuing..“);



        else if(location.zoneId == 19)


            // check overstock locations

            utils.log(“Could Not Find ” + record.sku + ” in a Pickable Location, Checking Overstock..“);

            utils.log(” “);

            record.customFields.put(“needsReplenished”, “true”);

            overstockQty = inventory.quantity;

            totalOverstockQty += +overstockQty;

            utils.log(“Found Replenishable Quantity of ” + overstockQty + ” in ” + location.address + “.”);

            if(totalOverstockQty >= pickQty)


                record.customFields.put(“fullReplen”, “true”);

                record.customFields.put(“replenFrom”, location.address);





                record.customFields.put(“fullReplen”, “false”);


            //record.customFields.put(“replenFrom”, location.address);






    utils.log(“Could Not Find Any Inventory for Item ” + record.sku + “.”);

    record.customFields.put(“needsReplenished”, “false”);


infoplusApi.updateCustomFields(“item”, item);

Step 3: Create a Smart Filter

  1. Using your quick actions menu (.), navigate to the “Item” table

    1. For more information on how to create and manage smart filters, navigate to this Knowledge Base Article on Smart Filters. 

  2. Add the “Open Order Quantity” as a filter

  3. Filter “Open Order Quantity” for greater than 0

  4. Save this view as a Smart Filter

Step 4: Create a Script Plan

  1. Using your quick actions menu (.), navigate to the “Script Plan” table

  2. Select Create New at the top right

  3. Select your Script and your Smart Filter

  4. Name the plan and save

  1. Using your quick actions menu (.), navigate to the “Manage Scheduled Plans” table

    1. Learn more about Creating and Managing Scheduled Plans

  2. Select Create New at the top right

  3. Select “Script Plan” and select your Script Plan

  4. Add a description, set Active to “yes”, and save.

  1. After the Scheduled Plan is created, find it on the table and go to the “Scheduled” column. Click on the ‘0’ and then click ‘Create New” to select a schedule to run this plan on.

    1. How often should the replenishments take place?

Example Schedule: 

You can select to run the schedule in 4 different ways: 

  • Week Days + Time

  • Days of the Month + Time

  • Certain Weekdays of the Month + Time

  • Crohn Schedule + Time

After you set the schedule and click save, you will notice the number under “Schedule” increase from ‘0’ to ‘1’. 

Step 5: Create a Report to Keep You Updated 

  1. Create a Smart Filter

    1. Item Table

    2. Needs Replenishment = True

  1. Navigate to the “Managed User Reports” Table

    1. More information on Managed User Reports 

  2. Use your new smart filter

  3. At minimum, have the following columns:

    1. SKU

    2. Replen From 

    3. Open Order Quantity

  1. Schedule the report to run on a timeline right after the script plan runs

    1. For example, if the Script Plan runs at 5pm, have the Report scheduled to run at 6pm so the script has time to work