End-to-End E-Commerce Customer Segmentation & RFM Analytics Project! 🛒📊
I took a raw online retail dataset through a full data lifecycle—from intensive Python ETL processes to advanced database architecture and strategic business storytelling.
🛠️ Technical Workflow & Implementation:
1️⃣ Python/Pandas: Handled over 135K missing Customer IDs by isolating guest checkouts to ensure RFM accuracy. Eliminated 5,000+ duplicate records, resolved text formatting conflicts, and engineered clean date/hour features.
2️⃣ SQL Server (T-SQL): Hosted data in a local DB. Implemented layered CTEs and advanced NTILE(5) Window Functions to automatically classify customers into precise 1-to-5 tiers based on Recency, Frequency, and Monetary metrics. Used complex CASE WHEN statements to map 3-digit RFM codes into executive-friendly business segments.
3️⃣ Power BI: Designed a premium, non-cluttered Executive Dashboard utilizing strategic Cross-Filtering relationships. Engineered comparative Horizontal Bar charts, dynamic Donut segment distributions, continuous Line performance trends, and precise KPI Gauge counters.
🔑 Key Portfolio Insights & Executive Summary:
• Retention Alarm & High Churn Risk: The overall store average recency stands at 92.23 days, combined with the fact that 'About To Sleep' is the largest customer segment by count. This indicates that while the store successfully acquires customers, it struggles with long-term retention.
• Extreme Q4 Seasonality: The sales performance trend reveals a massive, vertical spike in sales during October, November, and December, with November generating exponential revenue compared to the rest of the year due to holiday shopping.
• Low Purchase Frequency Baseline: The average customer purchases only 4.25 times over the entire timeline, showing that repeat-buying habits are heavily seasonal rather than consistent.
💡 Strategic Recommendation:
The marketing team must scale paid advertising starting mid-September and October to capture leads early and build retargeting audiences before holiday ad costs peak. Implement an automated marketing workflow that triggers a personalized reactivation coupon exactly 90 days after a customer's last purchase to stop them from churning.
📂 For more deep insights, documentation, marketing action plans, and full clean scripts, check my GitHub repository:
https://github.com/AbdelhaqTheAnalyst/E-Commerce-Customer-segmentation-RFM