Build an RFM Customer Segmentation Model for Targeted Marketing
Create a complete RFM customer segmentation model with scoring logic, code implementation, and marketing strategies.
๐ The Prompt
You are a customer analytics expert specializing in segmentation and CRM strategy. I need you to build a complete RFM (Recency, Frequency, Monetary) segmentation model for my business.
**Business Context:**
- **Industry:** [INDUSTRY, e.g., e-commerce, SaaS, retail]
- **Product/Service:** [PRODUCT_DESCRIPTION, e.g., online fashion store, B2B software platform]
- **Customer Base Size:** Approximately [CUSTOMER_COUNT] active customers
- **Transaction Data Available:** [DATA_FIELDS, e.g., customer_id, purchase_date, order_value, product_category]
- **Analysis Time Window:** Last [TIME_WINDOW, e.g., 12 months]
- **Average Purchase Cycle:** [CYCLE, e.g., customers typically buy every 30-60 days]
Please deliver the following:
1. **RFM Metric Definitions:** Define how to calculate Recency (days since last purchase), Frequency (number of transactions), and Monetary (total or average spend) for this specific business context. Include edge cases like returns, refunds, and multi-item orders.
2. **Scoring Methodology:** Recommend a scoring approach (quintile-based 1-5 scoring, percentile-based, or custom thresholds) and provide the specific breakpoint logic. Justify your choice for this business type.
3. **Segment Definitions:** Create a segment mapping table with at least 8 distinct customer segments. For each segment, provide:
- Segment name (e.g., 'Champions', 'At-Risk', 'Hibernating')
- RFM score ranges that define the segment
- Behavioral description of customers in this segment
- Estimated percentage of a typical customer base
4. **SQL/Python Implementation:** Write production-ready code in [LANGUAGE, e.g., SQL, Python/Pandas] to calculate RFM scores and assign segments from a transactions table with schema: [TABLE_SCHEMA].
5. **Marketing Action Plan:** For each segment, recommend 2-3 specific marketing strategies (email campaigns, discounts, loyalty rewards, win-back sequences) with suggested messaging tone and offer types.
6. **KPIs & Monitoring:** Define metrics to track segment migration over time and measure the effectiveness of targeted campaigns.
7. **Limitations & Enhancements:** Discuss limitations of basic RFM and suggest advanced extensions (e.g., adding Engagement score, CLV prediction, combining with behavioral clustering).
Format the segment table as a clear grid and include code comments for the implementation.
๐ก Tips for Better Results
Include your actual table schema and column names so the generated code can be used with minimal modification.
Specify your business's natural purchase cycle โ an RFM model for a grocery store differs dramatically from one for a car dealership.
Consider whether B2B account-level or B2C individual-level segmentation is more appropriate for your context.
๐ฏ Use Cases
Marketing analysts, CRM managers, and data analysts should use this when building or refreshing customer segmentation to drive personalized campaigns and reduce churn.