Magento Customer Groups — Group Pricing, Tier Pricing and Segmentation
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:
- Go to Customers > Customer Groups.
- Click Add New Customer Group.
- Fill in:
Group Name: Premium
Tax Class: Customer Tax Class (Retail Customer or Wholesale Customer)
- 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:
- Go to Customers > All Customers.
- Open a customer record.
- In the Account Information tab, select a group from the Group dropdown.
- 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:
- Open the product in edit mode.
- Click Advanced Pricing.
- Under Customer Group Price, click Add.
- 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:
- If the customer is logged in, use their assigned group's price.
- If no group price exists for the customer's group, use the default (NOT LOGGED IN) price.
- 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.
- Go to Stores > Configuration > Catalog > Catalog.
- Under Category Permissions, enable the feature.
- Edit a category and go to the Category Permissions tab.
- 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:
- Defines which products are available to a company.
- Sets custom prices per product for that company.
- 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
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_priceto update prices in the frontend.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:flushafter making changes.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.
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.
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
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.
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.
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.
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
Mini Project
Your task: Implement a tiered pricing system for an online book store.
- Create three customer groups: Students, Regular, and Premium.
- 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)
- Add tier pricing for the same book:
- All groups: 5-9 copies = $27.99 each
- Students and Premium: 10+ copies = $22.99 each
- Create a catalog price rule: 10% off bestsellers for Premium members (this stacks with their group price).
- Create a cart price rule: Free shipping for Students on orders over $50.
- 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
- Use
bin/magento indexer:reindex catalog_product_priceafter setup. - Write a Magento PHP script that reads tier prices for a given SKU from the
catalog_product_entity_tier_pricetable (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:
- Sales Rules and Coupons — Cart rules filtered by customer group
- Pricing and Catalog Rules — Catalog-level group discounts
- Inventory and Stock — Stock configuration per customer group
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro