PurposeThe purpose of this paper is to expand and analyze deeply customer emotions, concretize the levels of positive or negative emotions with the aim of using machine learning methods, and build a model to identify customer emotions.Design/methodology/approachThe study proposed a customer emotion detection model and data mining method based on the collected dataset, including 80,593 online reviews on agoda.com and booking.com from 2009 to 2022.FindingsBy discerning specific emotions expressed in customers' comments, emotion detection, which refers to the process of identifying users' emotional states, assumes a crucial role in evaluating the brand value of a product. The research capitalizes on the vast and diverse data sources available on hotel booking websites, which, despite their richness, remain largely unexplored and unanalyzed. The outcomes of the model, pertaining to the detection and classification of customer emotions based on ratings and reviews into four distinct emotional states, offer a means to address the challenge of determining customer satisfaction regarding their actual service experiences. These findings hold substantial value for businesses operating in this domain, as the findings facilitate the evaluation and formulation of improvement strategies within their business models. The experimental study reveals that the proposed model attains an exact match ratio, precision, and recall rates of up to 81%, 90% and 90%, respectively.Research limitations/implicationsThe study has yet to mine real-time data. Prediction results may be influenced because the amount of data collected from the web is insufficient and preprocessing is not completely suppressed. Furthermore, the model in the study was not tested using all algorithms and multi-label classifiers. Future research should build databases to mine data in real-time and collect more data and enhance the current model.Practical implicationsThe study's results suggest that the emotion detection models can be applied to the real world to quickly analyze customer feedback. The proposed models enable the identification of customers' emotions, the discovery of customer demand, the enhancement of service, and the general customer experience. The established models can be used by many service sectors to learn more about customer satisfaction with the offered goods and services from customer reviews.Social implicationsThe research paper helps businesses in the hospitality area analyze customer emotions in each specific aspect to ensure customer satisfaction. In addition, managers can come up with appropriate strategies to bring better products and services to society and people. Subsequently, fostering the growth of the hotel tourism sector within the nation, thereby facilitating sustainable economic development on a national scale.Originality/valueThis study developed a customer emotions detection model for detecting and classifying customer ratings and reviews as 4 specific emotions: happy, angry, depressed and hopeful based on online booking hotel websites agoda.com and booking.com that contains 80,593 reviews in Vietnamese. The research results help businesses check and evaluate the quality of their services, thereby offering appropriate improvement strategies to increase customers' satisfaction and demand more effectively.