The RFM (Recency, Frequency, Monetary Value) notebook in AI Workbench helps analyze customer order data by scoring customers on three key dimensions: Recency (how recently they purchased), Frequency (how often they buy), and Monetary Value (how much they spend). With these scores stored in customer profiles, marketers can create segments like "Frequent Buyers," "Recent Customers," or "Top Spenders Before the Holidays" to tailor marketing efforts based on purchasing behavior.
The notebook examines order events within a defined timeframe, defaulting to up to 500 order events per customer lifetime with a "revenue" field. It calculates each customer’s most recent purchase, total number of orders, and total amount spent, then assigns scores by grouping customers into five equal buckets (quintiles). Scores range from 1 (bottom 20%) to 5 (top 20%) within each dimension.
For example, a customer with an RFM Recency Score of 1 falls into the bottom 20%—their last purchase was further in the past compared to others. A Frequency Score of 3 means they purchase at an average rate within the segment. A Monetary Score of 5 indicates they are among the highest spenders.
Before you begin
Make sure you have customer order data available in your customers' BlueConic Timelines.
Add an RFM notebook
Navigate to More > AI Workbench > Add notebook.
Choose RFM notebook from the pop-up window.
Give your notebook a name.
Save your settings.
Set the RFM notebook parameters
Select the Parameters tab.
Select the RFM segment that defines the customers whose orders will be used for the analysis.
Select the profile property that stores the most recent order date/time.
(Optional) Enter a specific number of months to look back at customer order event data.
(Optional) Enter the number of days to include before the last execution.
Verify that the profile properties where the RFM values and scores will be stored are the ones you prefer and make changes as necessary.
(Optional) If you'd like to add the average of the recency, frequency, and monetary value scores on the profile, select a profile property for storage.
Click Save.
Run the RFM notebook
Select the Schedule and run history tab.
Click Run now to run the notebook analysis manually.
To schedule the import and export for a future date, activate Enable scheduling.
Click the Settings icon to select how to schedule the notebook by choosing an option from the drop-down list.
Set a time for the import. Click OK.
Save your settings.
View your results
After running the notebook, you can view its output by clicking Preview in the Run history table. Scroll to the bottom to see a graphical representation of the RFM analysis.
Additionally, to display the graph of the most recent run in your RFM notebook, you can add a Notebook - Single cell insight or Notebook - All cells insight to a Dashboard.
FAQs
Does RFM model work for high-cost, low-frequency products (e.g., 1 purchase/year)?
The RFM model helps determine purchase cadence. For low-frequency purchases, BlueConic’s RFM model can use weeks or months instead of days for calculations.
To ensure accuracy, the observation period should be long enough to capture multiple purchases. What qualifies as “low-frequency” depends on your business, but AI Workbench allows you to adjust models accordingly. However, machine learning requires sufficient data. If you only have one transaction per customer per year and a small dataset, consider a different model—such as one that predicts buying behavior based on shared customer attributes.
Can I set the time range for the RFM model dynamically and manually?
Yes, you can set the time range for the RFM model both responsively and explicitly.
BlueConic’s AI Workbench includes a prebuilt RFM notebook that retrieves orders from the past year. Marketers can adjust this time range in the AI Workbench UI. The notebook calculates recency as "10 – the number of months since the last purchase," but this 10-month value can also be customized.
Different businesses may require unique recency formulas based on purchase or conversion cadence. With AI Workbench, a few lines of Python allow you to tailor the calculation to fit your needs.