Location Aware Machine Learning Models for Predicting Online Sales of MSMEs: A Case Study from Indonesia
Main Article Content
Abstract
The rapid growth of e-commerce in emerging economies presents new opportunities for Micro, Small, and Medium Enterprises (MSMEs). However, the main problem lies in the difficulty of accurately predicting online sales across regions with heterogeneous socioeconomic and infrastructural conditions, which often leads to inefficient resource allocation and missed market potential. This study aims to develop a location-aware predictive framework that integrates spatial intelligence into machine learning models for forecasting MSME online sales in Indonesia. The proposed model adopts a two-stage approach that combines XGBoost regression with spatial lag features, allowing the model to capture both local demand drivers and inter-regional dependencies. The datasets include historical e-commerce transactions, demographic indicators, infrastructure accessibility, and socioeconomic profiles aggregated at the regional level. To ensure robustness, spatial-temporal cross-validation is applied, and model performance is evaluated using RMSE, MAE, and MAPE. The results show that the location-aware model outperforms baseline approaches, reducing forecasting errors by up to 18% and identifying high-potential sales regions more effectively. Explainability analysis further highlights population density, regional income, and proximity to logistics hubs as key predictors. Future work will focus on extending the framework with deep learning and graphbased models to capture dynamic spatio-temporal interactions, as well as integrating real-time data streams for adaptive sales forecasting.
Article Details

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
References
A. H. Ambiha, (2024). “Enhanced Sales Analysis: Predictive Insights from Machine Learning Models Using the XGboost Regressor Approach”. https://doi.org/10.1049/icp.2024.4424
A. Mitra, (2023). “A Comparative Study for Machine Learning Models in Retail Demand Forecasting”. https://doi.org/10.1007/978-981-19-5403-0_23
Alzami, (2024). “Demand Prediction for Food and Beverage SMEs Using SARIMAX and Weather Data,” Ing. Des Syst. D Inf., vol. 29, no. 1, pp. 293–300, https://doi.org/10.18280/isi.290129
Chaudhary, (2025). “Forecasting Retail Sales Demand by using AutoRegressive Integrated Moving Average and Graph Neural Network for Supply Chain Optimization,”. https://doi.org/10.1109/ICDSIS65355.2025.11070740.
D. Pandya, (2024). “Aligning sustainability goals of industrial operations and marketing in Industry 4.0 environment for MSMEs in an emerging economy,” J. Bus. Ind. Mark., vol. 39, no. 3, pp. 581–602, https://doi.org/10.1108/JBIM-04-2022-0183.
Deng, (2025). “Retail Commodity Sales Prediction: A Prophet-LightGBM Combined Machine Learning Approach”. https://doi.org/10.3233/ATDE250122.
Eşki, (2024). “Retail Demand Forecasting Using Temporal Fusion Transformer”. https://doi.org/10.1007/978-3-031-67192-0_21.
G. Athanasopoulos, (2024). “Forecast reconciliation: A review,” Int. J. Forecast., vol. 40, no. 2, pp. 430–456, https://doi.org/10.1016/j.ijforecast.2023.10.010.
G. Theodoridis, (2024). “Retail Demand Forecasting: A Multivariate Approach and Comparison of Boosting and Deep Learning Methods,” Int. J. Artif. Intell. Tools, vol. 33, no. 4, https://doi.org/10.1142/S0218213024500015.
H. Chan, (2024). “A machine learning framework for predicting weather impact on retail sales,” Supply Chain Anal., vol. 5, https://doi.org/10.1016/j.sca.2024.100058.
H. Lian, (2023). “Correlation Analysis of Retail Space and Shopping Behavior in a Commercial Street Based on Space Syntax: A Case of Shijiazhuang, China,” Buildings, vol. 13, no. 11, https://doi.org/10.3390/buildings13112674.
Intelligence in Forecasting the Demand for Products and Services in Various Sectors,” Int. J. Adv. Comput. Sci. Appl., vol. 15, no. 3, pp. 144–156, https://doi.org/10.14569/IJACSA.2024.0150315.
J. R. N. Villar, (2024). “A Systematic Review of the Literature on the Use of Artificial
J. Wang, (2024). “Retail Demand Forecasting Using Spatial-Temporal Gradient Boosting Methods,” J. Comput. Inf. Syst., vol. 64, no. 5, pp. 652–664, https://doi.org/10.1080/08874417.2023.2240753.
Jabbar, (2025).“The interplay between blockchain and big data analytics for enhancing supply chain value creation in micro, small, and medium enterprises,” Ann. Oper. Res., vol. 350, no. 2, pp. 649–671, https://doi.org/10.1007/s10479-024-06415-5.
K. B. Purwadi, (2023). “Credit Risk Prediction System For MSME Loan Process,” 2023. https://doi.org/10.1109/ICIMTech59029.2023.10277810
K. Mishra, (2025). “Data Analytics for Product Segmentation and Demand Forecasting of a Local Retail Store Using Python,” Int. J. Adv. Comput. Sci. Appl., vol. 16, no. 2, pp. 226–232. https://doi.org/10.14569/IJACSA.2025.0160224.
K. Pelekamoyo, (2023). “Considerations of an efficiency-intelligent geo-localised mobile application for personalised SME market predictions,” Meas. Control United Kingdom, vol. 56, no. 9, pp. 1788–1797. https://doi.org/10.1177/00202940231186675
L. A. C. G. Andrade, (2023). “Disaggregated retail forecasting: A gradient boosting approach” Appl. Soft Comput., vol. 141. https://doi.org/10.1016/j.asoc.2023.110283.
L. Feddersen, (2025). “Hierarchical neural additive models for interpretable demand forecasts,” Int. J. Forecast., doi: 10.1016/j.ijforecast.2025.03.003.
M. Elorza, (2024). “Prediction of customer demand for perishable products in retail inventory management, using the hybrid prophet-XGBoost model during the post-COVID-19 period,” Appl. Econ. Lett. https://doi.org/10.1080/13504851.2024.2333995.
M. Kavitha, (2023). “Sales demand forecasting for retail marketing using XGBoost algorithm”. https://doi.org/10.1002/9781394167524.ch9
M. Koren, (2024). “A Machine Learning Approach to Forecasting Demand in Fashion Industry”. https://doi.org/10.1109/AEIS65978.2024.00016.
M. M. Phyu, (2023). “Retail Demand Forecasting Using Sequence to Sequence Long Short-Term Memory Networks”. https://doi.org/10.1109/ICCA51723.2023.10181450.
M. P. R. Mahin, (2025). “Enhancing Sustainable Supply Chain Forecasting Using Machine Learning for Sales Prediction,”. https://doi.org/10.1016/j.procs.2025.01.006.
M. R. Roosdhani, (2023). “From Likes To Sales: Study On Enhancing Social Media Performance for Indonesian Smes,” Int. J. Bus. Soc., vol. 24, no. 3, pp. 1157–1172, https://doi.org/10.33736/ijbs.6407.2023
M. S. Sousa, (2025).“Predicting demand for new products in fashion retailing using censored data,” Expert Syst. Appl., vol. 259, https://doi.org/10.1016/j.eswa.2024.125313.
N. Bhalla, (2025). “Role of AI in MSMEs and its impact on financial performance and business sustainability,” 2025. https://doi.org/10.4018/979-8-3693-6011-8.ch013.
N. Deivanayagampillai, (2025). “Intelligent inventory prediction: A machine learning framework using random forest for inventory forecasting,” Edelweiss Appl. Sci. Technol., vol. 9, no. 4, pp. 1795–1807,https://doi.org/10.55214/25768484.v9i4.6383.
Naskinova, (2024). “Forecasting Strategies in Retail: Utilizing Advanced Machine Learning Methods while Safeguarding Privacy”. https://doi.org/10.1088/1742-6596/2910/1/012008.
Nasseri,(2023). “Applying Machine Learning in Retail Demand Prediction—A Comparison of Tree-Based Ensembles and Long Short-Term Memory-Based Deep Learning”. Appl. Sci. Switz., vol. 13, no. 19, https://doi.org/10.3390/app131911112
Ouamani, (2022). “A Hybrid Model for Demand Forecasting Based on the Combination of Statistical and Machine Learning Methods”. https://doi.org/10.1007/978-3-031-22137-8_33.
R. Fildes, (2022). “Post-script—Retail forecasting: Research and practice,” Int. J. Forecast., vol. 38, no. 4, pp. 1319–1324, https://doi.org/10.1016/j.ijforecast.2021.09.012 .
R. Fildes, (2022). “Retail forecasting: Research and practice,” Int. J. Forecast., vol. 38, no. 4, pp. 1283–1318, https://doi.org/10.1016/j.ijforecast.2019.06.004.
R. Lomas, (2024). “AI-Driven FinTech Solutions for Financial Inclusion: A Study on MSME Sector Empowerment”. https://doi.org/10.1109/ICAC2N63387.2024.10895674
R. S. Jha, (2021). “Influence of Big Data Capabilities in Knowledge Management—MSMEs”. https://doi.org/10.1007/978-981-15-8289-9_50
R. S. Sreerag, (2025). “Sales forecasing of selected fresh vegetables in multiple channels for marginal and small-scale farmers in Kerala, India,” J. Agribus. Dev. Emerg. Econ., vol. 15, no. 3, pp. 618–637, https://doi.org/10.1108/JADEE-03-2023-0075.
R. V Joseph, (2022). “A hybrid deep learning framework with CNN and Bi-directional LSTM for store item demand forecasting”. Comput. Electr. Eng., vol. 103, https://doi.org/10.1016/j.compeleceng.2022.108358.
Riachy, (2025). “Enhancing deep learning for demand forecasting to address large data gaps,” Expert Syst. Appl., vol. 268, https://doi.org/10.1016/j.eswa.2024.126200.
S. Balaji, (2024). “SD-TS-RF (Sales Data-Time Series-Random Forest) Hybrid Machine Learning Model for Enhanced Next-Day Sales Prediction in Supermarkets”. https://doi.org/10.1109/CICN63059.2024.10847500.
S. Mejía, (2024). “A demand forecasting system of product categories defined by their time series using a hybrid approach of ensemble learning with feature engineering”. Computing, vol. 106, no. 12, pp. 3945–3965. https://doi.org/10.1007/s00607-024-01320-y.
S. Shaikh, (2024). “AI business boost approach for small business and shopkeepers: Advanced approach for business”.https://doi.org/10.4018/979-8-3693-1818-8.ch003
S. Singh, (2025). “Analysis of Performance Comparison Of Machine Learning Algorithm for Big Mart Sales Prediction”. https://doi.org/10.1109/OTCON65728.2025.11070898.
T. S. Ho, (2023). “A Blockchain-based Decision Support System for E-commerce Order Prediction”. https://doi.org/10.1109/ICAIIC57133.2023.10067036
T. Stylianou, (2025). “A machine learning approach to consumer behavior in supermarket analytics,” Decis. Anal. J., vol. 16, https://doi.org/10.1016/j.dajour.2025.100600.
V. Pasupuleti, (2024). “Enhancing Supply Chain Agility and Sustainability through Machine Learning: Optimization Techniques for Logistics and Inventory Management,” Logistics, vol. 8, no. 3, https://doi.org/10.3390/logistics8030073.
V. Sandeep, (2025). “Smart Sales Forecasting Machine Learning Models for Demand Prediction in Retail,”. https://doi.org/10.1109/IDCIOT64235.2025.10915120.
Vachkova, (2023). “Big data and predictive analytics and Malaysian micro-, small and medium businesses” SN Bus. Econ., vol. 3, no. 8, doi:10.1007/s43546-02300528-y.
Verma, (2025). “An Optimized Forecasting Approach for Virtual Trade using a Hybrid ARIMA and Cat Boost Algorithm”. https://doi.org/10.1109/ICICT64420.2025.11004931.
W. Wang, (2024). “A IoT-Based Framework for Cross-Border E-Commerce Supply Chain Using Machine Learning and Optimization,” IEEE Access, vol. 12, pp. 1852–1864, https://doi.org/10.1109/ACCESS.2023.3347452
Wu, (2024). “Unveiling consumer preferences: A two-stage deep learning approach to enhance accuracy in multi-channel retail sales forecasting,” Expert Syst. Appl., vol. 257. https://doi.org/10.1016/j.eswa.2024.125066 .
Y. A. B. Ahmad, (2024). “A combinatorial deep learning and deep prophet memory neural network method for predicting seasonal product consumption in retail supply chains”. https://doi.org/10.4018/979-8-3693-4227-5.ch012.
Y. Fu, (2023). “The Value of Social Media Data in Fashion Forecasting,” Manuf. Serv. Oper. Manag., vol. 25, no. 3, pp. 1136–1154. https://doi.org/10.1287/msom.2023.1193.
Y. Liu, (2025). “Predicting retail shop number against roadside tree canopy shade: A national wide demonstration across 148 cities of China,” J. Retail. Consum. Serv., vol. 84, https://doi.org/10.1016/j.jretconser.2025.104255.
Y. Yang, (2025). “Multi-Agent Deep Reinforcement Learning for Integrated Demand Forecasting and Inventory Optimization in Sensor-Enabled Retail Supply Chains,” Sensors, vol. 25, no. 8, https://doi.org/10.3390/s25082428.
Y. Zhang, (2022). “Demand Forecasting: From Machine Learning to Ensemble Learning”. https://doi.org/10.1109/TOCS56154.2022.10015992.
Z. Huang, (2024). “TransTLA: A Transfer Learning Approach with TCN-LSTM-Attention for Household Appliance Sales Forecasting in Small Towns,” Appl. Sci. Switz., vol. 14, no. 15, https://doi.org/10.3390/app14156611.