This study presents an applied case of purchasing process optimization in a company dedicated to trading spare parts for heavy machinery. The research focused on high-rotation items, where three main inefficiencies were identified: the absence of demand forecasting, the lack of a structured inventory policy, and the manual handling of discrepancies caused by supplier part substitutions. To address these issues, an integrated solution was designed, combining demand forecasting, inventory management, and process automation. Machine learning models were applied to historical consumption data to estimate future demand and define essential stock parameters, including safety stock and reorder levels. Additionally, a Robotic Process Automation (RPA) bot was developed to standardize and automate the resolution of material discrepancies within the purchasing workflow. The proposal was validated through pilot tests in real operational settings and simulated scenarios, demonstrating significant improvements in efficiency and supplier compliance. The integration of forecasting, inventory control, and automation effectively reduced manual workload and enhanced purchasing performance. Overall, the results highlight the practical potential of data-driven and automated solutions to strengthen decision-making and operational reliability in industrial supply chains.