Schedule MacroRIS-SM-2033 – InventoryUpdate

Inventory Batch Creation & Assignment

Create and assign inventory batches for stock items in Linnworks, including batch number, quantity, location, and stock value for improved tracking.

Overview

The RIS-SM-2033 – InventoryUpdate macro is used to create inventory batches and assign stock quantities to specific warehouse locations in Linnworks.

It defines batch-level details such as batch number, bin/rack, quantity, and stock value, enabling structured inventory tracking.

Ensure StockItemId and LocationId are valid before running this macro to avoid failures.

Purpose

This macro:

  • Creates inventory batches
  • Assigns stock to a specific location
  • Defines quantity and stock value
  • Links inventory with batch information

👉 In short:
Create batches and assign stock to locations.

When It Runs

Used for inventory setup and batch tracking

Typically runs:

  • Manual execution
  • Scheduled execution (if automated batch creation is needed)
  • During stock initialization or updates

Parameters

Note:

  • This macro does not take dynamic parameters
  • All values are hardcoded inside the macro
path
StockItemIdstring
Required

Target stock item to create batch for.

path
BatchNumberstring
Required

Unique identifier for the batch.

path
BinRackstring
Required

Storage bin or rack location in the warehouse.

path
Quantitynumber
Required

Quantity of stock to assign in the batch.

path
StockValuenumber
Required

Total value of the stock assigned to the batch.

path
LocationIdstring
Required

Warehouse location where the batch will be created.

How It Works

Initialize Batch List

Create a collection to store batch data.

Create Batch Object

Define batch using StockItemId and BatchNumber.

Define Inventory Details

Set batch attributes including:

  • BinRack
  • Quantity
  • StockValue
  • LocationId

Link Inventory to Batch

Attach inventory details to the batch object.

Prepare Batch Collection

Add batch object to the batch list for processing.

Create Batch in Linnworks

Call CreateBatches API to create and assign the batch.

Final Result

  • Batch created successfully

  • Stock assigned to specified location

  • Quantity and stock value updated

  • Batch available for inventory tracking

Usefulness

This macro is highly beneficial for:

  • Enabling batch-level inventory tracking
  • Improving warehouse organization
  • Supporting bin/rack-based storage systems
  • Tracking stock quantity and value
  • Managing inventory more efficiently

Important Notes

  • Uses hardcoded values (not dynamic)

  • StockItemId must exist in Linnworks

  • LocationId must be valid

  • No validation or error handling implemented

  • Expiry dates are not configured

  • BatchNumber should be unique

  • Not suitable for bulk operations

Example Scenario

Key Insight

By structuring inventory into batches, this macro improves stock traceability and warehouse organization, but requires dynamic inputs and validation for scalable real-world usage.