With the big e-commerce boom going on, it is easy to sell your products online. Yet the hard part is to retain customers or to make them happy. Do you know which of your customers buy more, who simply window-shop or are frequent visitors but just can’t make up their minds? Figuring these things out can make your business not just sustain but flourish.

To know your customers better we need to know few key information like how frequently do they visit the website, how much do they buy approximately or how recently have they visited. These few points can help us create a unique RFM score for each customer and help you to cater to their wants in a specific and focused way.

RFM is an analytical tool where you segregate your customers based on three basic features namely:

Recency :
which is the R of RFM, tells us how recently the customer has bought a product.

Frequency :
the F, shows us how frequently a customer buys your products.

Monetary :
the M, is the amount of the cart the customer has bought. This shows us how much revenue does a particular customer generates.

RFM analysis is essentially done on the transactional data. And the best feature of this index is, that it can be updated and altered to suit your needs. For instance, here we can add another ‘Visit Recency’ factor, which will give us how recently the customer has visited your website, irrespective of whether he bought anything or not. Based on Recency and ‘Visit Recency’ we can then figure out if the person has visited recently but never bought anything. Similar trend in frequency can give rise to questions like why a person visited 5 times before he bought a particular item or even after 4 visits he didn’t buy anything at all.

So once we get the data of recency (in days), frequency (in number) and monetary (in rupees) we then segregate the customers into separate buckets. If our data is clean and uniform we can simply use percentile method to put them in equal sized buckets. We use a standard of 3 buckets where customers at large show distinct features. But if the data permits we can make more divisions. Or based on the data trend we can define rules manually to put them in different buckets. For instance my data has supposedly 60,000 customers with recency varying from 1 day earlier to 3 months earlier. I can segregate them equally with 20,000 customers in each bucket or use data analytics to segregate them in buckets of visited-within-1week, visited-within-1month and visited-after-1month buckets.

Once the different buckets are formed, we then give each bucket a score of 3, 2 or 1 signifying high, medium and low values respectively.

For instance, customers generating highest monetary value will have score 3, and then 2 followed by the ones who buy in very small amounts (1). Similarly the people who visited most recently will have score 3, then 2 and the rest will be scored 1. Thus for each customer we will have a specific RFM score where 333 will mark the best customers who are most frequent, have visited very recently and have made the largest purchase. Again 111 score will point to those who are at the bottom of the ladder and needs attention. All the rest like 321, 112 will fall somewhere in between.

The moment we get the scores for each customer we can label them into different groups and design specific marketing campaigns, or research on why a particular group is behaving the way it is. Over time we can also figure out if customers are moving from one group to another and the positive (or negative) reinforcement behind that. The business can see this data in real time through any visualization tool and take decisions immediately.

Here in our example we have used Tableau to show the RFM scores of different customers for an e-commerce company. The whole dashboard looks somewhat like this:

This is just a prototype and as per requirement much detailing can be done on such visualization. Let me go through each chart here.

This is the heat map at the upper left corner. This matrix of Monetary * Frequency Score helps us evaluate what percentage of customers falls in which behavioral pattern. 12.42% of our customers love our products and visit often, while 23.21% (the largest share) seem the least interested. Here the different shades of blue (legend) emphasize on which section has the largest or smallest share. (The upper right cell having the smallest share is the lightest blue in color).

On hovering the mouse over these segments shows further information on each, like, 23.31% actually constitutes how many customers.

The next is our bar chart which shows the number of customers distributed based on tenure. Tenure is the length of time the customer is associated with us. By a preliminary look we can figure out how many long term customers we have.

For more clarity, the tool tip will show exactly what percentage of total does 1 year tenure customers constitute. If we need, we can also divide them into 1-year, 5-year or 10-year loyalists to take specific action for each (say, a special discount offer for our long-term customers).

This is a tabular data of the transactions made by each customer. If we need to see the detail data of a particular customer for a particular day then we can filter the same in this table. Here Customer Status shows those customers as active who have made at least one transaction in last 3 months (again this condition is subject to business requirement).

Let’s delve deeper into the customer segmentation portion. Once we have our RFM scores we can create different segments of customers based on those scores. For the ‘Champions’ all top scores will be assigned (333). To another segment we apply the scores as per the same logic. The logic that we have implemented below is given here.











 Good Customers





 Lost Customers





 Attention Required






 121,122,123,131,132,133,221,222,223,231,321,331, 311,312,313


There are no overlaps here, the same customer cannot be part of two or more segments. Once this is configured we put the same in the visualization.

This chart shows in which segment how many customers fall and what is their percentage revenue generated. Here the tooltip gives insight into what percentage of total customers fall in each of these segments.

Similarly the below chart depicts on an average how recent the customers in a segment are.

All the data in the dashboard can be altered with the filters at the right hand side of the screen. Selecting any option from the dropdown will enable you to see the data on the full screen for that value only. Here we have provided filters on customer type, segment, status, name and on the different scores. We can also add any other filter we require. In fact, we can add them in such a way that will affect only selected charts and not all.

Once we figure out how each customer segment performs we can send them targeted campaigns and get their attention. The customers, on getting promotional advertisements in line with their requirements, will be prompted to buy more and be pleased with the tailored service.