What problem does it solve? Ecommerce teams often treat all customers identically because raw order data is hard to turn into actionable segments. This Skill converts order history into RFM scores, cohort retention matrices, and churn risk flags so retention and marketing teams can target the right customers before they lapse. ## Core Features & Use Cases - RFM Segmentation: Score customers on recency, frequency, and monetary value using Shopify segments, Klaviyo, Metorik, or SQL with NTILE(5) window functions, then classify them into named segments like champions, at_risk, and lost. - Cohort & Channel Analysis: Build month-by-month retention grids and compare 12-month CLV by acquisition channel using first-touch attribution in PostgreSQL. - Churn Prediction: Compute churn risk scores with a linear formula for single-purchase customers and a z-score sigmoid for repeat buyers, with seasonal-buyer handling to avoid false alarms. - Use Case: A DTC brand preparing for a loyalty program launch runs the RFM pipeline nightly, exports champion and at-risk segments with email addresses to Klaviyo, and triggers win-back flows for customers flagged before they churn. ## Quick Start Ask the AI to build an RFM scoring SQL pipeline that segments your customers and identifies high-value at-risk customers for a win-back campaign.