Machine learning 101 for savvy retail marketers

Download the e-Book
This white paper outlines strategies and tactics for marketers to make the best use of machine learning in creating a data-powered retail organization.

Table of Contents

3. ML for Marketing Organizations
Segmentation and Targeting
Customer Churn
Customer Life Time Value (CLTV)
Recommendation Engines
Marketing Mix Modeling
Customer Attribution


Marketing is evolving rapidly with advancements in eCommerce, digital and mobile technologies and with changing consumer demographics. A recent Forrester study indicated that e-commerce will account for 17.0% of retail sales by 2022, up from a projected 12.9% in 2017. This trend indicates that more and more people are moving online for their purchases or are heavily influenced by their digital activity when doing in-store purchases.

The demographics rapidly changing in the US with the growing consumer segments such as Hispanics and millennials, and it is critical to fully understand these customer segments to provide personalized and targeted messaging to the audience. A recent study indicated that nearly half (49%) of Hispanic and Latino consumers use social media during their shopping journey, compared to 32% of all ethnic groups. So, it is critical to have a deep understanding of the consumers and embrace the rapidly-evolving technological advancements to provide a customer-centric omnichannel experience.

Marketers are tasked with the role of being the "Voice of the Customer" within the C-suite and play a pivotal role in evangelizing and enabling highly personalized experiences to the consumers. The growth in a marketing organization is highly reinforced by investments in these 3 areas:


Icon of a Server Database.

Marketing technology stack

The various aspects of a marketing technology stack.

Artificial Intelligence/Machine Learning (AI-ML)

A robot with a brain in its hand depicting Artificial Intelligence (AI) and Machine Learning (ML).

In this article, we will outline how Artificial Intelligence and Machine Learning (especially related to customer analytics) will fuel the growth for organizations. Data and AI-ML are key drivers that enable marketers to spur innovation in the organization. Organizations that make high-velocity, data-driven decisions will be on their way to becoming powerful marketing pioneers.

Challenges to Achieve the Vision

Before we dive deep into the AI-ML side of things, it is critical to have high-quality data in an integrated fashion to be able to perform analysis. Many organizations still deal with Excel data lakes, siloed data sets and stale data (old and not real-time data). This impedes marketing teams from coming up with consistent and accurate reporting metrics as each marketing analyst uses different business rules and comes up with different numbers. So, having a single consolidated data platform whether it is in a CRM (Customer Relationship Management) Or CDP (Customer Data Platform) or a data warehouse/ data lake is table stakes for any organization. What is important is not to get lost in these systems but understand the marketing use cases to make sure that the right technologies and infrastructure are put in place.

In this article we assume that the marketing function has reached this level of maturity so that organizations can look beyond data consolidation and look to extract value from advanced analytics. The foundation of consolidated and real-time data is the ability to do Customer 360.

An icon depicting the 360-degree view of the customer.

ML for Marketing Organizations

Once high-quality data is available in a consumable fashion, the next step is to identify the AI-ML use cases for the organization. Here are the most common use cases that marketers can consider to personalize the experience for the customer.

The most common use cases of Artificial Intelligence (AI) and Machine Learning (ML).

Let's break it down to these topics for further discussion:

  • Segmentation and Targeting
  • Customer Churn
  • Customer Life Time Value
  • Recommendation Engines
  • Marketing Mix Modeling
  • Customer Attribution

Segmentation and Targeting

Icon of a 'Big Idea'.

Big Idea:

Personalization can deliver five to eight times the Return on Investment (ROI) on marketing spend and lift sales 10 percent or more

Traditionally marketers relied on the spray and pray approach to marketing. Segmentation allows marketers to identify the customer segments such as high-value customers, customers residing in a location, customers who come from a specific channel, etc. The Recency Frequency and Monitory (RFM) analysis is a common segmentation strategy used by marketers. It helps marketers find the big spenders, the loyal spenders and the hibernating customers.

Segmentation on its own can be very targeted. But if marketers can combine segments with individualized behavioral profiling for that segment, it takes the shopping experience to a whole new level. By leveraging cross-channel usage data (web, mobile, social, etc.), contextual information (such as geo-location, weather, time of day or day of the week) and real-time activity for each shopper, true personalization is achieved. Segmentation and targeting allows marketers to send contextual and personalized information to customers on their birthdays or other occasions that they may consider shopping.

Segmentation coupled with other AI-ML use cases such as CLTV and churn enables marketers to focus their efforts on targeting the right customer segment.

