PurposeNowadays, in many organizations, products are not delivered instantly. So, the customers should wait to receive their needed products, which will form a queueing-inventory model. Waiting a long time in the queue to receive products may cause dissatisfaction and churn of loyal customers, which can be a significant loss for organizations. Although many studies have been done on queueing-inventory models, more practical models in this area are needed, such as considering customer prioritization. Moreover, in many models, minimizing the total cost for the organization has been overlooked.Design/methodology/approachThis paper will compare several machine learning (ML) algorithms to prioritize customers. Moreover, benefiting from the best ML algorithm, customers will be categorized into different classes based on their value and importance. Finally, a mathematical model will be developed to determine the allocation policy of on-hand products to each group of customers through multi-channel service retailing to minimize the organization’s total costs and increase the loyal customers' satisfaction level.FindingsTo investigate the application of the proposed method, a real-life case study on vaccine distribution at Imam Khomeini Hospital in Tehran has been addressed to ensure model validation. The proposed model’s accuracy was assessed as excellent based on the results generated by the ML algorithms, problem modeling and case study.Originality/valuePrioritizing customers based on their value with the help of ML algorithms and optimizing the waiting queues to reduce customers' waiting time based on a mathematical model could lead to an increase in satisfaction levels among loyal customers and prevent their churn. This study’s uniqueness lies in its focus on determining the policy in which customers receive products based on their value in the queue, which is a relatively rare topic of research in queueing management systems. Additionally, the results obtained from the study provide strong validation for the model’s functionality.