> ## 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.

# Volume pricing with flat fee

## Concepts

**Volume pricing with flat fee** is a hybrid model that applies a specific fixed cost and a single unit rate to a customer's total consumption. Unlike tiered models where you pay through multiple brackets, this model identifies the highest threshold reached and applies that tier's specific fee structure to the entire bill.

### The logic of dimensions

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

Think of this as **"The membership club."** You "level up" to a new club tier based on your total volume of business. Each club tier has its own membership dues (the flat fee) and its own discounted price for goods (the unit rate). You do not pay the dues for the lower clubs; you only pay the dues and the rate associated with the specific club tier you have unlocked for that month.

### SaaS example: Cloud log storage

A monitoring platform charges a platform fee and a storage rate based on the total volume of logs stored. As the customer stores more data, they move into higher tiers with different flat fees and unit rates.

| Total monthly storage (*q*) | Flat fee (*c*) | Unit rate (*r*) |
| --------------------------- | -------------- | --------------- |
| **0 – 500 GB**              | \$50.00        | \$0.01          |
| **501 – 2,000 GB**          | \$100.00       | \$0.08          |
| **2,001+ GB**               | \$250.00       | \$0.06          |

**The "Membership club" calculation:**
If a customer stores **1,500 GB**, they have "leveled up" into the second tier. Zenskar applies the flat fee and unit rate for that specific tier to the total volume.

| Input metric (*q*) | Pricing logic | Final bill (*P*) |
| ------------------ | ------------- | ---------------- |
| **1,500 GB**       |               | **\$220.00**     |

***

## Get started

### Create a volume 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 Volume pricing with flat fee Pricing Model:** In the Pricing Model dropdown, select **Volume 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.

## How-to: Add volume 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 volume 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 volume 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 *i* is the tier containing total quantity )                                                                              |
| **Logic type**         | **Step function with linear components**: The fee and rate "jump" to new values for the entire quantity at each threshold.                          |
| **Boundary behavior**  | **Lower-inclusive**: A value exactly at a threshold belongs to the tier starting at that value.                                                     |
| **Calculation engine** | **All-in scaling**: The engine identifies the single tier corresponding to total usage and applies that tier's specific fee and rate to every unit. |
| **Data object**        | `pricing_model_type: volume_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 (volume 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 volume pricing with flat fee calculates the final price:

1. **Product library:** Defines the global tiers, flat fees (*c*), and 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:** Maps the total  to a single active tier (*i*) and resolves the total price *P* using that tier's specific constants.

***

<br />
