Product-Customer Matrix Prices

Advanced pricing system with bidirectional product-customer matching, multi-attribute logic, and flexible assignment rules.

Overview

Product-Customer Matrix Prices enables sophisticated pricing scenarios where prices are determined by matching products against customer attributes through configurable matrices. Unlike simple pricelists, matrices support:

  • Bidirectional matching: Products → Customer attributes OR Customer attributes → Products
  • Multi-attribute logic: Combine multiple conditions with AND/OR operators
  • Flexible assignment: Automatic attribute-based matching PLUS manual customer overrides
  • Priority resolution: Conflict resolution when multiple matrices match
  • Quantity tiers: Multiple price breakpoints per matrix
  • Time-based validity: Dual date systems for matrix-level and customer-specific scheduling

Quick Start

  1. Install extension: composer require mageb2b/pricesystem-productcustomermatrix:*
  2. Configure settings: Stores > Configuration > Pricesystem > Product-Customer Matrix
  3. Create matrix: Catalog > Product-Customer Matrices > Add New
  4. Set matching rules: Define customer attributes (group, company, region, etc.)
  5. Add products: Select products and set prices with quantity tiers
  6. Assign customers: Automatic (via attributes) or manual assignment
  7. Activate matrix: Set is_active = Yes

Key Features

Matrix Pricing System

Create pricing matrices that match products to customers based on flexible rules. Each matrix acts as a container with:

  • Product selection (specific SKUs or attribute-based)
  • Customer matching rules (group, company, location attributes)
  • Priority for conflict resolution
  • Date range validity
  • Quantity-based pricing tiers

Learn more →

Multi-Attribute Matching

Combine multiple customer attributes with AND/OR logic for precise targeting:

  • Customer Group + Region + Company (AND logic)
  • Multiple Groups (OR logic within attribute)
  • Complex scenarios: (Group A OR Group B) AND (Region X) AND (Company Y)
  • Supports: group, company, tax/VAT, postcode, region, country

Learn more →

Priority-Based Resolution

When customers match multiple matrices, priority system determines which pricing applies:

  • Priority field: 0-999 (higher wins)
  • Merge option: Best price across all matrices OR highest priority only
  • Clear hierarchy: Standard < Promotional < VIP < Contract
  • Date-based priority shifts for campaigns

Learn more →

Common Use Cases

1. Contract Pricing

Scenario: ACME Corp negotiated specific pricing for 50 products, valid through 2025.

Setup:

  • Matrix: "Contract - ACME Corp 2025"
  • Company match: "ACME"
  • Priority: 35 (contract level)
  • Dates: 2025-01-01 to 2025-12-31
  • Products: 50 contracted SKUs with negotiated prices

Result: All ACME employees get contract pricing automatically.

2. Regional Wholesale

Scenario: California wholesale customers get special pricing on California-specific products.

Setup:

  • Matrix: "CA Wholesale 2025"
  • Customer Group: Wholesale (ID 2)
  • Region: "California"
  • Country: "US"
  • Products: California-themed product category
  • Priority: 20

Result: Only wholesale customers in California see these prices.

3. VIP Customer Program

Scenario: Top customers (VIP group) get 15% discount on all products, plus extra discounts on selected products.

Setup:

  • Matrix 1: "VIP Base Pricing" (Priority 30) - All products, 15% off
  • Matrix 2: "VIP Extra Savings" (Priority 32) - Selected products, 25% off
  • Customer Group: VIP (ID 4)
  • Merge: Yes (best price wins)

Result: VIP customers get 15% off everything, 25% off selected items.

4. Seasonal Campaign with Exclusions

Scenario: Summer sale for all customers except wholesale (they have better pricing already).

Setup:

  • Matrix: "Summer Sale 2025"
  • Attributes: NOT Group = Wholesale (using exclusion logic)
  • Dates: 2025-06-01 to 2025-08-31
  • Priority: 22 (promotional)
  • Products: Summer collection

