The operation of smart vending machine systems creates decision-making problems under vendor-managed inventory schemes involving product allocation to vending machine storage compartments, replenishment points of products and replenishment thresholds at vending machines, and vehicle routes for inventory replenishments, all of which have critical effects on system profit. This paper considers the operation of smart vending machine systems in which possible product substitutions occur when customers face stock-outs. A simple, intuitive procedure is presented to estimate substitution probabilities, construct an integrated optimisation mathematical model for the operation problem of smart vending machine systems, and develop a two-phase heuristic based on this mathematical model. The results of computational experiments demonstrate the substantial economic benefit of the smart vending machine system over the conventional system. Sensitivity analysis indicates that certain input variables significantly impact the effectiveness of the smart vending machine system.