To start using RFM Analysis you need purchase data linked to your contacts. You can turn the analysis on if:
- you have an active eCommerce integration (such as the Shopify, Magento or Prestashop connector)
- you have a custom integration that periodically synchronizes the order history into magnews. For the analysis to be effective, the data must include at least the creation or update date of the order, an order identifier and the total amount.
-
you do not have detailed order data, but you do have aggregate data kept up to date in contact fields, with at least the date of the last purchase, the number of purchases and the total spend.
If your orders are in a magnews data table, it is worth knowing right away: as well as RFM analysis you will also be able to turn on Churn prediction, which estimates which customers are about to leave you. In that case churn needs two extra pieces of information in the orders, the product ID and the quantity ordered.
Let's get started
After installing the app from Connect, go to Profile Studio, the space dedicated to the database.
From here click on Customer Intelligence and then on New model.
Give the model a name, choose the database that holds the contacts you want to include in the calculation and specify where the purchase history data is:
- Contact Fields, if the three aggregate fields are already in your database: date of last purchase, number of purchases and total spend.
- Data Table, if the detailed order data is stored in a separate table, linked to the contact through a relation field. It is the option offered first, and it is also the only one that lets you use Churn prediction: with the history of the individual orders you get a more complete reading of the behavior of your customers.
Once the model has been created you are taken to its home, where you can complete the configuration and start the calculation.
Define the target and the data source
From the model home, in the main card, click on Settings to complete the configuration. The settings are split into tabs.
In the General tab you can change the name of the model, indicate the currency and define the target of contacts to run the analysis on. For example, you can filter only the contacts imported from Shopify. The Contacts considered by the calculation field shows you the size of the target in real time, based on the filters you have set.
Specifying a currency helps us contextualize the value of the total spend for the Monetary dimension of the analysis.
In the Data source tab, complete the configuration of the input data:
- If you chose the Contact Fields model, you have to specify the three required fields: date of last purchase, number of purchases and total spend.
- If you chose the Data Table, you have to indicate the field that links contacts to purchases. You can also set a query to filter and consider only certain orders.
In the RFM tab you decide which information to save on the contact besides the scores and the cluster.
If you enable the Historicize the last cluster flag, we save the value and the date of the previous cluster in dedicated contact fields for you. This way you can automate campaigns or workflows tied to how the customer evolves, for example the move from prospect to lead or from customer to VIP.
In orders table mode you can enable the Create RFM value contact fields flag to make the exact values of last order date, total spend and number of orders available on the contact record, even when the model does not start from aggregate data.
If your model uses a data table and the AI features are enabled on your instance, you also find the Predictive tab, where you turn on Churn prediction to estimate which customers are about to leave you. You find all the details in the article Churn prediction: predicting and preventing customer churn.
Enable the model and schedule the calculation
A model has to be enabled before the calculation can run on contacts. From the model home use the Settings button, General tab and Enable RFM.
In the models list two columns give you the picture at a glance: RFM tells you whether the RFM calculation is enabled for that model, Churn whether the Churn prediction calculation is active on it as well.
To update the analysis automatically, turn on the periodic calculation: in the model home, on the RFM calculation card, click on Schedule, or on Edit if a schedule is already configured. From here choose the days of the week and the times to run it. For example, you could schedule the update right after the synchronization of the orders, so that the data is always up to date.
Customize the thresholds for R, F and M and configure the clusters
As explained in the article What is RFM analysis and how can it shape your marketing strategy?, the goal of the analysis is to assign every contact a score from 1 to 5 for Recency (R), Frequency (F) and Monetary (M), plus a descriptive Cluster that sums up their purchasing behavior.
magnews saves the values of the RFM analysis in four fields, which you find on the contact home, in the eCommerce tab. To identify the fields the RFM values are saved on, you can click the information icon next to the name of the model.
On top of that, thanks to the Business Insight mode enabled by default on the RFM Cluster field, you see the classification of the contact highlighted on its home and the distribution of the states on the database dashboard.
Customizing the thresholds
RFM models come with default thresholds, but it is advisable to adapt them to the specifics of your business to get more accurate segmentation. The same scale cannot work for an e-commerce of consumer goods, where people buy again every month, and for someone who sells a durable good once every five years.
To customize them, go to the model home and click on Configuration in the Cluster tab.
In the Recency, Frequency and Monetary tabs, you can change the reference thresholds for each score.
To make them easier to enter, the values have to be entered in ascending order. The logic of Recency, however, is the opposite of the one of Frequency and Monetary:
- A low Recency value means that the contact purchased recently, so they will get a high score.
- A low Frequency and Monetary value means that the customer has purchased little and spent little, so the score assigned will be low.
Not sure where to cut Recency, Frequency and Monetary? From the model home click on Generate: the Cluster Assistant of magnews Q uses your data and suggests the most suitable thresholds.
Configuring the clusters
In the Cluster tab, you can:
- Add a new cluster by clicking the + button.
- Delete a cluster by clicking the trash icon.
- Edit an existing cluster by clicking the pencil.
Every cluster can be customized with a name, a description, a color for the charts and combinations of RFM triplets.
⚠️ Important rules:
- Every RFM triplet can be assigned to one cluster only.
- All the triplets must belong to a cluster, to make sure that every contact is correctly assigned to one.
- The Prospect cluster has triplet 000 assigned to it (that is, the customers with no orders) and you can only change its name and color.
Finally, you can sort the clusters and see a preview of the assigned triplets directly from the list, for a quick check.
We recommend starting the calculation manually after you change, add or remove clusters, to avoid inconsistencies in the RFM Cluster field of the contacts and in the reports of the model. These changes are applied only while the calculation runs.
From the chart card you can get the full export (by clicking on Export clusters and then on Export csv) of the cluster table, including all the detailed information for each customer segment. Every row of the table reports:
- The name of the cluster.
- The extended description of the characteristics of the customers included.
- The codes of the assigned triplets (or RFM triplet codes).
- The number of customers belonging to the cluster.
- The percentage of the total customer base (or percentage of the total number of customers).
- The overall monetary value generated.
The export comes in handy when you have to share the snapshot of your customer base with someone who does not work in magnews, or when you want to compare two periods to understand whether customers are moving towards the higher value clusters.
Starting the calculation manually and periodically
As well as the periodic calculation, you can start the calculation manually at any time from the RFM calculation card of the model home, by clicking on Start calculation now. It is what you need after changing thresholds or clusters, because the changes take effect only with a new calculation.
As soon as possible a scheduled activity starts, which runs the calculation and assigns the values of the RFM fields and of the Cluster field to the contacts defined in the target of the model. The same card shows you the date of the last calculation performed and the date of the next scheduled one.
At the end of the calculation you should see a new card showing you a summary of the distribution of the contacts across the clusters.
The Prospect cluster is not shown in the chart, to give more visibility to the contacts who are actual customers, but you find it in the table next to it for a numeric reference on the total of the contacts.
And now that you have the clusters?
The cluster of every contact, like the three scores, is a contact field to all intents and purposes. From here on you use it where you work every day:
- in audiences, to build groups such as the top spender customers to reward or the ones at risk to win back;
- in workflows, to start a communication when a contact changes cluster, if you have enabled Historicize the last cluster;
- in personalizations, to adapt content and offers to the value of the customer;
- in reports, comparing the distribution of the clusters over time to understand whether your campaigns are moving customers in the right direction.
If you want to add prediction to the analysis, and know not only how much a customer is worth but also how much you risk losing them, continue with Churn prediction: predicting and preventing customer churn.