Segment customers and target high-value customers with greater propensity to stay.

Segmentation allows responses to key questions such as which customers I should include in a campaign to maximize response rates. One classic example of segmentation is the recent Burger King promotion to sell whoppers for 1 penny, after users have downloaded the App and ordered via App. Burger King reports that its app has been downloaded to 5.9 million devices after the promotion. Burger King smartly targeted the customers who shop at McDonalds and incentivized them to download the Burger King app.

One CMO we talked to told us that he wants to segment the customers in such a way that his marketing team should know that the customer would potentially buy polo in spring, outer wear in fall and snow boots in winter. This level of segmentation allows marketers to determine which products/ SKUs are the ones that are going to be attractive to these customers.

Segmentation typically uses unsupervised learning models. The most popular unsupervised learning model used for clustering is K-means. There has been a lot of advancement in unsupervised learning with the emergence of deep neural networks (DNN).

Different types of Customer Segments.

Customer Churn

Icon of a 'Big Idea'.

Big Idea:

In the US eCommerce business, 40% of revenue comes from returning or repeat customers, who represent only 8% of all visitors

Churn is defined differently for different industries. In the case of eCommerce business, Churn is defined as customers who have not purchased within a specific cutoff date. The choice of the cutoff date depends on each organization and can be decided based on past buying pattern (e.g.,. 180 days from last purchase date).

An illustrative depiction of Customers' Purchase Pattern and Churn.

The key is to identify customers who are about to churn and give them enough incentives to come back. Along with segmentation and identifying the Life Time Value (LTV) of the customer, campaigns should be geared towards high-valued customers who are about to churn rather than the customers with low LTV. Dedicated campaigns tailored for each customer segment on their preferred channels are required to reactivate these customers.

The key questions that will be answered using churn analysis are as follows

  • How many customers are leaving/joining over a period?
  • What are their signature behaviors prior to attrition?
  • Has the rate of customer churn changed over time?
  • How much does churn impact business performance?
  • Are customers churning more/ less in any specific customer groups?

The marketing team can use the output of churn analysis to provide promotions or incentives to avoid churn or to reactivate the customers who have churned.

There are sophisticated predictive modeling algorithms that predict the propensity of a customer about to churn. There have been many Kaggle competitions related to churn predictions and, due to the arrival of newer and more sophisticated models, churn can be predicted with a very high degree of accuracy

Customer Life Time Value (CLTV)

Icon of a 'Big Idea'.

Big Idea:

Top 1% of ecommerce customers is worth up to 18 times more than average customers

Customer LTV is the net value contribution of the customer to the company throughout the life cycle of the customer. The concept of CLTV allows marketers to put the customer at the center of their efforts rather than brands or products. CLTV should be compared with Customer Acquisition Cost (CAC) to make sure that the company is investing in the appropriate customer acquisition strategies.

CLTV enables marketers to optimize marketing channels instead of just using initial purchase value to accurately evaluate ROI on customer acquisition. Customer segmentation provide options to identify the channel from which a customer came to determine the CLTV of that customer and channel (e.g., Is CLTV of a customer who came via paid search higher than the CLTV of customer who came via social channel?). The key point to remember is that customers who buy from multiple channels typically have a higher life time value than single-channel shoppers.

Typically, 10% of customers are high- value customers and contribute to 30-40% of the profit margin of the company. 70% of the customers are profitable customers and the remaining 20% of customers are non-profitable customers. Based on the CLTV of the customer, marketers can decide which customer segments they can go after.

Icon of Key Metrics.

The machine learning technique used to predict Customer Life Time Value (CLTV) is called supervised learning. The supervised learning technique learns from historical data and uses that learning to predict the life time value of the customer. Such machine learning approaches are becoming common these days as evident in the recent Kaggle competition that predicted the customer revenue based on Google store shopping experience.

In the end, CLTV should enable companies to retain their best customers, convert normal customers to high-valued customers and acquire new customers so that it contributes to higher gross margin.

Icon of a 'Big Idea'.

Key Metrics To Track:

CLTV, CAC, Months to recover CAC

Recommendation Engines

Icon of a Big Idea.

Big Idea:

35% of what consumers purchase on Amazon and 75% of what consumers watch on Netflix come from product recommendation algorithms

The demand for recommendation systems has been on the rise because it gives marketers opportunity to provide specific product recommendations to customers based on their usage. If a customer bought a laptop, there may be an opportunity to sell a laptop bag, laptop charger or a mouse. So, the ability to identify what customers are going to buy and group these things together will enable opportunities for up-sell and cross sell.

