Create and delete customer segments
Creating a customer segment is similar to building a cart price rule, except that the options include customer segment-specific attributes.
{width="700" modal="regular"}
Customer Segments grid
Prerequisite: Enable customer segments
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand Customers and choose Customer Configuration.
-
Expand the Customer Segments section.
-
Verify that Enable Customer Segment Functionality is set to
Yes
.{width="600" modal="regular"}
-
(Optional) To disable real-time validation for customer segments, set Real-time Check if Customer is Matched by Segment to
No
.When you disable real-time validation, customer segments are validated by a single combined condition SQL query. Disabling this function improves performance of segments validation if there are many customer segments in the system. However, the validation does not work with a split database or when there are no registered customers.
-
When complete, click Save Config.
Create a segment
The following steps use an example for creating a customer segment that targets female customers in Los Angeles.
Step 1: Add a customer segment
-
On the Admin sidebar, go to Customers > Segments.
-
In the upper-right corner, click Add Segment.
-
Enter a Segment Name that identifies the customer segment when working in the Admin.
-
Enter a brief Description that explains the purpose of the segment.
-
Set Assigned to Website to the website where the customer segment can be used.
-
Set the Status to Active or Inactive.
-
To identify the customer types that you want to use for applying the segment, set Apply to to one of the following:
Visitors and Registered Customers
- Includes all shoppers, regardless of whether they are logged in to an account.Registered Customers
- Includes only shoppers who are logged in to an account.Visitors
- Includes only shoppers who are not logged in to an account.
note tip TIP If you are creating a segment based on customer attributes stored in a customer account, it is a best practice to apply the segment to registered customers only. note note NOTE If a segment applies to Visitors and Registered Customers
, the Matched Customers displays onlyRegistered Customers
. This is the case even if visitors can be targeted based on conditions that apply to them. ForVisitors
only segments, noMatched Customers
tab is displayed. -
Click Save and Continue Edit.
After saving the segment General Properties, additional options become available in the left panel.
{width="600" modal="regular"}
General Properties
Active
/ Inactive
Step 2: Define the conditions
-
In the left pane, click Conditions.
The default condition begins with If ALL of these conditions are TRUE: on the page.
{width="600" modal="regular"}
-
Create a condition that targets female customers:
-
Click the Add icon to display the list of conditions and select
Gender
. -
Leave the default is condition control option.
-
Click … and select
female
.
{width="600" modal="regular"}
-
-
Create another condition that targets residents of Los Angeles:
-
On the next line, click the Add icon and select
Customer Address
.This action creates a parent condition where you can define one or more address fields to match.
-
Click the Add icon to display the list of address fields and select
City
. -
Click is to display the condition control options and select
contains
. -
Click … and enter
Los Angeles
. -
On the next line, click the Add icon and select
State/Province
. -
Leave the default is condition control option.
-
Click … and select
United States > California
.
{width="600" modal="regular"}
-
-
Click Save and Continue Edit.
Step 3: Review the list of matched customers
-
In the left pane, click Matched Customers to display all customers who match the condition.
{width="600" modal="regular"}
-
If the list of customers meets your goal, click Save to complete the customer segment.
-
The customer segment can now be used for targeting promotions, content, and mailings.
Matched Customers grid
Remove a customer segment
-
On the Admin sidebar, go to Customers > Segments.
-
Find the segment to be deleted and select it.
-
In the menu bar, click Delete button.
-
To confirm the action, click OK.
Button bar
Customer segments demo
Watch this video for a demonstration of creating customer segments: