Consulting Case Study: E-commerce Customer Segmentation

October 19, 2021


Our client is a company manufacturing consumer electronic products like mobile devices, printers, computer monitors and so on, who is leading the electronic goods merchant wholesalers industry for many years. Their advanced data analytics team connected to WeCloudData for the machine learning solution on predicting their top merchandize sales and marketing strategies on their key customers.

The project of E-commerce Customer Segmentation will be discussed in this article.

Problem Statement

The client wants to analyze the customer spending patterns on certain product so as to guide the online promotions.

  1. Segment customers based on spending behaviour, time between multiple purchases.
  2. Identify the loyal customers and gain insights on how to improve the customer retention.

Tools used: SQL Server, Python, Tableau


  1. Data Consolidation
    1. Transactional data
      1. Customer ID, Date of purchase, Transaction id of purchase, Total amount spent, Quantity of product ordered, etc.
    2. Project details
      1. Product Code, Product SKU, Product Description, Specifications of a device, Name of the device etc.
    3. Customer journey information
    4. 3rd party demographic data
      1. Postal code of the delivery address, City & Province on the delivery address, Average Household Income, Population etc.
  2. Model Development

RFM (Recency, Frequency & Monetary) model has been used for this case and the RFM score for each customer were calculated and recorded as new features to the dataset.

Recency (in number of days): How recently a customer has purchased

Frequency (in number of purchases): How often they purchase

Monetary (in CAD): How much the customer spends

K-means clustering was then applied to come up with a RFM clusters separately with a compiled RFM score correspondingly of which the cluster number indicating the high, mid and low value customers.

Snapshot of the key findings

  • Customer segments
  • Purchase Trends by Segments
  • Registered vs. Guest Customer

Achievements & Conclusion

WeClouddata has achieved several outcomes through an advanced analysis and machine learning methodologies:

  • Targeted marketing for the identified customer clusters as per their product preferences and purchase behavior saved 10% of the overall marketing costs.
  • Targeted marketing improved the loyalty and retention of respective client segments, majorly the high-value segment.
  • The overall customer buying experience was improved by understanding the purchase behavior and offering the right product at the right time, which lead to enhanced retention and shortening of repeat purchase cycles.
  • Identified key geographies from where the clusters emerged and improved the marketing and service activity in those areas.

This project expanded the company’s ability in mastering the e-commerce and retail industry use cases.

Join our programs and advance your career in Business IntelligenceData Science

"*" indicates required fields

This field is for validation purposes and should be left unchanged.
Other blogs you might like
WeCloud News
It has FINALLY arrived! Our long awaited Data Engineering diploma program has launched at last. As the leading institute…
by WeCloudData
January 26, 2021
Student Blog
The blog is posted by WeCloudData’s Big Data course student Udayan Maurya. This Live Twitter Sentiment Analyzer helps track…
by Student WeCloudData
May 26, 2020
Blog, Consulting
Machine learning is revolutionizing traffic prediction, enhancing route planning and reducing congestion in urban commuting. Explore advanced algorithms like…
by WeCloudData
March 20, 2024

Kick start your career transformation