The ultimate guide to customer segmentation in Salesforce Marketing Cloud

Customer Segmentation in Salesforce Marketing Cloud

Modern marketers know that buyers want personalized, targeted content at each stage of their shopping journey. Subsequently, many need help providing tailored content with their buyers’ demands at scale and the Salesforce ecosystem can help brands achieve this intricate level of personalization. With Salesforce Marketing Cloud, you can segment your customers to send across the right content to the right group at the right touchpoint and time. When integrated to your eCommerce store, you can even automate customer segmentation and achieve high-level of personalization.

Let’s understand in this blog what basic attributes companies use to segment customers, the importance of segmentation and how to set up the Salesforce Marketing Cloud for automated customer segmentation.

Primary segments in eCommerce B2B and B2C marketing

Customer segmentation is of five types: demographic, behavioral, interests, psychographic, and custom audiences.

 Primary segments in eCommerce B2B and B2C marketing

Depending on your eCommerce brand’s needs, your customer segmentation chart would look different. However, the entire goal of customer segmentation is to leverage data to better marketing strategies and improve ROIs.

Why is customer segmentation important in eCommerce?

Segmentation allows effective allocation of marketing resources and accelerates cross and up-selling opportunities. With consumer segmentation, you understand your shoppers’ pain points, assign them a group based on their characteristics, and ultimately develop a product that would meet their needs. Salesforce Marketing Cloud allows you to segment customer data into demographic, geographic, and behavioral categories. This allows for creating more targeted and personalized experiences through all your touchpoints, improving marketing and customer service and encouraging customers to buy often.

Let’s explore the benefits of customer segmentation:

#1. Increased revenue: Segmentation gives you more targeted results to provide correct content and services. It identifies customers and where they are most reachable, and they can always leverage it as a business grows. According to McKinsey, personalization can increase sales by around 10–15% through tailor-made marketing campaigns. In fact, 77% of ROI comes from segmented, targeted and triggered campaigns.

#2. Better engagement: Consumer segmentation helps develop a better connection between your brand and your customers. You can capture the level of engagement through click rates on email, social media following, website visits etc. depending on customer preferences. If a customer dislikes receiving marketing emails, you can reduce the number of emails. Ultimately, this increases brand value and drives better engagement.

#3. Customer behavior: Buying behavior is essential to understand customer expectations and retain them for a longer period. Segmenting customers based on their buying behavior help design relevant marketing strategies, predict market trends, innovate products per the insights, and improve customer service.

#4. Targeted campaigns: Through effective data segmentation techniques, organizations can send out targeted messages to appeal to each segment. It can be an advertisement targeted to one segment, a personalized email, an announcement of new products etc. You can reduce deleting of emails, abandoning carts, and generating revenue through targeted campaigns.

#5. Forecasting: Consumer segmentation helps you forecast future trends and customer preferences and get ahead of them. With data, you can improve your eCommerce marketing strategies to leverage the most returns today and in the future.

Integration of Salesforce CRM and Salesforce Marketing Cloud

An effective implementation of Salesforce customer segmentation helps explore higher growth opportunities, retain more customers, and enhance profits. Salesforce empowers you with :

  • Customer 360 to record information such as views and attributes
  • Automation to save time, money, and resources
  • Audience builder giving deep insight into the customers attributes and behavior

If you have a Salesforce B2C Commerce Cloud store, you can employ the Marketing Cloud Connect (a connector) to seamlessly integrate Salesforce Commerce Cloud with Salesforce Marketing Cloud. When leveraging other eCommerce platforms, you can connect with certified integration experts. This way, you gain access to a single dashboard to view all your customers across multiple touchpoints and forge effective marketing strategies.

Automate Segmentation using Salesforce Marketing Cloud: The steps

The powerful Salesforce Marketing Cloud platform allows you to access rich data resources, build smarter audience segments, automate marketing activities, and get better insights on one platform. Once you have integrated your store with Salesforce Marketing Cloud, you can leverage the below steps to automate customer segmentation.

In Marketing Cloud, you segment data by two options :

  • SQL Queries
  • Data Filter

Let’s discuss consumer segmentation by these two steps.

