> ## Documentation Index
> Fetch the complete documentation index at: https://docs2.zenskar.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tiered pricing with flat fee

<br />

***

## Concepts

**Tiered pricing with flat fee** is a hybrid model designed for complex service agreements. In this model, every usage bracket (tier) carries its own fixed entry cost plus a variable rate for the units consumed within that specific bracket. It is highly effective for incentivizing growth while ensuring that each level of scale contributes a baseline of revenue.

### The logic of dimensions

Tiered pricing with flat fee is a **1-dimensional** model. It depends on a single factor: **Quantity (*q*)**.

Think of this as **"the toll road."** Imagine driving on a highway where every new county you enter requires a fixed entrance toll (the flat fee) plus a small charge for every mile you drive within that specific county (the per-unit rate). Your total cost is the sum of all tolls and all miles across every county you have passed through.

### SaaS example: Cloud log storage

A monitoring provider uses this model to bill for log ingestion. Each tier has a "base fee" for the infrastructure overhead of that bracket, plus a unit rate for the data stored.

| Storage tiers (*q*) | Flat fee (*c*) | Price per unit (*r*) |
| ------------------- | -------------- | -------------------- |
| **0 – 100 GB**      | \$50.00        | \$0.01               |
| **101 – 500 GB**    | \$100.00       | \$0.08               |
| **501 – 1,000 GB**  | \$250.00       | \$0.06               |

**The "Toll road" calculation:**
If a customer stores **750 GB**, Zenskar calculates the cost by totaling the flat fees and the variable usage across all applicable tiers.

| Tier range    | Quantity in tier | Flat fee (*c*) | Usage fee (*r × q*) | Total tier cost |
| ------------- | ---------------- | -------------- | ------------------- | --------------- |
| **0 – 100**   | 100 GB           | \$50.00        | \$1.00              | \$51.00         |
| **101 – 500** | 400 GB           | \$100.00       | \$32.00             | \$132.00        |
| **501 – 750** | 250 GB           | \$250.00       | \$15.00             | \$265.00        |
| **Total**     | **750 GB**       |                |                     | **\$448.00**    |

***

## Get started

### Create a tiered with flat fee product

*Building the reusable blueprint in your product library.*

1. **Navigate to the Library:** Go to **Contracts** > **Products**.
2. **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.
3. **Open Price Details:** You will be redirected to the Price Details page. Click **+ Add Price** to configure pricing for the product.
4. **Select Tiered pricing with flat fee Pricing Model:** In the Pricing Model dropdown, select **Tiered Pricing with flat fee**.
5. **Configure Tiers and Save:** Click **+ Add Tier** to create pricing brackets. Define the **from** and **to** ranges, enter the **price** and **flat fee** for each tier. Continue adding tiers as needed. Once complete, click **Save**, then click **Done** on the Price Details page to finalize the setup.

## Add tiered with flat fee pricing to a contract

*Applying the model to a specific customer agreement.*

### 1. Via Contracts

1. Open the target contract in **Contracts** > **Contracts**.
2. In the Summary tab, click **+ ADD PRODUCT V3**.
3. Search for and select your configured tiered with flat fee product.
4. **Review Brackets:** Briefly confirm the price brackets match the customer's specific agreement.
5. Click **ADD PRODUCT**. You will be redirected to the Summary page. Click **Publish**.

### 2. Via Customer

1. Open the target customer in **Customers**.
2. Go to Contracts and click **+ CREATE CONTRACT**.
3. In the Summary tab, click **+ ADD PRODUCT V3**.
4. Search for and select your configured tiered with flat fee product.
5. Click **ADD PRODUCT**. You will be redirected to the Summary page. Click **Publish**.

.

***

## Reference

### Technical specifications

| Attribute              | Specification                                                                                                                             |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Dimensionality**     | **1-dimensional (univariate)**                                                                                                            |
| **Math formula**       | *P = Σ (cᵢ + (rᵢ × qᵢ))* (where *cᵢ* is the tier flat fee, *rᵢ* is the tier rate, and *qᵢ* is the quantity in that tier)                  |
| **Logic type**         | **Piecewise linear function**: The price is the sum of multiple linear segments, each with its own y-intercept (flat fee).                |
| **Boundary behavior**  | **Lower-inclusive**: A value exactly at a threshold belongs to the tier starting at that value.                                           |
| **Calculation engine** | **Graduated accumulation**: The engine breaks the total quantity into buckets, resolves each bucket's fee and rate, and sums the results. |
| **Data object**        | `pricing_model_type: tiered_flat_fee_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 (tiered pricing with flat fee) that defines how that product is billed.

**Entity hierarchy:**

```mermaid theme={null}
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

The following flow describes how tiered pricing with flat fee calculates the final price:

1. **Product library:** Defines the tiers, their flat fees (*c*), and their unit rates (*r*).
2. **Contract:** Links the product to a customer and defines the quantity source (*q*).
3. **Data source:** Provides the value of  (either from a dynamic meter or static product field).
4. **Billing engine:** Allocates  across the defined tiers, calculates the fixed and variable cost for each tier, and sums them to resolve .

***

<br />
