Customer Segmentation in Online Retail
By: Rahul Khandelwal
Tags: Customer Segmentation, Python, Clustering, Cohort Analysis, Marketing Strategies

In this article, I am going to write about how to carry out customer segmentation and other related analysis on online retail data using python.

This is going to get a bit long, so feel free to go through some sections at a time and come back again.

Before going into the definition of customer segmentation, let us take a look at how online retail works and how the associated data would look like. When a person goes into a retail store and purchases a few items, the following basic data points should be generated:

Customer Name/Customer ID Address/Contact number of the customer (Demographic information) Invoice number Product name and product code Quantity Unit Price Date and time of the transaction Coupon Code (if applicable) Discount amount (if applicable)

Now that we have developed a basic idea about how retail data looks like, let us think about how a company should think in order to make effective marketing policies.

For a small company, the customer base is usually quite small and individually targetable. But, as a business grows in size, it will not be possible for the business to have an intuition about each and every customer. At such a stage, human judgments about which customers to pursue will not work and the business will have to use a data-driven approach to build a proper strategy.

For a medium to large size retail store, it is also imperative that they invest not only in acquiring new customers but also in customer retention. Many businesses get most of their revenue from their ‘best’ or high-valued customers. Since the resources that a company has, are limited, it is crucial to find these customers and target them. It is equally important to find the customers who are dormant/are at high risk of churning to address their concerns. For this purpose, companies use the technique of customer segmentation.

One axiom frequently used in business and economics is the Pareto principle. This can be applied to understanding the revenue stream of a company as well.

As per the Pareto Principle, 80% of outcomes result from 20% of all the causes of any given event.

In business terms, we can say that 20% of customers contribute 80% share of the total revenue of a company. That’s why finding this set of people is important. I will explain the importance of customer segmentation in a detailed manner later in this article itself.

Let us now try to understand what customer segmentation is and why is it such an effective tool for developing an effective strategy. Then, we will work on how to perform segmentation.

Understanding Customer Segmentation

Customer segmentation is the process of separating customers into groups on the basis of their shared behavior or other attributes. The groups should be homogeneous within themselves and should also be heterogeneous to each other. The overall aim of this process is to identify high-value customer base i.e. customers that have the highest growth potential or are the most profitable.

Insights from customer segmentation are used to develop tailor-made marketing campaigns and for designing overall marketing strategy and planning.

A key consideration for a company would be whether or not to segment its customers and how to do the process of segmentation. This would depend upon the company philosophy and the type of product or services it offers. The type of segmentation criterion followed would create a big difference in the way the business operates and formulates its strategy. This is elucidated below.

Zero segments: <Undifferentiated approach> This means that the company is treating all of its customers in a similar manner. In other words, there is no differentiated strategy and all of the customer base is being reached out by a single mass marketing campaign. One segment: <Focussed approach> This means that the company is targeting a particular group or niche of customers in a tightly defined target market. Two or more segments: <Differentiated approach> This means that the company is targeting 2 or more groups within its customer base and is making specific marketing strategies for each segment. Thousands of segments: <Hyper segmentation approach> This means that the company is treating each customer as unique and is making a customized offer for each one of them.

Once the company has identified its customer base and the number of segments it aims to focus upon, it needs to decide the factors on whose basis it will decide to segment its customers.

Factors for segmentation for a business to business marketing company:

Industry Number of employees Location Market cap/Company size Age of the company

Factors for segmentation for a business to consumer marketing company:

Demographic: Age, Gender, Education, Ethnicity, Income, Employment, hobbies, etc. Recency, Frequency, and Monetary: Time period of the last transaction, the frequency with which the customer transacts, and the total monetary value of trade. Behavioral: Previous purchasing behavior, brand preferences, life events, etc. Psychographic: Beliefs, personality, lifestyle, personal interest, motivation, priorities, etc. Geographical: Country, zip code, climatic conditions, urban/rural areal differentiation, accessibility to markets, etc.

Why segment your customers?

Photo by Ivan Bajalovic on Unsplash

Customer segmentation has a lot of potential benefits. It helps a company to develop an effective strategy for targeting its customers. This has a direct impact on the entire product development cycle, the budget management practices, and the plan for delivering targeted promotional content to customers. For example, a company can make a high-end product, a budget product, or a cheap alternative product, depending upon whether the product is intended for its most high yield customers, frequent purchasers or for the low-value customer segment. It may also fine-tune the features of the product for fulfilling the specific needs of its customers.

Customer segmentation can also help a company to understand how its customers are alike, what is important to them, and what is not. Often such information can be used to develop personalized relevant content for different customer bases. Many studies have found that customers appreciate such individual attention and are more likely to respond and buy the product. They also come to respect the brand and feel connected with it. This is likely to give the company a big advantage over its competitors. In a world where everyone has hundreds of emails, push notifications, messages, and ads dropping into their content stream, no one has time for irrelevant content.

Finally, this technique can also be used by companies to test the pricing of their different products, improve customer service, and upsell and cross-sell other products or services.

How to segment your customers?

To start with customer segmentation, a company needs to have a clear vision and a goal in mind. The following steps can be undertaken to find segments in the customer base on a broad level.