Segmenting customer data based on SQL queries

Structured Query Language (SQL) is one of the best ways to segment your customers from vast data. SQL queries are completely adaptable to your needs like targeting customers based on gender, purchase history, age etc. You can have various elements to target customers in SQL like FROM, WHERE, JOIN, SELECT, and so on.

Example of a real-time scenario for SQL: Marketers want to target and send emails to customers who last purchased in the last six months. Let’s use SQL activity to segment data based on the last purchase date in this case.

To create a SQL Query:

  • SFCC users transfer the order data CSV on SFTP
  • Marketers import the order data from SFTP into the SFMC using the file drop source option and import activity in Automation studio to capture customer data in SFMC.
  • To create an SQL query, click on Journey Builder → Automation Studio → Create Activity, and select SQL query.


Step 1: After completing preliminary steps of creating SQL query you are ready to ‘drag and drop’ the starting source and activity. You can drag and drop filter and SQL activity.

Step 1

Step 2: Drag and drop the SQL query activity then click on Create New Query Activity.

Step 3: Fill in all the required information, and click on the Next button.


Step 4: Write the SQL query for capturing data that customers purchased in the last six months and select the targeted data extension to store filter data.

Customer Segmentation Step 4

Step 5: Choose the update option in data action or any other option as per business requirements.

Customer Segmentation Step 5

Step 6: After clicking on the Finish button, you can see SQL query activity is integrated with automation, then click on Save.

Step 7: Click on the Run Once button and run the implemented SQL query.

Customer Segmentation Step 7

You can see three records after successfully filtering data using SQL query activity and running automation. You can schedule this automation according to business requirements.

 last month data
order data

The Salesforce Marketing Cloud Automation Studio will provide you with utmost flexibility to write SQL queries for segmenting databases.

Consumer segmentation through Data Filters

A data filter is a non-technical visual interface to segment your customer data. You can apply ‘AND’ and ‘OR’ operators to create filters using drag and drop features to move fields. Data filters are available in Email Studio under the ‘Subscribers’ drop-down menu.

Example: Marketers want to target sending promotional emails to customers based on gender. In this case, we can use Data filter to segment data.

Let’s discuss how.

Step1: Click on the Create button.

Step 2: A popup box will appear. You can choose either profile attributes or data extensions.

Consumer segmentation through Data Filters

Step 3: Click on the Ok button and choose the data extension in which you want to filter data. Here we choose CustomerDE_Test.

Consumer segmentation through Data Filters

Step 4: Drag and drop the gender field and apply the filter condition, gender is equal to “Female”.

Consumer segmentation through Data Filters
Consumer segmentation through Data Filters

Step 5: Fill in the filter name and description. To save the filter click on the save button.

Consumer segmentation through Data Filters
Consumer segmentation through Data Filters
Consumer segmentation through Data Filters

The ultimate results will appear in only female data in a filter data extension.

Consumer segmentation through Data Filters

Data filters can only apply when there is one data extension. If you want to add two or more data extensions you have to use SQL queries.

Use Case: Automating customer segmentation based on last purchase for Rutland

Use Case: Automating customer segmentation based on last purchase for Rutland Cycling

Automate customer segmentation with certified Salesforce experts

Salesforce customer segmentation allows businesses to make better use of their marketing budgets, gain a competitive advantage over rival companies, and most importantly understand the most vital asset of your business: customers. Salesforce’s built in data filters and SQL query features allow you to filter rich data sources and segment databases. Along with certified Salesforce experts and consultants, you can integrate your eCommerce store with SFMC and automate customer segmentation.

Have Questions? Talk to our Salesforce experts!

Sumit Sharma

Senior Software Engineer - Salesforce

A Senior Software Engineer with overall 4+ years of experience, Sumit has worked on various Marketing Cloud Campaign solutions. He has also managed subscriber data including import, segmentation etc by using Marketing Cloud Tools and database queries. Apart from this, he is an excellent team player with good communication, interpersonal and analytical skills. Connect with him on LinkedIn.



Talk to our experts for more insights.

We would love to hear from you.


Please fill the form or send us an email at