
Smarter Forecasts, Fewer Stockouts, Better Margins
Science applied on Demand Planning Forecast reduces back orders, time between order and availability costs, optimizing the available supply.

Posted by Martín Savransky
on April 7, 2025 · 5 mins read
About the Company
Trafilea is a global e-commerce company that specializes in developing and operating niche-focused online stores. It is based in Uruguay and was founded in 2014. Trafilea owns and operates several e-commerce direct-to-consumer (DTC) brands, primarily in the fashion, shapewear, and wellness industries. The company's goal is to provide high-quality products to customers worldwide, focusing on exceptional customer service and a seamless online shopping experience. Their main brands are Shapermint, Truekind, both leading online shapewear and intimate retailers.
Executive Summary
The project aimed to develop data-driven forecasting solutions that enhance inventory planning, reduce stock outs and overstocking, and enable more strategic decision-making. This initiative was crucial in optimizing warehouse stocks, improving forecasting models, expanding model coverage across new products and markets, and refining performance evaluation methodologies. Through this project, we improved the business operation by at least 10% by significantly reducing forecast errors and enhancing decision-making.
The Challenge
Trafilea follows an international supply chain model, with production based in China and distribution managed through warehouses worldwide. One of the key challenges in their operations is long production lead times, with a minimum of five months from placing an order to have inventory available for sale. This, combined with high demand volatility and shifting customer behavior, makes accurate demand forecasting a critical need. The goal of the project is to develop data-driven forecasting solutions that enhance inventory planning, reduce stockouts and overstocking, and enable more strategic decision-making. This initiative is crucial for achieving customer satisfaction by reducing the partial or back orders, reducing costs incurred when products run out of stock (which leads to lost sales and rushed replenishment expenses). It also involves optimizing warehouse stocks, improving forecasting models, expanding model coverage across new products and markets, and refining performance evaluation methodologies.
Process and Timeline of the Project

- Stakeholder Alignment
- The project began with close collaboration between Operations and Machine Learning teams to fully understand the business problem. Given the long production lead times and demand volatility, it was crucial to identify key pain points, objectives, and constraints before designing a forecasting solution.
- Data Collection & Benchmarking
- Gathered historical demand, inventory, and marketing data.
- Assessed data quality and identified sales performance patterns.
- Analyzed the impact of external factors on demand fluctuations.
- Benchmarked the current forecasting process by measuring errors using Weighted Mean Absolute Percentage Error (wMAPE) and Mean Absolute Error (MAE) + |bias|.
- Model Development & Validation
- Developed time series models with heuristic-based adjustments.
- Applied initial models to best sellers (ACQ) products.
- Conducted back testing by simulating past forecasts and comparing them to actual sales.
- Presented validation results to stakeholders to compare the new approach with the existing forecasting method.
- Scaling & Expansion
- Expanded model coverage to include both best sellers (ACQ) and non-best sellers (Non-ACQ) products.
- Categorized Non-ACQ products into best sellers and long-tail inventory for targeted forecasting strategies.
- Introduced a New Launches model for styles with no historical sales, leveraging market trends and category insights.
- Integrated hierarchical models for product variants, style, country, and warehouse levels, ensuring alignment across different forecasting levels.
- Refinement & Integration
- Extended forecasting to Amazon and Direct-to-Consumer (DTC) channels, recognizing different consumer behaviors across sales platforms.
- Enhanced time series models to capture trends, seasonality, and external factors like promotional events and holidays.
- Performance Monitoring & Optimization
- Introduced the Forecast Value Added Report to evaluate the impact of each forecasting approach.
- Optimized the forecast execution timeline (LAG4) to align with production and inventory lead times.
- Implemented benchmark models like Moving Averages to establish a simple but effective comparison baseline.
- Integrated XGBoost Machine Learning models to refine predictions by capturing nonlinear relationships and complex demand patterns.
- Expanded the forecasting framework to additional countries and store domains to support the Company’s international operations.
The Solution
The new demand planning approach formalized and automated forecasting by establishing a structured, data-driven methodology, replacing manual adjustments with automated time series and machine learning models. Standardized error metrics (wMAPE, MAE + |bias|) and a Forecast Value Added Report enabled continuous performance tracking, improving accuracy and adaptability. Advanced models, including XGBoost and hierarchical forecasting, captured trends, seasonality, and external factors, ensuring alignment across SKU, style, country, and warehouse levels. Scalability was enhanced by integrating Amazon and DTC channels, adapting to acquisition (ACQ) and non-acquisition (Non-ACQ) styles, and enabling seamless expansion to international markets. Optimizing the forecast execution timeline (LAG4) improved inventory allocation, reducing supply chain inefficiencies and enhancing data-driven decision-making. This transformation significantly increased forecasting precision, operational efficiency, and scalability across the company.

Figure 1: Monthly gross sales time series for one product with its historical values, forecast and moving average baseline.

The Results
Analyses conducted during the project revealed that average monthly deficits could reach $500K, primarily due to avoiding lost sales due to stockout-related issues.
By automating and formalizing the forecasting process, the implemented model reduced these expenditures by 10–40%. Assuming a conservative 25% reduction — 125K per month — the projected annual savings could exceed $1.5 million.
This estimate considers a scenario where no stock is available before a production order, relying entirely on forecast-driven decisions.
From a technological standpoint, the project leveraged automation and machine learning to enhance forecasting accuracy. The Weighted Mean Absolute Percentage Error (wMAPE) metric was used for evaluation at different levels, showing a 10% operational improvement through reduced forecast errors and more informed decision-making. A 5-month forecast achieved a 30% wMAPE, reflecting a 10% reduction in errors compared to manual methods. The deployment of machine learning models not only improved accuracy but also introduced real-time performance dashboards. Additionally, the hierarchical forecasting approach significantly outperformed previous models, optimizing demand estimation and reinforcing data-driven decision-making.
The impact
Collaborating with Mutt Data on this project provided Trafilea with a robust, automated forecasting system that significantly enhanced demand planning accuracy. By replacing manual heuristics with advanced machine learning models and hierarchical forecasting, the solution reduced monthly prediction errors by approximately 30% representing around 125,000 contributing to enhanced inventory management and more efficient production cycles. The integration into Trafilea’s cloud services ensured seamless execution, allowing the team to generate precise forecasts on demand for 93% of the DTC and 82% products in Amazon channels. With a fully developed pipeline for model selection, inference, and monitoring, Trafilea now has a scalable, data-driven solution that improves decision-making, minimizes operational risks, and maximizes efficiency in their international supply chain.

Wrapping Up
Mutt Data provided Trafilea with a robust, automated forecasting system that significantly enhanced demand planning accuracy. By replacing manual heuristics with advanced machine learning models and hierarchical forecasting, we reduced prediction errors by at least 10%, leading to better inventory management and optimized production cycles. The integration into Trafilea’s cloud services ensured seamless execution, allowing the team to generate precise forecasts on demand. With a fully developed pipeline for model selection, inference, and monitoring, Trafilea now has a scalable, data-driven solution that improves decision-making, minimizes operational risks, and maximizes efficiency in their international supply chain.
This project wouldn’t be possible without the commitment and collaboration of Juan Orjuela (Demand Planning Lead) and Lila Siebenrock (Trafilea Project Manager) who provided insightful suggestions and support along the way we worked together.
Are you ready to enhance your business via Machine Learning, AI and Data? Contact us to get started!