After July 2021, the 2.3.x release line no longer received quality updates or user guide updates. PHP 7.3 reached end of support in December 2021, and Adobe Commerce 2.3.x reached end of support in September 2022. We strongly recommend upgrading to Adobe Commerce 2.4.x to help maintain PCI compliance.

Creating a Customer Segment

This site contains archived merchant documentation for a version of Adobe Commerce and Magento Open Source that has reached end-of-support. The documentation available here is intended for historical reference only and is not maintained. The Adobe Commerce Merchant Documentation for current releases is published on the Adobe Experience League.
Magento Commerce only. Learn more.

Creating a customer segment is similar to building a cart price rule, except that the options include customer segment-specific attributes.

Customer segments list Customer Segments list

The following example shows how to create a customer segment that targets female customers in Los Angeles.

Step 1: Enable customer segments

  1. On the Admin sidebar, go to Stores > Settings > Configuration.

  2. In the left panel, expand Customers and choose Customer Configuration.

  3. Expand Expansion selector the Customer Segments section.

  4. Verify that Enable Customer Segment Functionality is set to Yes.

    Customers configuration - customer segments Customer Segments enabled

  5. When complete, click Save Config.

Step 2: Add a customer segment

  1. On the Admin sidebar, go to Customers > Segments.

  2. In the upper-right corner, click Add Segment.

  3. Enter a Segment Name to identify the customer segment when working in the Admin.

  4. Enter a brief Description that explains the purpose of the segment.

  5. Set Assigned to Website to the website where the customer segment can be used.

  6. To identify the customer types that you want to use for allying 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.

    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.

    Segment - general properties Segment properties

  7. Click Save and Continue Edit.

    Additional options become available in the left pane.

Segment properties

Field Description
Segment Name A name that identifies the segment for internal reference.
Description A brief description that explains the purpose of the segment for internal reference.
Assigned to Website The single website where the segment can be used.
Status Activates and deactivates the segment. Any associated price rules and banners are deactivated when the segment is disabled. Options include: Active / Inactive.
Apply to Defines the customer types to which the segment is applied. The selection influences the set of conditions available for creating the segment. The setting cannot be changed after the segment is saved.

Step 3: Define the conditions

  1. In the left pane, click Conditions.

    The default condition begins, “If ALL of these conditions are TRUE:”.

    Customer segment conditions Conditions

  2. Create a condition to target female customers:

    • Click the Add (Plus sign) icon to display the list of conditions and select Gender.

    • Leave the default is condition control option.

    • Click and select female.

    Customer segment condition Condition line 1

  3. Create another condition that targets residents of Los Angeles:

    • On the next line, click the Add (Plus sign) icon and select Customer Address.

      This creates a parent condition where you can define one or more address fields to match.

    • Click the Add (Plus sign) 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 (Plus sign) icon and select State/Province.

    • Leave the default is condition control option.

    • Click and select United States > California.

    Conditions for females in Los Angeles, California Condition for females in Los Angeles

  4. Click Save and Continue Edit.

Step 4: Review the list of matched customers

  1. In the left pane, click Matched Customers to display all customers who match the condition.

    Matched customers Matched Customers

  2. 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.