Result: Retail customers get sale pricing, wholesale keeps standard (better) pricing.

5. Multi-Company B2B Pricing

Scenario: 5 partner companies each have different pricing for shared product catalog.

Setup:

  • Matrix 1: "Partner - Company A" (Company = "A Corp", Priority 30)
  • Matrix 2: "Partner - Company B" (Company = "B Corp", Priority 30)
  • Matrix 3: "Partner - Company C" (Company = "C Corp", Priority 30)
  • Same products, different prices per matrix
  • Individual customer assignments for employees

Result: Each company's employees see their negotiated pricing automatically.

6. Quantity-Based Wholesale Tiers

Scenario: Wholesale customers get better pricing at higher quantities, retail customers don't.

Setup:

  • Matrix: "Wholesale Bulk Discounts"
  • Customer Group: Wholesale
  • Products: All products with qty tiers:
    • Qty 1-9: $100
    • Qty 10-49: $95
    • Qty 50-99: $90
    • Qty 100+: $85

Result: Wholesale customers see graduated pricing; retail sees standard pricing.

Architecture

Database Tables

pricesystem_product_customer_matrix: Main matrix container with priority, dates, and matching configuration.

pricesystem_product_customer_matrix_attribute: Customer attribute matching rules with AND/OR logic support.

pricesystem_product_customer_matrix_customer: Manual customer assignments with optional date overrides.

pricesystem_product_customer_matrix_product: Product-price mappings with quantity tiers (inherited from pricesystem_pricelist_product).

Price Resolution Order

  1. Collect matching matrices: Evaluate customer attributes against all active matrices
  2. Check date validity: Matrix dates + customer-specific date overrides
  3. Apply priority: Sort by priority (highest first)
  4. Merge or select: Based on merge_matrix_qtys configuration
  5. Quantity matching: Find best price for cart quantity
  6. Return price: Final price for customer + product + quantity

Configuration

System Settings

Path: Stores > Configuration > Pricesystem > Product-Customer Matrix

Key Settings:

Enable Auto-Assign Customers:

  • Evaluates customer attributes automatically on login
  • Required for attribute-based matching
  • Default: Yes

Match Exact Type:

  • Loose: Partial string matching (e.g., "ACME" matches "ACME Corp")
  • Exact: Strict equality (case-sensitive)
  • Default: Loose

Merge Matrix Quantities:

  • No: Use highest priority matrix only
  • Yes: Combine qty tiers from all matching matrices, best price wins
  • Default: No

Enable Matrix Validation:

  • Prevents duplicate priorities
  • Enforces attribute rule logic
  • Default: Yes

Integration with Pricesystem

Product-Customer Matrix extends Magento 2 Pricesystem Core and integrates with:

  • Base Pricesystem: Inherits core pricing architecture
  • Pricelists: Matrices and pricelists can coexist (priority determines winner)
  • Category Prices: Category-level pricing can combine with matrix pricing
  • Customer-Specific Prices: Direct customer prices have highest precedence

Price Resolution Order (full system):

  1. Shopping cart price rules (if enabled)
  2. Customer-specific prices
  3. Product-Customer Matrices (this extension)
  4. Pricelists
  5. Category prices
  6. Catalog price

Performance Considerations

  • Indexing: Matrices are evaluated on customer login and profile updates
  • Caching: Matrix assignments cached per customer session
  • Scalability: System handles thousands of matrices and millions of products
  • Optimization: Use specific attributes (group + country) rather than company matching for large customer bases

Getting Started

Ready to create your first matrix?

  1. Installation Guide - Install and configure the extension
  2. Creating Matrices - Step-by-step matrix creation guide
  3. Price Selection - How Pricesystem selects the final price when multiple price types match
  4. My Prices - Customer account price overview + CSV download

Add-Ons

Extend functionality with these add-ons:

Feature Documentation

Found an issue with this documentation? Let us know