Amazon pioneered this concept in retail using web/mobile usage history and customer product rating data sets. The techniques that allow a personalized recommendation to users are collaborative filtering and content-based filtering.

Collaborative filtering (Similar to Amazon's Customers who purchased this also purchased that) - The collaborative filtering is based on the premise that customers with similar characteristics purchase similar products.

The recommendation is based on what customers with similar characteristics have purchased in the past, the demographics of the customer, omni-channel usage (Web/ mobile/ social media, etc.) and other 3rd-party data that enables a deeper understanding of the customer. These data points are combined to identify unique personas for each customer. The persona information is then used to identify other customers with similar behaviors and characteristics so that personalized recommendations are served to these customer groups.

This is similar to the recommendations seen on Netflix and Amazon - "Customers who watched this also watched that"/ "Customers who purchased this also purchased that."

An illustrative depiction of collaborative filtering used in recommendation engines.

Content-based filtering (Similar to Amazon's Inspired by your browsing history) - The content-based filtering studies the products that the customer has bought in the past to create the profile of the customer. Apart from customer demographics and purchase history, other sources of data such as customer likes/ dislikes, number of clicks, ratings given, and sentiment analysis are considered to come up with the profile of the user. Based on the customer's shopping behavior and omnichannel interactions of the past, product recommendations are made to the user.

This is similar to the recommendations you see in Netflix or Amazon - "Based on your viewing history"/ "Inspired by your browsing history."

An illustrative depiction of content-based filtering used in recommendation engines.

The recommendation systems provide enormous opportunity to up-sell and cross sell. The recommendation to buy the laptop accessories can be on the product description page, but a different set of recommendations can be on the checkout page. The recommendations should be first tried with A/B testing18 and based on the results of A/B testing the results should be tweaked. Based on the recommendations served, marketers should be able to measure tangible outcomes such as higher Average Order Value (AOV) and higher total revenue.

A combination of Natural Language Processing (NLP) techniques such as information retrieval, sentiment analysis and similarity is used to identify products that are similar. Supervised learning techniques are used to determine whether a product needs to be recommended to a user or not. An algorithm that has made rapid progress and shown remarkable results in recent years is XGBoost19 due to its tree-based ensemble learning and prediction.

Icon of Key Metrics.

Key Metrics To Track:

Average Order Value (AOV), No of recommendations served, click through rate, rate of conversions, etc.

Marketing Mix Modeling

Icon of a Big Idea.

Big Idea:

Behaviorally-targeted advertising is 2.7 times as effective as non-targeted advertising

Earlier companies focused their marketing efforts on traditional channels such as newspaper, radio and TV. In the digital age, this trend has shifted to advertising via social media and other digital channels such as email and mobile. Marketers always wanted to maximize the Net Present Value (NPV) of their investments to increase the ROI for advertising spends rather than the spray and pray method and relying on guesswork.

The Marketing Mix Modeling (MMM) enables marketers to identify campaigns that could bring in higher revenue, decrease marketing spend and help to better target the campaigns. One of the key use cases of Marketing Mix Modeling is to determine the appropriate marketing budget to spend for holiday season to get the best ROI. It also helps to identify the low impact campaigns that had made only a minimal contribution to revenue and generated high production costs (e.g.,. Does the costly TV ads provide more value vs. social media ads or display ads?)

MMM will also help companies to group their distribution partners based on their sales and demographics and analyze the impact of marketing on each of the partner groups separately. The marketing mix modeling along with customer attribution and customer insights can be leveraged to operationalize an omni-channel strategy to get the best ROI of marketing spend.

The different steps to achieve this outcome are:

An illustrative depiction of marketing mix modeling.

  • Marketing Mix Analysis
    • Analyze the marketing spend and outcomes of the past
    • Run what-if scenarios
    • Distribute optimal marketing spend based on consolidated sales, marketing and third-party data
  • Customer Attribution and Insights
    • Determine customer segments based on their preferred channels
    • Understand customer preferences
    • Segment customers based on their CLTV and churn stats
  • Operationalize Omni-Channel Strategy
    • Reallocate budget based on the optimization model and based on the customer segmentation outputs
    • Leverage insights and use omni-channel strategy to communicate with customers

Typically, companies move from traditional spray and pray method to an intermediate digital strategy to an all out omni-channel marketing strategy.

Marketing mix modeling relies on 3rd-party data from Data Management Platforms (DMP) and other external data sets such as census data to increase the performance of the models. Clustering techniques can be applied to categorize the distribution partners and analyze the impact of promotions on each of these groups separately. Time series regression models can also be developed to predict favorable spending levels. The prediction model allows optimized allocation of marketing spend across the various channels to improve response and conversion rates to marketing messaging.

Icon of Key Metrics.

Key Metrics To Track:

Revenue by Market Source, ROI by marketing activity, Return on Ad Spend (ROAS), Optimal distribution of spend

Customer Attribution

Icon of a Big Idea.

Big Idea:

56% customers interact across multiple touch points with more than one channel

As per the Snapp App study, the average customer online interactions per conversion is 4.5. The score is high for fashion and apparel (7 for fashion and 6 for apparel). This means that the customer interacts with the brand 4.5 times across different channels prior to making the purchase.

Customers who purchase a product comes from countless channels and the marketers are supposed to meet the customers in those channels. Attribution enables marketers to identify the channel that customer converted from, so that they can determine the ROI of each channel and determine the most profitable channel. But, rarely do customers come from a single channel. They may have clicked on a Facebook Ad, looked at the company website or came from an email newsletter. So, identifying the channel that mostly influenced the purchasing decision is the key so that credit is given where it's due.

There are different types of attribution models ranging from simple ones such as first-touch attribution and last-touch attribution to complex ones such as weighted attribution and algorithmic attribution. Marketers should look at the appropriate attribution model based on the use case and industry. In the below example, a linear attribution model is illustrated where a customer has gone through 5 different channels before conversion and each channel was given equal weightage.

An illustrative depiction of the linear attribution model.

Different techniques can be used to measure the attribution. The techniques include regression modeling, ROI simulation, multivariate analysis and event analysis. The key challenge is to gather the customer touch-points across all these channels and to be available in an integrated manner to do the analysis.

Icon of Key Metrics.

Key Metrics To Track:

Conversion rate across each channel (Social media conversion rate/ email conversion rate, etc.).


An integrated analytics strategy is the key for CMOs to spur innovation and growth. There are tons of customer analytics use cases that marketers can implement to personalize the experience for the customer.

Most organizations go through this journey to eventually implement the advanced analytics that enables hyper personalization for the customer. It all starts with operational reports coming out of a CRM database and then moving up to create metrics-based reporting and eventually advanced data visualizations. Visualization tools such as Tableau, Power BI or QlikView are leaders in the visualization category.

As the organizations move towards predictive analytics and other advanced analytics, a variety of tools can be used ranging from open source tools to purchased ones. The most popular open source tools are Python and R and there is a thriving community that contributes to this knowledge repository.

An illustrative depiction of the analytical sophistication and strategic value of AI/ML.

The underlying data foundation needs to support these use cases and many organizations are moving toward data lakes. The most popular data lake is provided by AWS and uses AWS S3 and Amazon Red Shift. The cloud data lake provides the infrastructure for having integrated and consolidated data that enables analytics and machine learning developers to generate insights that can be used to personalize experiences for the customers.

Once the data foundation is in place and analytics use cases are implemented, a great marketing organization should set up experiments to continuously test, iterate and learn to avoid the guesswork as much as possible.

The companies with sophisticated customer analytics create more two-way interactions with customers are the ones that are most likely to win in the long run.

Need help strategizing and implementing AI-ML?

About the Author

Yasim Kolathayil

Yasim Kolathayil is an analytics and data science practitioner with 20+ years' experience in the industry serving Fortune 500 clients. Yasim is particularly interested in customer analytics and has been a keen student of customer analytics for a very long time.

Yasim Kolathayil

About HGS Digital

HGS Digital is a marketing technology consulting and services provider that has helped marketing and IT teams within 100+ organizations with digital transformation solutions. Through our data-driven marketing services, we help customers select the right CRM systems and implement a complete data strategy that helps marketing teams get higher ROI out of their existing marketing investments.

Our CRM and Data Practice has trained and certified CRM (Customer Relationship Management), CDP (Customer Data Platform), Tag management, DMP (Data Management Platform) and Big Data experts who help clients successfully strategize and implement data-driven marketing solutions within their organization.

By integrating the right data from different systems, we help clients understand their customers better. Through AI and ML-based data analysis and reporting, we’re able to provide our clients with highly valuable insights that they can act upon.

HGS Digital Logo