Skip to content

Magento Customer Groups — Group Pricing, Tier Pricing and Segmentation

DodaTech Updated 2026-06-27 13 min read

In this tutorial, you'll learn Magento customer groups: the four default groups (NOT LOGGED IN, General, Wholesale, Retailer), creating custom groups, assigning customers, applying group-specific pricing and tier discounts, and using groups for B2B segmentation.

What You'll Learn

  • The four default customer groups and their purposes
  • Creating custom customer groups for targeted pricing
  • Assigning customers to groups manually and programmatically
  • Setting product-level group pricing per customer group
  • Configuring tier pricing with quantity breaks per group
  • Applying catalog and cart price rules filtered by group
  • Using category permissions per customer group
  • Managing B2B groups for shared catalogs and contract pricing

Why It Matters

Not all customers should see the same prices. Wholesale buyers expect bulk discounts. Retail partners need special pricing. B2B clients require negotiated contract rates. Guest visitors should see retail prices. Customer groups give you the power to segment your audience and offer different prices, different products, and different discounts to each segment. This is how e-commerce businesses serve diverse customer types from a single store.

Real-World Use

A hardware supplier serves three customer types: retail customers pay full price, contractors get 15% off with minimum order quantities, and wholesale partners get tiered pricing (1-9 units = retail price, 10-49 units = 20% off, 50+ units = 35% off). Magento customer groups with group pricing and tier pricing handle all three segments from one product catalog. Each group also has different shipping rates and payment methods available.

Learning Path

