How to segment your customers and increase sales with RFM analysis

From “big spenders” to “almost lost,” all customers have diverse needs and desires, and respond to your marketing campaigns in different ways.

As your business grows, segmenting your customers can significantly improve your marketing performance, making campaigns more relevant to more of your customers, ultimately increasing response rates and sales.

What is RFM Analysis?

RFM analysis is a customer segmentation technique that uses past purchase behavior to segment customers.

RFM
 - Recency (R): Time since last purchase
 - Frequency (F): Total number of purchases
 - Monetary value (M): Total monetary value

RFM analysis was first used by the direct mail industry more than four decades ago, yet it is still an effective way to optimize your marketing.

Benefits of RFM Analysis

  • Increased customer retention
  • Increased response rate
  • Increased conversion rate
  • Increased revenue

Customer Segmentation with RFM Analysis

To perform RFM analysis, we divide customers into four equal groups according to the distribution of values for recency, frequency, and monetary value.

Four equal groups across three variables create 64 (4x4x4) different customer segments, which is a manageable number.

Note that you can use quintiles (five equal groups) for increased granularity, but managing and acting on 125 segments (5x5x5) is significantly more challenging.

Recency (R) Frequency (F) Monetary Value (M)

For example, let’s look at a customer who:

  • is within the group who purchased most recently (R=1)
  • is within the group who purchased most quantity (F=1)
  • is within the group who spent the most (M=1)

This customer belongs to RFM segment 1–1–1 (Best Customers), (R=1, F=1, M=1)

Below is a table with key RFM segments:

How to Perform an RFM Analysis

Segmenting your customers database

To perform an RFM analysis, you need all your customer purchase history data. This is a file with all the transactions ever made by all of your customers.

This data is usually exported from your accounting software or a transactional database.

Step 1: Download the RFM-analysis scripts and sample files from Github.

Step 2: Prepare a .CSV file with all the orders, or use the template sample-orders.csv. Use the same column names!

Step 3: Execute the RFM-analysis.py script in the directory where you placed the orders file. The script takes three arguments:

>python RFM-analysis.py -i sample-orders.csv -o rfm-segments.csv -d “2014–04–01”
  • orders file (-i sample-orders.csv)
  • output file with the RFM segmentation (-o rfm-segments.csv)
  • the date the orders table was exported (-d “YYY-mm-dd”)

This will create the RFM segments in a CSV file named rfm-segments.csv, or whatever you defined with the -o option.

Interpreting the RFM Analysis

Etha K. belongs to the “Best Customers” segment; she purchased recently (R=1), frequently buys (F=1), and spent the most (M=1).

Jerold Sporer is about to enter the “Lost Cheap Customers” segment; he hasn’t purchased in a while (R=3), bought few (F=4), and spent little (M=4).

Annie Hettinger is a type of “Almost Lost” customer. She hasn’t made a purchase for some time (R=3), she bought somewhat frequently (F=2), but she is in the group who spent the most (M=1).

With these simple RFM analysis steps, you segmented your customer database. Now, create a team activity to browse through the RFM segments and identify which are important for your business.

Or, create a custom Tableau dashboard, like the RFM analysis dashboard below, to visualize your data and enhance your decision making!

Click on the image to open the interactive dashboard

Take Your Email Marketing to a New Level with RFM Segmentation

Now it is time to enrich your customer email list with the RFM segmentation and take your email marketing to a higher level. Here is an RFM analysis step-by-step example:

  1. Select an RFM segment to focus on (Best Customers, Almost Lost, etc.).
  2. Create an hypothesis as to what would work best for this RFM segment.
  3. Define a goal for this email campaign and RFM segment.
  4. Setup email marketing conversion tracking.
  5. Create an alternate email version, tailored to the RFM segment on which you are focusing.
  6. Create an A/B testing email campaign, where the control group receives a generic version and the experiment group receives the RFM segment tailored email.
  7. Analyze results and iterate; do more of what works and less of what doesn’t.

Visit A/B testing instructions for Mailchimp and Vertical Response, or search this information in your favorite email marketing platform.

Closing Notes

RFM is relatively simple technique that could drastically improve your marketing performance.

Keep your RFM customer segmentation updated by automating the process; the RFM Analysis Python script should get you most of the way there. I recommend that you update your RFM segmentation on a daily basis.

Share your RFM segmentation results or reach out if you need assistance.