---
title: "Building a dynamic inventory optimisation system: A deep dive"
description: "Zalando's ZEOS builds replenishment recommendations by minimising a cost function that combines storage, lost sales, overstock, operations and inbound costs."
url: "https://swe.quest/articles/building-a-dynamic-inventory-optimisation-system-a-deep-dive-21c9077c3e05644d"
canonical: "https://engineering.zalando.com/posts/2025/06/inventory-optimisation-system.html"
source: "Zalando Engineering"
published: "2025-06-29"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["ml-platform","machine-learning","ecommerce","data-pipelines","scalability"]
---

# Building a dynamic inventory optimisation system: A deep dive

A post on [Zalando Engineering](https://swe.quest/sources/zalando.md), published 2025-06-29, 9 min read, Case study. Original: [https://engineering.zalando.com/posts/2025/06/inventory-optimisation-system.html](https://engineering.zalando.com/posts/2025/06/inventory-optimisation-system.html)

## Summary

Zalando's ZEOS builds replenishment recommendations by minimising a cost function that combines storage, lost sales, overstock, operations and inbound costs. Probabilistic demand forecasts feed a Monte Carlo simulation engine with gradient-free black-box optimisers. The weekly forecasting pipeline runs LightGBM through Nixtla's MLForecast with conformal inference, does pre-processing in PySpark on Databricks and feature transforms on SageMaker, and covers 5 million SKUs over about 3 years of history in under 2 hours. The optimisation service shares features via SageMaker Feature Store (online lookups at 10–20ms per SKU, S3-backed offline store). It serves daily batch transform jobs plus an interactive SQS/Lambda path for partner setting changes, keeping both paths consistent.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)

## Prerequisites

- time series forecasting basics
- PySpark
- AWS SageMaker ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))

## Keywords

zFlow, LightGBM, Nixtla MLForecast, Databricks, AWS SageMaker, SageMaker Feature Store, Monte Carlo simulation, Numba

## Related posts

- [Paper Announcement: A Practical Approach to Replenishment Optimization with Extended (R, s, Q) Policy and Probabilistic Models](https://swe.quest/articles/paper-announcement-a-practical-approach-to-replenishment-optimization-with-36b9876b4c2ccd90.md): Zalando Engineering · 2026-01-14 · Hard · 7 min read · E-commerce, Machine learning, Algorithms, Scientific computing
  Zalando's ZEOS replenishment engine combines LightGBM quantile demand forecasts, an extended (R, s, Q) policy with a kick-start quantity and lifecycle cutoff, and Monte Carlo discrete event simulation over a 12-week horizon.
- [Zalando's Machine Learning Platform](https://swe.quest/articles/zalando-s-machine-learning-platform-ccf6f0b2dc8025a9.md): Zalando Engineering · 2022-04-18 · Medium · 8 min read · ML platforms, Cloud platforms, Infrastructure as code, Python
  Zalando's ML platform takes ideas from experimentation in a hosted JupyterHub (Datalab), Databricks and a GPU HPC cluster to production pipelines orchestrated by AWS Step Functions.
- [Leveraging multimodal LLMs for Shopify’s global catalogue: Recap of expo talk at ICLR 2025](https://swe.quest/articles/leveraging-multimodal-llms-for-shopify-s-global-catalogue-recap-of-expo-talk-at-5a595806db6311fb.md): Shopify Engineering · 2025-07-16 · Medium · 11 min read · LLMs, E-commerce, Model training, Inference & serving, Evaluation
  Shopify's Global Catalogue uses fine-tuned open-source vision LLMs (LLaVA 1.5 7B, then LLaMA 3.2 11B, now Qwen2VL 7B) to classify, extract attributes from, standardize and match billions of merchant product listings.
- [Shopify's Playbook for Scaling Machine Learning](https://swe.quest/articles/shopify-s-playbook-for-scaling-machine-learning-01ef31091481dd96.md): Shopify Engineering · 2022-02-11 · Easy · 12 min read · ML platforms, Machine learning, Threat detection, E-commerce
  Shopify's approach to scaling machine learning grew out of its first ML product, an order fraud detector that replaced a rule-based system with a high false-positive rate.
- [Automating Data Ingestion with a RAG Flywheel](https://swe.quest/articles/automating-data-ingestion-with-a-rag-flywheel-a00e5b0ced1109c4.md): Zalando Engineering · 2026-10-11 · Medium · 13 min read · RAG & retrieval, LLMs, Vector search, PostgreSQL, Data pipelines
  Zalando's Supply Operations automates mapping of diverse supplier spreadsheet headers (10-60 columns) onto a 55+ column internal schema using an LLM-driven RAG flywheel that learns from human-approved mappings.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
