Home / Help Center / pos-app / Reports / Sales Forecast
📈 Reports

Sales Forecast

Sales Forecast predicts your future daily revenue by feeding your historical sales into a statistical forecasting model (Prophet) and showing you the predicted value plus a lower/upper confidence range for each future day.

📍 Menu path: Reports → Sales Forecast
👤 Who uses it: Admin/Owner on the Enterprise plan tier
🏷️ Plan tier: enterprise+

Overview

You pick a From/To date range of historical sales, and the page sends that history to a forecasting model which returns a day-by-day prediction for the next 30 days, each with a predicted value and a lower/upper confidence bound.

This is an Enterprise-tier feature and sits under the Advanced Analytics category on the All Reports directory — of that whole category, this is currently the only forecasting report that is fully wired up end to end.

The forecast quality depends entirely on how much and how consistent your historical sales data is — a short or gappy date range will produce a much less reliable prediction.

Before You Start

Step-by-Step Guide

1 Run a sales forecast

  1. Set the From and To dates to define the historical sales window the model should learn from.
  2. Click Run Forecast.
  3. Wait for the button to show "Forecasting…" while your sales history is fetched and sent to the forecasting model.
  4. Once complete, read the Forecast (next 30 days) table: Date, Prediction, Lower and Upper columns for each of the next 30 days.
  5. Use the gap between Lower and Upper as the model's confidence range — a wide gap means the model is less certain about that day's prediction.

Every Field & Button, Explained

Field / ButtonWhat it does
From / ToThe historical date range of past sales used to train the forecast for this run.
Run ForecastFetches your sales history for that range and submits it to the forecasting model; disabled while a forecast is already running.
Date (forecast table)One row per predicted future day, always 30 days from the model regardless of how wide your historical range was.
PredictionThe model's expected revenue for that future date.
Lower / UpperThe confidence interval around the prediction — the true value is expected to fall between these most of the time.

Tips & Best Practices

Troubleshooting & FAQ

Sales Forecast is not visible in my Reports menu.
It requires the Enterprise plan tier — this is gated above Advanced, so stores on Free/Advanced tiers will not see it at all.
Run Forecast shows an error toast and no table appears.
The forecast depends on a separate analytics microservice; if that service is unreachable or returns an error, you will see a toast with the failure message and no results table. Try again shortly, and contact support if it persists.
The forecast looks flat or clearly wrong.
Check that your selected From/To range actually contains real, varied sales activity — a very short range or a range with unusually few transactions will produce an unreliable forecast.
Forecast always predicts the same 30 days no matter what date range I pick.
The 30-day forecast window is always the 30 days following today, not the 30 days after your selected To date — the From/To range only controls which historical sales are used to train the model, not which future days are predicted.

🧑‍💻 Developer Notes

Source component(s):

  • frontend-app/packages/pos-react-lib/src/pages/analytics/SalesForecasting.jsx

Backend endpoints used:

  • GET /api/reports/sales/history
  • POST {fastApiUrl}/forecast — external Prophet analytics microservice, not the main BazaarPOS backend API

Related tables (db-core repositories):

  • Sale
  • SaleItem

Feature flag key: sales_forecasting (requires enterprise plan tier or above)

Forecasting is powered by an external FastAPI microservice running Meta's Prophet time-series model, addressed via window.appConfig?.fastApiUrl or the POS_FASTAPI_URL environment variable, falling back to http://127.0.0.1:8000 in development. Sales history is fetched from the main backend, reshaped into Prophet's expected {ds, y} format client-side, then POSTed directly to the analytics service — a second network hop outside the normal BazaarPOS API that must be reachable for this page to work.