Pietro Filipi


Source: depositphotos.com

stores in Czech republic
stores abroad
products in colections twice a year
lines of code. From the original 5,000.

Pietro Filipi was a Czech company in the luxury clothing market, with 23 stores in the Czech Republic and 11 others abroad. Every year, the company presented two collections of goods, each with approx. 400 products. They were faced with the issue of how to efficiently distribute goods to individual stores, and we at Revolt BI helped them solve it through intelligent replenishment.

Problem and assignment

Imagine that you have a collection of 400 products twice a year, each in several sizes, and you have to ensure that each is available in sufficient quantity in all sizes at each of your 34 stores.

For the most part, goods are ordered long in advance, so you can’t respond flexibly to demand; all you can do is estimate future sales in individual locations. At the same time, it’s essential that the customer can try out and buy any goods at “their” store at all times, but at the same time, you need it to be nearly sold out at the end of the season, because after the season’s finished, high-fashion collections are unsellable or sold only at a significant discount (loss).

So you have to:
  • Minimise inventory investment
  • Have goods in the places where they sell best
  • Minimise losses from unsold or discounted goods
  • Move products efficiently between stores (replenishment)

Existing solutions

It was precisely these problems that Pietro Filipi was faced with, which is why, over the course of more than a decade, they developed their own script (a set of SQL procedures), which had over 5,000 lines of code and almost no-one knew how to use any more.

The script worked on the principle of a fixed order of stores, according to which stocks were moved around. It was started manually twice a week and continued to require a lot of manual intervention, both before and after the fine-tuning of any obvious errors.

The solution wasn’t even able to assess the effectiveness of individual goods transfers as the decisive factor was not how well the individual stores were selling the goods, and there were many transfers where the goods were lying unused, while in many stores, the same goods were missing.

Our solution

In our approach, we worked backwards, i.e., we started with the goals that we wanted to achieve and how to evaluate them. So the key questions were:

Why am I moving goods?

I want to achieve higher sales with the same margin.

What is the most important factor?

The probability of sale.

It’s logical – you need to know how likely you are to sell a product in a particular store so that you know where to deliver it to.


You have 100 blouses from a new collection and you need to determine which stores to send them to. Alternatively, you have blouses in stores and you have to determine whether they will be sold by the end of the season and whether might have more chance of being sold elsewhere. However, with this, you incur costs for relocation and loss of sales during the so-called off-shelf time.

The first step is to calculate the likelihood of selling blouses in individual stores. This can be based on sales of the same, related or similar products in the past, but can also include, for example, the impact of weather, etc. At the same time, you have several options for achieving the result. We were able to combine them and use different methods depending on how much data we have.

In the second stage, it is necessary to calculate the probability at the level of individual pieces in individual stores. If, for example, there is a 75% probability of selling blouses in Prague and 44% probability in Teplice: is it better if a blouse is the third to be delivered to Prague, or the first to be delivered to Teplice?

Our combined predictive model:

  • Regression
  • With sufficient data on previous sales
  • Linear, logistical, weighted…
  • ML algorithms
  • Give a high-quality forecast with a smaller amount of data
  • Analyse relationships between products and/or other external influences (weather, season…)
  • Neural networks, Bayesian neural networks
  • Expert estimate
  • Experience of corporate experts, excellent especially for initial estimates, when almost no data are available

However, the list doesn’t end there, because the probabilities of a sale may be interdependent:

  • Prohibited movements
  • Minimum stock in store
  • Substitutes, supplements

So what we’re looking for is the best placement from the range of acceptable solutions…

Optimisation model for replenishment – summary

  • KPI
  • Total expected profit = expected revenue – transfer costs and off-shelf time losses
  • Predictive model
  • Linear or more complex combination, ML or expert estimate
  • Restrictive conditions
  • All rules for transfer permissibility

What worked for us

  • Breakdown into subsidiary probabilities
  • Model estimates more general
  • Breakdown initially according to a priori rules
  • The weight of the data calculation gradually increases
  • Pair link
  • Prohibitive prices for blockages and storage
  • Greedy heuristics to select the best transfers

What didn’t work for us

  • Optimisation via IP
  • Idea: placing products to solve one or more IP tasks
  • Problem: the calculation itself, time, default conditions, misleading shadow-prices
  • Substitution analysis
  • Idea: “Weaker” products sell better when better products are not available
  • Problem: inconclusive hypothesis, data noise, positive correlation


Our new code, which replaced the original solution, not only brought significant savings and increased profits, but was also much clearer due to its division into independently editable parts. The range also decreased from the original more than 5,000 to about 1,000 lines of code, and the company additionally obtained a complete documentation of about 1,000 lines.

In addition, all transfer calculations take place completely automatically every day without the need for interventions, and at Pietro Filipi they also received reports on the effectiveness of individual transfers, which allowed them to continue working on optimisation.

What the client says

“Our cooperation with Revolt BI was exemplary. Not only were they were quick to understand our needs and tasks, but they themselves came up with many improvements that further increased efficiency. Even in the first few months we noticed significant savings in logistics costs, with a concurrent increase in sales due to the improved availability of our products in stores. Our colleagues in logistics then appreciated the tremendous reduction in labour intensity and increased understanding of what they were doing. In addition, we in the management gained a perfect overview of the efficiency of transfers.”

– Lukáš Uhl, IT/Operations/Retail manager, Pietro Filipi

Contact us

Are you troubled by data, processes or the entire analytical environment?
We’re here for you.