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.

๐Ÿ”— Related Prompts

๐Ÿ“Š Data & Analytics intermediate

Write Complex SQL Queries

Generate optimized SQL queries for complex analysis with CTEs, JOINs, and performance tips.

๐Ÿ“Š Data & Analytics intermediate

Python Data Analysis Script

Generate a complete Python data analysis pipeline with cleaning, visualization, and insights.

๐Ÿ“Š Data & Analytics advanced

Design a Robust ETL Pipeline Architecture for Your Data Platform

Design a complete ETL pipeline architecture with extraction, transformation, loading strategies, error handling, and governance.

๐Ÿ“Š Data & Analytics intermediate

Create a Comprehensive Data Quality Checklist for Your Dataset

Generate a tailored data quality checklist with SQL validation queries, severity levels, and a scoring framework for any dataset.

๐Ÿ“Š Data & Analytics advanced

Analyze and Interpret A/B Test Results with Statistical Rigor

Get a complete A/B test analysis with statistical significance, power analysis, validity checks, and a clear ship decision.

๐Ÿ“Š Data & Analytics advanced

Design a Scalable ETL Pipeline Architecture for Your Data Platform

Design a production-ready ETL pipeline architecture with tool recommendations, error handling, and scalability strategies.