flowchart LR
  A["Customer Accounts"] --> B["Customer Groups
You are here"]:::current B --> C["Store Configuration"] C --> D["Catalog Management"] classDef current fill:#38bdf8,color:#0f172a,stroke-width:2px

Default Customer Groups

When you install Magento, four customer groups already exist. Let's understand each:

NOT LOGGED IN (ID: 0): This group applies to all visitors who have not logged in or registered. Guests browsing the site and guest checkout customers are in this group. Use this group to set the standard retail price for anonymous visitors.

General (ID: 1): This is the default group for registered customers. When a new customer creates an account, Magento assigns them to this group unless another group is selected. Most regular customers belong here.

Wholesale (ID: 2): This group is for wholesale buyers who purchase in bulk. You can assign customers manually to this group and set lower prices or quantity-based tier discounts.

Retailer (ID: 3): This group is for retail partners who resell your products. Similar to Wholesale but separate, allowing different discount levels for different partner tiers.

You can modify the names of default groups but not delete them. You can rename "Wholesale" to "VIP" or "Retailer" to "Partner" through the admin.

Creating Custom Groups

To create a new customer group:

  1. Go to Customers > Customer Groups.
  2. Click Add New Customer Group.
  3. Fill in:
Group Name: Premium
Tax Class: Customer Tax Class (Retail Customer or Wholesale Customer)
  1. Click Save.

The Tax Class setting controls which tax rate applies to customers in this group. If you offer tax-exempt pricing for wholesale customers, create a "Tax Exempt" tax class and assign it to the wholesale group.

Customer groups are visible in the customer_group database table:

SELECT * FROM customer_group;

Example output:

customer_group_id | customer_group_code | tax_class_id
1                  | General             | 3
2                  | Wholesale           | 3
3                  | Retailer            | 3
4                  | Premium             | 3

Assigning Customers to Groups

You can assign customers to groups in two ways.

Manual assignment in admin:

  1. Go to Customers > All Customers.
  2. Open a customer record.
  3. In the Account Information tab, select a group from the Group dropdown.
  4. Save.

Programmatic assignment using PHP:

use Magento\Customer\Model\CustomerFactory;
use Magento\Customer\Model\ResourceModel\Customer as CustomerResource;

class AssignCustomerGroup
{
    private $customerFactory;
    private $customerResource;

    public function __construct(
        CustomerFactory $customerFactory,
        CustomerResource $customerResource
    ) {
        $this->customerFactory = $customerFactory;
        $this->customerResource = $customerResource;
    }

    public function assignToGroup($customerId, $groupId)
    {
        $customer = $this->customerFactory->create();
        $this->customerResource->load($customer, $customerId);
        $customer->setGroupId($groupId);
        $this->customerResource->save($customer);
    }
}

// Usage: assign customer ID 42 to group ID 4 (Premium)
$assigner->assignToGroup(42, 4);

You can also import customer group assignments via CSV import: the customer_group column in the customer import file accepts the group name.

Group Pricing Per Product

Group pricing lets you set a different price for each customer group at the product level. This is available for simple, configurable, and virtual products.

To set group pricing on a product:

  1. Open the product in edit mode.
  2. Click Advanced Pricing.
  3. Under Customer Group Price, click Add.
  4. Configure:
Customer Group: Wholesale
Quantity: 1
Price: Discount
Discount: 15

This means Wholesale customers get 15% off the regular price when buying one unit or more.

You can add multiple group price entries:

Customer Group: Retailer | Quantity: 1 | Price: Fixed | Amount: 29.99
Customer Group: Wholesale  | Quantity: 1 | Price: Discount | Discount: 20
Customer Group: Premium   | Quantity: 1 | Price: Fixed   | Amount: 24.99

Each row overrides the regular catalog price for the specified group.

These prices are stored in the catalog_product_entity_group_price table:

SELECT * FROM catalog_product_entity_group_price
WHERE entity_id = 123;

The MySQL table stores the product ID, customer group ID, price value, and website ID.

Group Price Priority

When multiple group prices exist for the same customer, Magento uses this logic:

  1. If the customer is logged in, use their assigned group's price.
  2. If no group price exists for the customer's group, use the default (NOT LOGGED IN) price.
  3. If no price is set for NOT LOGGED IN either, use the regular catalog price.

This means you only need to set group prices for groups that get special pricing. Everyone else falls back to the standard price.

Tier Pricing Per Group

Tier pricing (also called volume pricing) offers lower prices when customers buy larger quantities. You can combine tier pricing with customer groups to create quantity-based discounts per segment.

To configure tier pricing:

Product > Advanced Pricing > Tier Price

Customer Group: General
Qty: 10   Price: 45.00 (regular price $50)
Qty: 25   Price: 40.00
Qty: 50   Price: 35.00

Customer Group: Wholesale
Qty: 5    Price: 42.00
Qty: 10   Price: 38.00
Qty: 25   Price: 32.00

When a General customer adds 10 items, each item costs $45. When a Wholesale customer adds the same 10 items, each costs $38.

Tier prices are stored in catalog_product_entity_tier_price. The frontend displays tier price information on the product page to encourage larger purchases.

Group Pricing vs Tier Pricing

Feature Group Pricing Tier Pricing
Basis Customer group membership Quantity purchased
Combined Yes, both can apply Yes, both can apply
Display on product page Price changes per group Shows tier table
Min quantity 1 Configurable (e.g., 5+)
Best for Role-based discounts Volume discounts

Group Discounts with Catalog Rules

Catalog price rules apply percentage discounts to products in bulk. You can restrict catalog rules to specific customer groups.

Create a catalog rule at Marketing > Promotions > Catalog Price Rules:

Rule Name: Wholesale 10% Off All Products
Status: Active
Customer Groups: Wholesale, Retailer
Conditions: (leave empty to apply to all products)
Actions:
  Apply: Apply a percentage of product price discount
  Discount Amount: 10

This applies a 10% discount on all products for Wholesale and Retailer customers only. General customers see full prices.

Group Discounts with Cart Rules

Cart price rules can also target customer groups. Unlike catalog rules (which affect product listing prices), cart rules apply at checkout.

Marketing > Promotions > Cart Price Rules > Add New Rule

Rule Name: Premium Free Shipping
Status: Active
Customer Groups: Premium
Coupon: No Coupon
Conditions:
  Cart Subtotal >= 50
Actions:
  Apply: Percent of product price discount
  Free Shipping: For shipment with matching items

Premium customers get free shipping on orders over $50. Other groups do not see this benefit.

Category Permissions Per Group

You can restrict which customer groups can see or purchase products in specific categories. This is powerful for B2B stores where certain catalogs are private.

  1. Go to Stores > Configuration > Catalog > Catalog.
  2. Under Category Permissions, enable the feature.
  3. Edit a category and go to the Category Permissions tab.
  4. Add permissions:
New Permission:
  Customer Group: NOT LOGGED IN
  Browsing Category: Deny
  Display Product Prices: Deny
  Add to Cart: Deny

New Permission:
  Customer Group: General
  Browsing Category: Allow
  Display Product Prices: Allow
  Add to Cart: Allow

This hides the entire "Wholesale Catalog" category from guest visitors and shows it only to registered General customers.

B2B Groups and Shared Catalog

Adobe Commerce includes B2B features that extend customer groups with shared catalogs. With shared catalogs, you can create a custom catalog with custom prices for a specific company (which maps to a customer group).

A shared catalog:

  1. Defines which products are available to a company.
  2. Sets custom prices per product for that company.
  3. Hides products not in the shared catalog from those customers.

This is how B2B stores handle contract pricing. Each customer group represents a company with negotiated prices.

API Group Management

Magento's REST API allows you to manage customer groups programmatically.

Get all groups:

GET /rest/V1/customerGroups

Create a group:

POST /rest/V1/customerGroups
{
  "group": {
    "code": "Silver",
    "taxClassId": 3
  }
}

Assign customer to group:

PUT /rest/V1/customers/:customerId
{
  "customer": {
    "group_id": 5
  }
}

Get group pricing for a product:

GET /rest/V1/products/:sku/group-prices

REST API access makes it possible to sync customer groups from an external CRM or ERP system.

Common Mistakes

  1. Setting group prices but forgetting to reindex. Group prices are stored in a separate index. After changing group prices, run bin/magento indexer:reindex catalog_product_price to update prices in the frontend.

  2. Not testing group prices as the correct customer. Always test group pricing by logging in as a customer in the target group. Cache can also cause you to see outdated prices. Clear the cache with bin/magento cache:flush after making changes.

  3. Creating too many groups. Each additional group adds complexity to pricing configuration and performance. Start with the default four groups and add new ones only when you have a clear use case. Too many groups confuse admin users.

  4. Ignoring the NOT LOGGED IN group. If you only set prices for General and forget about NOT LOGGED IN, guests see the full catalog price, which is often correct. But if you create a special promotion only for General, guests will not see it, which may be intentional or a bug.

  5. Using group pricing when tier pricing would be better. If the goal is to encourage volume purchases, tier pricing is more appropriate than group pricing. Customers can see the quantity breakpoints and self-select the discount level.

Practice Questions

  1. What happens if a customer belongs to a group that has no group price set on a product? Answer: The customer sees the default catalog price. Magento falls back through the group price hierarchy: customer's group price, then NOT LOGGED IN group price, then the base catalog price.

  2. How do category permissions work with customer groups? Answer: Category permissions allow or deny browsing, price display, and add-to-cart actions per customer group per category. When enabled, every category permission is denied by default, so you must explicitly set Allow permissions for groups that should see the category.

  3. Can a customer belong to more than one group? Answer: No. Each customer belongs to exactly one group at a time. If you need a customer to qualify for multiple discount types, use cart price rule conditions (e.g., "customer is in Wholesale group OR cart subtotal exceeds $100") instead of multiple group membership.

  4. Challenge: Build a complete customer segmentation system for a B2B office supply store with three customer types: Retail (individual buyers), Business (small offices, 5-20 employees), and Enterprise (corporations, 50+ employees). Create three custom groups with these rules: Retail pays full price, Business gets 10% off orders over $200, Enterprise gets 25% off all products plus free shipping. Configure tier pricing on printer paper: all groups pay $5 per unit for 1-9 units, Business pays $4 for 10-49 units and $3.50 for 50+, Enterprise pays $3 for any quantity over 5. Set category permissions to hide the "Bulk Supplies" category from Retail customers. Create a cart price rule: free shipping for Enterprise on orders over $100. Use Magento PHP code or the REST API to assign five test customers to each group.

FAQ

Can I change a customer's group automatically based on their order history?

Magento does not have built-in automatic group promotion based on order history. You would need a custom module or a third-party extension that watches for order completion events and updates the customer's group ID via the Customer resource model.

How do customer group prices interact with special prices and tier prices?

Magento applies the lowest available price. If a product has a special price of $40, a group price of $45, and a tier price of $38 for qty 10+, the customer sees $40 (special price beats $45 group price) unless they buy 10+ units, in which case they see $38 (tier price beats $40 special price).

Do customer groups affect tax calculation?

Yes. Each customer group is assigned a tax class. The tax class determines which tax rules apply. You can have different tax rates for different customer groups, such as tax-exempt for wholesale or reduced VAT for educational institutions.

Can I use customer groups with the REST API for headless stores?

Yes. The REST API respects customer groups. When a customer token is used in an API request, Magento applies group pricing and tier pricing to product queries. You must pass the customer's authorization token to get group-specific prices.

How do I migrate customer groups between Magento installations?

Export the customer_group table from the source database and import it into the destination. Then reassign customers to groups using the REST API or a custom script. Be careful with group IDs if the destination already has groups defined.

Mini Project

Your task: Implement a tiered pricing system for an online book store.

  1. Create three customer groups: Students, Regular, and Premium.
  2. Configure these pricing rules for a best-selling book priced at $29.99:
    • Students: $24.99 (fixed group price)
    • Regular: Full price $29.99
    • Premium: $19.99 (fixed group price)
  3. Add tier pricing for the same book:
    • All groups: 5-9 copies = $27.99 each
    • Students and Premium: 10+ copies = $22.99 each
  4. Create a catalog price rule: 10% off bestsellers for Premium members (this stacks with their group price).
  5. Create a cart price rule: Free shipping for Students on orders over $50.
  6. Test each scenario:
    • Guest (NOT LOGGED IN) sees $29.99
    • Student logged in sees $24.99 (group price)
    • Student buys 10 copies: sees $22.99 each (tier overrides group)
    • Premium logged in: sees $19.99 with 10% off = $17.99 (stacking)
    • Regular logged in: sees $29.99
  7. Use bin/magento indexer:reindex catalog_product_price after setup.
  8. Write a Magento PHP script that reads tier prices for a given SKU from the catalog_product_entity_tier_price table (via MySQL) and displays them grouped by customer group.

What's Next

Now that you understand customer groups and pricing, learn how to configure the store structure itself:

Continue to Lesson 17: Store Configuration — Websites, store views, and scope hierarchy.

Related lessons:

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro