Site icon crawstat.

Customer RFMT Metrics & Segmentation

Today, we’ll construct recency, frequency, monetary value, and tenure (RFMT) metrics and segments using Brazilian ecommerce marketplace Olist’s sales transactions data dating from October 2016 to October 2018.

RFMT metrics can be used to segment customers in order to identify which customers are responsive to marketing, engaged, contribute to churn, high spenders vs. low-value purchasers, or have upselling or cross-selling potential. Understanding segments can help us better tailor product, sales, and marketing activities and investments. For example, at-risk customers may have high monetary value and frequency, but weak recency and could be targeted with promotions and renewals. In our case, we’ll define our metrics as:

To construct RFMT metrics, we’ll need order id, purchase history, order status, delivery dates, and spend details by unique customer id. Olist’s data schema shows that the orders data set contains unique customer ids, order status, and delivery dates, while the payments data set contains spend. Let’s merge these two data sets together on order id to get what we need.

We’ll use RFMT metrics to segment customers, first manually by building RFMT scores along with arbitrary cutoffs and then using K-means clustering to uncover segments in the data (an alternative to K-means would be non-zero matrix factorization (NMF)). We’ll then compare our 4 resulting segments and relative importance of segment metrics.

Future areas to explore:

Code below and in more readable form on colab and GitHub.

Exit mobile version