Breadcrumbs

RFM Scorer

The RFM Scorer module calculates Recency, Frequency, and Monetary (RFM) scores for users based on their transaction history, enabling sophisticated customer segmentation and targeted marketing strategies through automated customer lifecycle classification.

Understanding RFM Scoring

RFM analysis is a proven marketing technique that segments customers based on three key behavioral dimensions:

  • Recency (R): How recently a customer made a purchase

  • Frequency (F): How often a customer makes purchases

  • Monetary (M): How much money a customer spends on average

Each dimension is scored on a scale of 1-3, where 3 represents the best performance:

  • Score 3: Top performers (most recent, most frequent, highest spending)

  • Score 2: Average performers (moderate recency, frequency, spending)

  • Score 1: Underperformers (least recent, least frequent, lowest spending)

The combination of these three scores (e.g., 3-2-1) creates a comprehensive customer profile that enables targeted marketing strategies.

Key Requirements

Before setting up the RFM Scorer Module, ensure that:

  1. You have transaction data available with userId, dateTime, and optionally transactionAmount columns.

  2. You have user data containing userId and email columns for output enrichment.

  3. Your transaction data covers a sufficient historical period for meaningful recency and frequency calculations.

  4. If using monetary scoring, ensure your transaction data includes the transactionAmount column.

How to Set Up the RFM Scorer Module?

1. Configure General Settings

  • Schedule: Select the cron schedule for when the module should run using the cron builder.

  • System Resources: Configure CPU and memory resources for the module (default: 500m CPU, 4Gi memory).

2. Boundary Calculation Methods

The module offers two approaches for determining score boundaries:

Manual Method

Use this when you have specific business knowledge about your customer base and want to set custom thresholds based on business rules.

Automatic Method

Use this for immediate deployment with data-driven boundaries. The module automatically calculates optimal thresholds using percentiles, making it ready to use without business-specific calibration.

3. Configure Recency Scoring

Recency measures how recently a customer made their last purchase (lower days = higher score).

Manual Configuration:

  • Border Interval 1: Maximum days for Score 3 (e.g., 30 days)

    • Users who purchased within this period receive Score 3

  • Border Interval 2: Maximum days for Score 2 (e.g., 90 days)

    • Users who purchased within this period (but after Border Interval 1) receive Score 2

    • Users who purchased beyond this period receive Score 1

Example: Border Interval 1 = 30, Border Interval 2 = 90

  • Score 3: Last purchase ≤ 30 days ago

  • Score 2: Last purchase 31-90 days ago

  • Score 1: Last purchase > 90 days ago

Automatic Configuration:

  • Border Percentile 1: Percentile for Score 3 threshold (default: 0.5)

  • Border Percentile 2: Percentile for Score 2 threshold (default: 0.95)

The module calculates the time gaps between consecutive purchases for each user and uses these percentiles to automatically determine boundaries. You can adjust these percentile values based on your desired segment sizes.

4. Configure Frequency Scoring

Frequency measures how often a customer makes purchases within a specified time window before their last purchase (higher count = higher score).

Manual Configuration:

  • Window Days: Period to count transactions before the last transaction (e.g., 365 days)

  • Border Window 1: Minimum transactions for Score 2 (e.g., 3 transactions)

  • Border Window 2: Minimum transactions for Score 3 (e.g., 8 transactions)

Example: Window = 365 days, Border Window 1 = 3, Border Window 2 = 8

  • Score 3: ≥ 8 transactions in last 365 days before the last transaction

  • Score 2: 4-7 transactions in last 365 days before the last transaction

  • Score 1: ≤ 3 transactions in last 365 days before the last transaction

Automatic Configuration:

  • Window Days: Period to count transactions before the last transaction (e.g., 365 days)

  • Border Percentile 1: Percentile for Score 2 threshold (default: 0.5)

  • Border Percentile 2: Percentile for Score 3 threshold (default: 0.95)

The module analyzes transaction counts within the window period and uses percentiles to automatically set boundaries.

5. Configure Monetary Scoring

Monetary measures the average order value of a customer's purchases (higher value = higher score).

Manual Configuration:

  • Border Interval 1: Minimum average order value for Score 2 (e.g., €75)

  • Border Interval 2: Minimum average order value for Score 3 (e.g., €150)

Example: Border Interval 1 = €75, Border Interval 2 = €150

  • Score 3: Average order value > €150

  • Score 2: Average order value €75-€150

  • Score 1: Average order value < €75

Automatic Configuration:

  • Border Percentile 1: Percentile for Score 2 threshold (default: 0.33)

  • Border Percentile 2: Percentile for Score 3 threshold (default: 0.67)

Note: If the transactionAmount column is missing, monetary scores will be set to null and the module will use RF (Recency-Frequency) labeling instead of full RFM labeling.

6. Boundary Storage and Optimization

The module intelligently manages boundary calculations:

  • Boundary Storage: All calculated boundaries are stored with their calculation method and parameters

  • Smart Recalculation: For automatic method, the module compares current percentile values with previously stored values

  • Efficiency: If percentiles haven't changed, existing boundaries are reused

  • Transparency: Boundary history is maintained for auditing and analysis

