In the contemporary business landscape, the analysis of customer behavior stands as a pivotal factor in enhancing service quality and securing a competitive edge. The segmentation of customers through cluster analysis becomes imperative, given its role in discerning distinct customer profiles. These insights wield considerable influence over customer retention and satisfaction, thereby contributing to overall profitability. This approach facilitates the customization of marketing strategies to align with the diverse needs of potential customers. Previous studies predominantly focused on modeling purchasing behavior by observing tangible actions, often neglecting crucial product characteristics. They commonly applied the Recency, Frequency, and Monetary (RFM) measure across entire product ranges. In this study, we introduced a novel perspective by integrating multiple attribute decision-making methods and employing Particle Swarm Optimization to devise an innovative feature selection process. To effectively discern patterns in customer behavior, we combined the RFM model with ensemble machine learning techniques, including Neural Networks, Decision Tree, and Support Vector Machine. Our experimentation involved a comparative analysis with K-means and Fuzzy C-means, utilizing the online retail dataset from the UCI Machine Learning Repository. The findings suggest that our proposed approach holds significant potential, particularly in aligning inventory management with customer behaviors. This method offers marketers a valuable tool for real-world customer segmentation, leveraging clustering results to formulate pragmatic marketing plans.