A demand forecasting calendar to solve the problems of "overproduction" and "shortage" in make-to-stock production.
This explains the mechanism of the demand forecasting calendar that runs on ERPNext. It automatically calculates the optimal production increase quantity for e-commerce sales, reducing waste and lost sales opportunities.

Introduction — Common challenges of make-to-stock production
"How many more should we produce for next month's sale?"
Food, cosmetics, consumer goods, parts—all companies that manufacture to make-to-stock face this question.
According to a survey by the Ministry of Economy, Trade and Industry, lost sales and waste due to inventory management errors in the manufacturing industry amount to several percent of sales. Despite this, many workplaces still rely heavily on the experience and intuition of veteran employees when deciding how to increase production.
For companies where e-commerce sales are becoming the main source of revenue, the situation is even more serious. With Rakuten, Amazon, Yahoo!, and Furusato Nozei (hometown tax donation) programs, more than 30 sales events occur annually. Managing all of this mentally is simply impossible.
In this column, we will introduce the functions and technology of the demand forecasting calendar built on ERPNext, specifically for business leaders.
1. What you can do with this feature
🗓️ 1-1. Dashboard for centralized management of business information
The demand forecast calendar is not just a forecasting tool, but a company-wide dashboard that aggregates information essential for business management.
The main components are the following three tabs:
| Tab | Content | Business Benefits |
|---|---|---|
| 🔥 Demand Events | Monthly calendar of e-commerce sales and seasonal events | See at a glance when and what will happen |
| 🏭 Production | Daily Production Results vs. Plan | Instantly check if production is progressing according to plan |
| 📈 Prediction Accuracy | AI prediction accuracy displayed by item | Confirm prediction reliability numerically |
In addition, it also features tabs for sales/orders, accounting, and purchasing/inventory, allowing you to get a comprehensive overview of data from each module of ERPNext.
▼ This is a screenshot of the actual demand forecast calendar interface.
🤖 1-2. AI-powered automated demand forecasting
Behind the scenes, Prophet, an open-source time-series prediction AI developed by Meta (formerly Facebook), is running. Three prediction engines are available, which can be used depending on the application.
| Engine | Forecast Period | Main Applications |
|---|---|---|
| Preliminary Notice Forecast | 8 weeks ahead | Manufacturing plan development |
| EC Forecast | 2 weeks ahead | Decision on replenishing inventory |
| Company-wide forecast | 3 months ahead | Management decisions and financial planning |
Our preliminary forecasts are used for manufacturing planning, our e-commerce forecasts for inventory replenishment, and our company-wide forecasts for management decision-making—each providing forecasts with the optimal level of detail and timeframe.
🛒 1-3. Automatically calculate the impact of e-commerce sales.
🌐 Automatically collect events using web scraping
Users simply register keywords such as "Rakuten Sale" or "Amazon Prime Day," and the system automatically scrapes event information from the internet. This information is then reflected in the ERPNext calendar via an ICS (International Calendar Standard) hub. More than 30 e-commerce sales events per year are imported without manual input.
The system automatically calculates the effective impact of each event captured. The key point is to "avoid uniformly increasing production." Instead, it allocates the impact based on the actual sales channel composition ratio over the past 90 days.
Example: During the Rakuten Super Sale (adjustment rate +30%), if Rakuten accounts for 73% of sales, the effective impact is +21.9%. This can be used as a guideline for actual production increases.
If we uniformly increase production by 30%, we'll end up producing too much for channels other than Rakuten, leading to waste and losses. This system automatically eliminates that risk.
🔁 AI automatically learns the impact of events
The system compares the predicted impact of each event with the actual increase or decrease in sales, and the difference is automatically reflected in the next suggestion. For example, if the previous Rakuten SALE predicted a +25% increase but the actual increase was +30%, the next suggestion will be adjusted towards +30%. The accuracy of the production volume prediction improves autonomously with each iteration.
⏪ 1-4. Lead Time Calculation and Alert Notifications
The system automatically calculates the lead time backward from the event start date and sends incremental alert notifications.
Example: Regarding the start of the sale on March 4th
- February 20th — Deadline for ordering raw materials (procurement lead time: 7 days)
- February 27th — Manufacturing start deadline (manufacturing lead time 3 days)
- March 2nd — Deadline for preparing shipments (shipping lead time: 2 days)
You will receive an alert bell 🔔 three days before each deadline, so in this example, you will be reminded gradually starting 12 days before the event. Lead time settings can be customized to suit your company's specific needs.
🛡️ 1-5. Visualization of prediction accuracy and safety measures
"Are AI predictions really accurate?"
To answer this question, the MAPE (Mean Absolute Percent Error) for each item is calculated in real time and displayed in a list with a signal indicator (🟢 within 20% / 🟡 within 30% / 🔴 needs improvement).
Furthermore, we have also put in place safety measures in case our predictions are wrong.
| Solution | Content |
|---|---|
| Manual Override | Individual values can be manually changed. Changes will not be overwritten when the AI is rerun. |
| Batch Percentage Adjustment | Apply a ±N% adjustment to specific items and periods in a single application. |
| Automatic Retuning | Parameters are automatically readjusted weekly when accuracy exceeds a threshold. |
AI predictions are a tool to assist in decision-making. The final decision is always made by a human. Especially with new products or unprecedented events, the system is designed to prioritize on-site experience.
2. Overview of the Technology
🧠 2-1. Why Prophet is suitable for forecasting production make-to-stock
The reasons why Prophet is suitable for make-to-order manufacturing are clear.
| Characteristics | Meaning in Manufacturing |
|---|---|
| Automatically recognizes annual and weekly seasonality | Automatically learns patterns such as "Frequent shipments on Fridays" and "Increased shipments towards the end of the year" |
| Can incorporate the impact of holidays and events | Japanese holidays and e-commerce sales can be added as special days |
| Multiplicative Seasonality | If sales double, the fluctuation range also doubles—a model that reflects reality |
| Lightweight operation without GPU | No cloud AI required. Works perfectly well on your own servers. |
Although Meta archived the Prophet repository in 2023, it is still functioning without issues. Its successor, NeuralProphet, is API compatible, making future replacements low-cost. The prediction logic of this system is consolidated into a single method, so the impact of library replacement will be limited.
🔄 2-2. Autonomous Improvement Loop
Typically, machine learning models are periodically tuned by data scientists, but in this system, AI automatically measures accuracy and readjusts parameters.
| Step | Processing Details |
|---|---|
| ① Accuracy Measurement | Compare predictions and actual results for the past 2-4 weeks to calculate MAPE |
| ② Threshold Determination | Tuning begins when MAPE exceeds 30% |
| ③ Parameter Search | Try up to 48 combinations of key parameters |
| ④ Save optimal values | Automatically adopt the most accurate parameter set |
In addition, we automatically calculate daily adjustment rates based on past manufacturing performance (for example, reflecting the practice of manufacturing more on Fridays to include Monday's shipments), and apply post-production adjustments.
No data scientists are needed. The system automatically learns and improves continuously.
🔐 2-3. Security — Data does not go outside.
Sales data and customer information are our most important trade secrets. This system is designed to be completely self-contained on our own servers.
- Sales, order, and forecast data → Stored in the company's ERPNext DB.
- AI model → Trains and performs inference using our own CPU (no external APIs used)
- ICS hub → localhost communication only. No external transmission.
- Access control → Apply ERPNext's role-based access control.
We have zero reliance on cloud AI services.
⚠️ 2-4. The Limitations of AI — I'll be honest
| Pattern | Reason | Solution |
|---|---|---|
| New Product | No historical data available | Display "Insufficient Data" and skip prediction |
| SNS Buzz | Unpredictable based on past trends | Manually adjust by ±N% |
| Disaster/Pandemic | Exceeds AI detection range | Partial response through automatic adjustment of trend sensitivity parameters |
| Sudden termination of business with a trading partner | No zero assumptions | Manual override |
These limitations can all be addressed through manual overrides.
3. Installation Guide
📋 Prerequisites
| Conditions | Details |
|---|---|
| ERPNext v15 or later | No issues if using the ERPNext.JP environment |
| Past Sales Data | Sales Invoices for 30 days or more |
| EC orders must be stored in ERPNext | We can also discuss EC integration. |
📅 Startup Schedule
| Timeframe | Milestones |
|---|---|
| Week 1–2 | Custom app implemented. Sales events automatically generated. Calendar operation started. |
| Week 5–6 | Data accumulation enables company-wide forecasting |
| Week 9–12 | Monitoring on the accuracy dashboard. Initial automatic tuning. |
| 90 days ~ | Autonomous tuning fully operational. Accuracy is stable. |
💰 Cost
No additional server costs or external cloud services are required. It runs on your existing ERPNext server. Daily operations are fully automated, and it can be operated with only a monthly accuracy review (approximately 15 minutes).
4. Summary — Reinforcing "Experience and Intuition" with "Data and AI"
This system does not negate on-the-job experience. It is a mechanism for quantifying experience and accumulating it as organizational knowledge.
| Traditional Operation | After Implementation |
|---|---|
| Manually manage sale schedules | Automatically add to calendar |
| Determining increased production volume based on experience | Automatically calculating effective impact based on past performance |
| You realize it at the last minute and panic | Gradual alerts starting 12 days in advance |
| Concerns about AI accuracy | Constant monitoring on the dashboard |
| Experts are needed for adjustment | AI self-tunes |
| Concerns about data leaks | Completely within our own servers |
Technology Stack
| Elements | Technology |
|---|---|
| Foundation ERP | ERPNext (Python / Frappe Framework) |
| Prediction Engine | Prophet (Open Source Time Series AI) |
| Event Aggregation | ICS Hub (Microservices) |
| External Cloud | Not required (Completely handled on our own servers) |
If you have questions like, "Can you make predictions with our products?" or "How much data do we need?", please contact us. 30-minute free online consultation Please feel free to ask us anything. You can start using the calendar function in as little as two weeks.
Related articles
5 minFrom order placement to shipment, everything is visible. Integrated ERP for the food processing industry.
This article explains the features of ERPNext.JP, which is specifically designed for the food processing industry. It supports FAX-OCR order import, barcode data entry, lot tracking, and monthly cost calculation as standard features, plus Japanese specifications.
8 minBreaking the Limitations of Excel Inventory Management — Eliminating the "Invisibility" of Inventory with ERPNext
Inventory discrepancies, taking a whole day to complete inventory counts... This article explains how ERPNext.JP solves these problems, from its overall functionality to the benefits of implementation.
8 minkintone × ERPNext Combined Guide — The Best Combination for Making the Most of Your Data
Continue using kintone while integrating inventory, accounting, and manufacturing management with ERPNext. This article clearly explains three patterns for using kintone + ERPNext together and compares their costs.