Technical project case study
A scheduled replenishment service now calculates what a retail shop needs, caps it to warehouse availability, respects pack sizes and creates controlled wholesale orders for pickable and non-pickable stock.
01The operational problem
Retail replenishment sits between two different stock realities. The shop needs enough product to reach its target stock level, but the warehouse can send only what is actually available. Large transfers also create congestion because a shop has limited shelf and back-room capacity.
The calculation was complicated further by pack quantities and warehouse location type. Stock may exist in Peoplevox yet not be immediately pickable. Creating one order for everything would either compete for unavailable pick stock or hide the movement work needed before fulfilment.
02What was built
ECom Clarity built ShopOrder_AI as a hosted replenishment application. It reads the shop position from Lightspeed X-Series, reads warehouse availability and location-type stock from Peoplevox, calculates recommendations and creates Sellercloud wholesale orders through the REST API.
The workflow separates immediately pickable lines from items requiring movement. Fully pickable SKUs go to a Pickable order. A SKU that cannot be fulfilled completely from Pick locations goes to a Move order with inventory counting disabled until the warehouse has replenished the pick face.
03Technical design
- Lightspeed handle is used as the shop-side item key, with active and inventory-tracking checks.
- An item qualifies when current shop inventory is at or below its reorder point.
- Wanted quantity is calculated as reorder point plus restock level minus current inventory.
- Optional product rules round demand up to a valid pack-size multiple.
- Peoplevox Master Stock List availability caps the final quantity.
- A second Peoplevox report classifies stock by location type for Pickable and Move order splitting.
- Sellercloud REST calls create traceable UK-dated wholesale orders with controlled defaults.
04Controls, failure handling and operational safety
- Blank SKUs, invalid stock rules, inactive items and non-tracked products are excluded.
- Warehouse availability is a hard upper limit even after pack rounding.
- The whole SKU is placed on the Move order if the required quantity is not fully pickable, avoiding partial allocation ambiguity.
- Automation can be disabled independently through environment configuration.
- Each scheduled run records trigger, duration, source counts, lines, units, source order ID and success or failure.
05Why the design matters
The system replaces a spreadsheet-style comparison with a repeatable operational policy. It connects demand and supply without assuming that all warehouse stock is equally ready to ship.
The design also shows why integration is more than passing data between APIs. The important work is the agreed rule set: when to reorder, what target to use, how packs behave, which source controls availability and how pick-face constraints affect the order.
06What this project demonstrates
- Lightspeed OAuth, Peoplevox SOAP reporting and Sellercloud REST integration in one workflow.
- Retail replenishment logic expressed as testable business rules.
- Warehouse-aware order splitting rather than a simple stock transfer.
- Scheduled execution with an operator-facing notification history.
07Practical lessons for similar integrations
Every multi-system stock automation needs one declared authority for each fact. In this design, Lightspeed describes shop demand, Peoplevox controls warehouse availability and Sellercloud records the wholesale order.
Pack rounding must happen before the availability cap, and location readiness must be evaluated after quantity calculation. Changing that sequence produces superficially plausible but operationally incorrect orders.