Matrix pricing
Concepts
Matrix pricing is a strategy that uses two different factors to determine a price. While simpler models only look at "how much" a customer uses, a matrix allows you to change the price based on a second detail, such as the customer's geographic location or their subscription tier.
The logic of dimensions
Matrix pricing is a 2-Dimensional model. It relies on two independent factors: Quantity (Dimension 1) and a categorical attribute (Dimension 2).
Think of this like a pricing grid. To find the correct rate, you follow a column (for the quantity) and a row (for the attribute) until they meet. The point where they intersect is the specific price applied to that customer's usage.
SaaS example: Cloud log storage
A monitoring platform charges for log storage, but the cost of data centers varies by world region. The platform uses a matrix to apply different volume discounts based on where the data is stored.
The pricing grid:
| Region (Dimension 2) | Usage (Dimension 1) | 0 – 500 GB | 501 – 2,000 GB | 2,001+ GB |
|---|---|---|---|
| US-East | $0.10 / GB | $0.08 / GB | $0.05 / GB |
| EU-West | $0.12 / GB | $0.10 / GB | $0.07 / GB |
| Asia-Pacific | $0.15 / GB | $0.12 / GB | $0.10 / GB |
The intersection calculation: If a customer in EU-West ingests 1,500 GB, Zenskar navigates the matrix to find the exact rate:
- Identify the row: The customer is in the "EU-West" category.
- Identify the column: The "1,500 GB" usage falls into the 501–2,000 GB bracket.
- Find the intersection: The rate at this meeting point is $0.10 / GB.
Get started: Configure your matrix product
This tutorial walks you through building a global matrix template in your Product Library.
- Navigate to the Library: Go to Contracts > Products. This is your central hub for defining reusable pricing blueprints.
- Create a Standalone Product: Click + CREATE NEW and choose Standalone Product from the dropdown. The Create Standalone Product page will appear. Fill in the required details and click Save & Proceed at the bottom right.
- Open Price Details: You will be redirected to the Price Details page. Click + Add Price to configure pricing for the product.
- Select Matrix Pricing Model: In the Pricing Model dropdown, select Matrix Pricing.
- Configure Dimension and Save: Click + Add Dimension to add the required dimensions. Enter the Dimension name, Display Alias, and the unit prices for each combination. Once complete, click Save, then click Done on the Price Details page.
How-to: Add matrix product to a contract
1. Via Contracts
- Open the target contract in Contracts > Contracts.
- In the Summary tab, click + ADD PRODUCT V3.
- Search for and select your configured matrix product.
- Click ADD PRODUCT. You will be redirected to the Summary page. Click Publish.
2. Via Customer
- Open the target customer in Customers.
- Go to Contracts and click + CREATE CONTRACT.
- In the Summary tab, click + ADD PRODUCT V3.
- Search for and select your configured matrix product.
- Click ADD PRODUCT. You will be redirected to the Summary page. Click Publish.
Reference
Technical specifications
| Attribute | Specification |
|---|---|
| Dimensionality | 2-dimensional (bivariate) |
| Math formula | P = rᵢⱼ × q (where rᵢⱼ is the rate resolved from the intersection of row i and column j) |
| Logic type | XY lookup function: The price is determined by intersecting a usage quantity with a specific categorical or secondary numerical attribute. |
| Boundary behavior | Lower-inclusive: For numerical axes, a value exactly at a threshold belongs to the tier starting at that value. |
| Calculation engine | Coordinate resolution: The engine identifies the specific "cell" in the matrix based on two distinct metadata inputs and applies that cell's rate. |
| Data object | pricing_model_type: matrix_pricing |
System architecture
In Zenskar, all pricing models are governed by a hierarchical relationship between entities:
- Contract: The legal agreement between you and your customer.
- Phase: A specific time-bound period (e.g., Q1, implementation phase) within that contract.
- Product: The actual service or software module being sold.
- Pricing model: The specific logic (matrix pricing) that defines how that product is billed.
Entity hierarchy:
flowchart LR
CONTRACT[Contract] ---|"has one or more"| PHASE[Phase]
PHASE ---|"has one or more"| PRODUCT[Product]
PRODUCT ---|"has exactly one active"| PRICINGMODEL[Pricing model]
style PRICINGMODEL fill:#90ee90
Price resolution flow
This grid represents the abstract coordinate system used by the billing engine to resolve a rate:
| Quantity (q) | Attribute (attr) | j₁ | j₂ | j₃ |
|---|---|---|---|
| interval₁ (i₁) | r₁₁ | r₁₂ | r₁₃ |
| interval₂ (i₂) | r₂₁ | r₂₂ | r₂₃ |
| interval₃ (i₃) | r₃₁ | r₃₂ | r₃₃ |
The following flow describes how matrix pricing calculates the final price:
- Product library: Defines the dimensions of the matrix (e.g., rows for volume, columns for region) and the rates (r) for every intersection.
- Contract: Links the product to a customer and defines the data sources for both axes (q and attr).
- Data source: Provides real-time values for both dimensions (e.g., a meter for quantity and a metadata tag for region).
- Billing engine: Performs a coordinate lookup to find the specific rate rᵢⱼ and multiplies it by q to resolve the total price P.
Updated 4 days ago