7. Set Up CDP Integration (Optional)

To deliver the RFM scores to the Customer Data Platform:

  • Delivery Method: Choose between 'none' or 'batch'

  • CDP Tenant ID: Your organization's unique identifier (found in CDP > Settings > API tokens)

  • CDP Event Type ID: The identifier for the type of event (found in CDP > Internal Sources > Raw Sources)

  • CDP Access Token: Authentication token for secure data transmission (found in CDP > Settings > API tokens)

RFM Label Mapping

The module automatically assigns descriptive labels based on score combinations:

RFM Label Mapping

The module automatically assigns descriptive labels based on score combinations:

RFM Label

Description

Recency Score

Frequency Score

Monetary Score

Champion

Best customers: recent, frequent, high-value

3

3

3

3

3

2

3

2

3

3

3

-

Loyal

Consistent customers with good engagement

3

3

1

3

2

1

3

2

2

2

3

2

2

3

3

3

2

-

2

3

-

Recent

Recently active but need frequency building

3

1

1

3

1

2

3

1

3

2

2

2

2

2

3

3

1

-

Needs Attention

Mixed performance, requires intervention

2

2

1

2

1

3

1

3

2

1

3

3

1

2

3

2

2

-

At Risk

Declining engagement, risk of churn

2

3

1

2

1

1

2

1

2

1

3

1

1

2

2

1

2

-

1

3

-

2

1

-

Inactive

Low engagement across all dimensions

1

2

1

1

1

1

1

1

2

1

1

3

1

1

-



Example Output

Using automatic method with the following calculated boundaries:

  • Recency: Score 3 ≤ 25 days, Score 2 ≤ 75 days

  • Frequency: Score 3 > 6 transactions, Score 2 > 2 transactions (365-day window)

  • Monetary: Score 3 > €125, Score 2 > €60

userId

recencyScore

frequencyScore

monetaryScore

rfmLabel

daysSinceLastTransaction

transactionCount

averageOrderValue

user123

3

2

3

Loyal

15

4

156.75

user456

2

3

2

Loyal

45

8

89.50

user789

3

3

3

Champion

5

12

245.30

user101

1

1

1

Inactive

180

1

45.20

user202

3

1

2

Recent

10

2

85.00

Analysis of example results:

  • User123 (3-2-3): Recent purchase (15 days), moderate frequency (4 transactions), high value (€156.75) → Loyal

  • User456 (2-3-2): Less recent (45 days) but very frequent (8 transactions), moderate value (€89.50) → Loyal

  • User789 (3-3-3): Excellent across all dimensions → Champion

  • User101 (1-1-1): Poor performance across all dimensions → Inactive

  • User202 (3-1-2): Very recent (10 days) but low frequency, moderate value → Recent

In the output, there are additional columns: email, dateTime, id, ModuleInstanceId, ModuleInstanceImplementationId, ModuleInstanceImplementationType.

Functionality of the RFM Scorer Module

Upon successful setup, the RFM Scorer Module:

  • Boundary Management: Calculates or applies scoring boundaries based on your chosen method, storing them for consistency and efficiency

  • Score Calculation: Computes recency, frequency, and monetary scores for each user based on their transaction history

  • Intelligent Updates: Compares new scores with previous runs and only processes users with changed scores or labels

  • Label Assignment: Automatically categorizes users into actionable segments (Champion, Loyal, At Risk, etc.)

  • Flexible Scoring: Handles both full RFM scoring (with monetary data) and RF scoring (without monetary data)

  • Performance Optimization: Reuses existing boundaries when parameters haven't changed (automatic method)

  • Comprehensive Output: Generates detailed user profiles with scores and classification labels

  • Integration Ready: Optionally delivers scores to your CDP for immediate activation in marketing campaigns

Common Use Cases

The RFM Scorer Module supports various customer lifecycle management and marketing automation scenarios:

  • Customer Segmentation: Automatically classify customers into Champions, Loyal, At Risk, and Inactive segments for differentiated treatment strategies.

  • Retention Campaigns: Identify "At Risk" and "Needs Attention" customers for proactive retention efforts before they churn.

  • VIP Programs: Reward "Champions" and high-scoring "Loyal" customers with exclusive access, early releases, and premium experiences.

  • Win-Back Campaigns: Target "Inactive" customers with compelling offers and personalized messaging to re-engage them.

  • Budget Optimization: Allocate marketing spend efficiently by focusing high-investment strategies on Champions and cost-effective approaches on lower-scoring segments.

  • Lifecycle Marketing: Design automated email sequences that adapt based on RFM transitions (e.g., welcome series for Recent customers, re-engagement for At Risk).

  • Cross-sell/Upsell: Prioritize high-value opportunities by targeting Champions and Loyal customers with complementary products and premium offerings.

  • Churn Prevention: Monitor customers moving from higher to lower RFM segments to trigger intervention campaigns.

  • Acquisition Modeling: Use RFM profiles of existing Champions to create lookalike audiences for more effective customer acquisition.

  • Personalization: Tailor website experiences, product recommendations, and communication frequency based on RFM segment characteristics.