Product-Customer Matrix

The most flexible pricing component for complex contract pricing using a three-layer architecture with AND/OR attribute logic.

Overview

The Matrix provides:

  • Attribute-based rules: Match products by configured filterable attributes
  • AND/OR logic: Combine conditions flexibly
  • Customer segments: Group customers by attributes
  • Customer-only pricing: Applied for logged-in/assigned customers
  • Priority resolution: Clear conflict handling
  • Date validity: Time-limited pricing rules

Three-Layer Architecture

Layer 1: Main Matrix

Core pricing rule with:

  • Name (unique identifier)
  • Price and quantity
  • Priority level
  • Validity dates
  • Customer attribute for segmentation

Layer 2: Product Attributes

Define which products match:

  • Attribute code (sku, category_ids, color, etc.)
  • Attribute value to match
  • AND/OR relation between conditions

Layer 3: Customer Assignments

Assign to specific customers:

  • Direct customer ID assignment
  • Customer-specific validity dates
  • Overrides segment-based matching

Creating a Matrix Price

Via Admin Panel

  1. Navigate to Pricesystem >Product Customer Matrix
  2. Click New Matrix
  3. General Tab:
    • Name: "Enterprise Electronics Deal"
    • Price: $500
    • Price Application Type: Defines how price is applied (e.g., fixed value, discount %)
    • Quantity: 1
    • Priority: 30
    • Valid From/To: Contract dates
  4. Product Attributes Tab:
    • Attributes Relation: AND
    • Add: category_ids = "23" (stored category value/ID)
    • Add: brand = "premium"
  5. Customers Tab:
    • Add specific customers
    • Set customer-specific dates
  6. Save

AND/OR Logic

AND Mode (All Must Match)

All attribute conditions must be true:

category_ids = "23" AND brand = "premium"

Only products matching both stored values match.

OR Mode (Any Can Match)

Any attribute condition can be true:

category_ids = "23" OR category_ids = "24"

Products matching either stored category value match.

Customer Segmentation

Instead of assigning individual customers, use customer attributes:

  1. Set customer_attribute_value in main matrix
  2. E.g., "enterprise" for all enterprise customers
  3. Any customer with matching attribute gets the price

Priority Resolution

When multiple matrices match:

  1. Direct customer assignments and customer attribute matches can both apply
  2. Priority influences which matched matrix overrides others
  3. Keep overlapping rules minimal and priorities explicit to avoid ambiguity

Use Cases

Multi-Product Contract

"Customer ABC gets 20% off all Brand X products":

  • Attributes: brand = "X" (OR mode for multiple brands)
  • Customers: ABC Corp
  • Price Application Type: Discount %
  • Price: 20
  • Priority: 40

Regional Segment Pricing

"All US distributors get special pricing on category Y":

  • Customer Attribute: region = "US"
  • Attributes: category_ids = "15" (stored category value/ID)
  • Price: $450
  • Priority: 20

SKU-Specific Override

"Product SKU-123 special price for Customer XYZ":

  • Attributes: sku = "SKU-123"
  • Customers: XYZ Corp
  • Price: $99
  • Priority: 50 (highest)

Best Practices

  1. Use segments for broad rules, direct assignment for exceptions
  2. Set explicit priorities and avoid unnecessary overlap between matrices
  3. Document matrix rules in customer contracts
  4. Test combinations in staging environment

Found an issue with this documentation? Let us know