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

# Concepts: How the quantity of a line item works

> This document explains what the quantity of a line item is and where it comes from, how quantity versions change it over time, how quantity entries change a fixed quantity, how often a recurring quantity applies again, and how a quantity breakdown splits it across combinations of dimension values.

## Quantity of a line item

> [accordion] Walkthroughs
>
> You can start with a walkthrough instead of reading this document first. A walkthrough is the practical extension of the concepts in this document. It puts them into practice through one example with concrete values. Each part of the walkthrough explains the concepts that its steps apply and links to the sections that cover them.
>
> | Walkthrough | What it shows |
> | - | - |
> | [End-to-end walkthrough: How contracts work](https://zenskar.com/docs/20260301/zenskar-modules/contracts/walkthroughs/contracts.md) | This example-based document shows how your billing team records a one-year deal with Acme Corp as a contract: it adds API calls and seats as line items, adjusts their billing and quantity, previews the invoices, publishes the contract, and adds seats from January. |

> [accordion] Map of concepts
>
> | Concept | Details |
> | - | - |
> | [Quantity version](#quantity-versions-changes-to-the-quantity) | If a pricing version has no quantity version, Zenskar copies the quantity of its pricing preset. |
> | [Fixed quantity](#fixed-quantities-and-quantity-entries) | A quantity comes from a fixed quantity or from metered usage. |
> | | [Quantity entry](#fixed-quantities-and-quantity-entries): What a quantity entry does depends on the quantity strategy and the product type. |
> | [Quantity cadence](#quantity-cadence-how-often-a-quantity-applies-again) | The billing cadence must be a whole multiple of the quantity cadence. |
> | [Quantity breakdown](#quantity-breakdowns-units-for-each-combination) | If the pricing preset uses the dimensional pricing model, each quantity entry has a quantity breakdown. |

> [accordion] Related modules
>
> The quantity of a line item uses the following modules:
>
> | Module | Details |
> | - | - |
> | [Products](https://zenskar.com/docs/20260301/zenskar-modules/products/concepts/products.md#pricing-presets-how-you-charge) | The quantity of a line item is copied from its pricing preset when you add the product. A pricing preset with the dimensional pricing model needs a quantity breakdown for each quantity entry. |
> | [Usage](https://zenskar.com/docs/20260301/zenskar-modules/usage/concepts/billable-metrics.md) | A quantity version with metered usage takes its quantity from one billable metric. |
>
> The following modules use the quantity of a line item:
>
> | Module | Details |
> | - | - |
> | Invoices | Each invoice line item charges for the quantity of its contract line item in one billing period. |

## Quantity: how many units a line item charges for

A **quantity** is the number of units of a [product](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#product) that a [line item](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item) charges for, from a number agreed in the [contract](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#contract) or from the [usage](https://zenskar.com/docs/20260301/zenskar-modules/usage/glossary.md#usage) that a [billable metric](https://zenskar.com/docs/20260301/zenskar-modules/usage/glossary.md#billable-metric) measures, under a [quantity strategy](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#quantity-strategy).

A number agreed in the contract is a [fixed quantity](#fixed-quantities-and-quantity-entries), and usage that a billable metric measures is [metered usage](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#metered-usage).

## Quantity versions: changes to the quantity

A **quantity version** is the quantity of a line item for one range of dates within the [line-item duration](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item-duration). The quantity of a line item is copied from its [pricing preset](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#pricing-preset) when you add the product. The line item then has its own copy. A later change to the quantity of the line item does not change the pricing preset.

The quantity versions of a line item do not overlap. Within each [pricing version](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#pricing-version), the quantity versions cover all the dates, or none. Where a pricing version has no quantity version, Zenskar copies the quantity of its pricing preset, if the pricing preset has one.

## Fixed quantities and quantity entries

A **fixed quantity** is a quantity from a number agreed in the contract.

A **quantity entry** is the number of units of a fixed quantity for one range of dates within a quantity version.

What a quantity entry does depends on the quantity strategy and the [product type](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#product-type):

| Quantity strategy | Product type | What each quantity entry does |
| - | - | - |
| On-demand | Any | It is a separate purchase of units. Zenskar charges it once, in the [billing period](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#billing-period) that contains its start date. An example is a purchase of 1,000 API calls. |
| Recurring | [Point-in-time product type](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#point-in-time-product-type) | It replaces the previous number of units from its start date. The number applies again in each [quantity cadence](#quantity-cadence-how-often-a-quantity-applies-again). An example is 1,000 API calls each month. |
| Recurring | [Period-of-time product type](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#period-of-time-product-type) | It replaces the previous number of units from its start date. The number stays in place until another quantity entry replaces it. An example is a new seat count. |

Take, as an example, a [contract](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#contract) for 2027 that charges for two [products](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#product), each on its own [line item](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item): seats, from January to December, and dedicated servers, from April to December.

In this contract, seats have one [quantity version](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#quantity-version) for the whole year: a [fixed quantity](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#fixed-quantity) under the [recurring quantity strategy](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#recurring-quantity-strategy). The quantity version covers both [pricing versions](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#pricing-version) of seats completely. Its [quantity entries](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#quantity-entry) set 20 seats until March, and 25 seats from April. Dedicated servers have one quantity version for their whole [line-item duration](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item-duration): a fixed quantity of 1 server.

```mermaid theme={null}
gantt
  title Quantity versions and quantity entries in the example
  dateFormat YYYY-MM-DD
  axisFormat %b
  section Seats
  Pricing version of seats, USD 20 a seat             :2027-01-01, 2027-06-30
  Pricing version of seats, USD 22 a seat             :2027-07-01, 2027-12-31
  Quantity version of seats, recurring, fixed         :2027-01-01, 2027-12-31
  Quantity entry of seats, 20 seats                   :2027-01-01, 2027-03-31
  Quantity entry of seats, 25 seats                   :2027-04-01, 2027-12-31
  section Dedicated servers
  Pricing version of dedicated servers, USD 500 a server           :2027-04-01, 2027-12-31
  Quantity version of dedicated servers, fixed, 1 server                 :2027-04-01, 2027-12-31
```

This conceptual diagram shows the quantity versions and the quantity entries of the two line items in the example.

## Metered usage

With metered usage, a billable metric measures the quantity of a line item. Each quantity version with metered usage has one billable metric.

A [billing version](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#billing-version) cannot be prepaid where a quantity version counts metered usage with the [on-demand quantity strategy](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#on-demand-quantity-strategy). See [Billing and pricing](https://zenskar.com/docs/20260301/zenskar-modules/contracts/concepts/line-items/billing.md#billing-and-pricing).

## Quantity cadence: how often a quantity applies again

The **quantity cadence** is how often a quantity under the [recurring quantity strategy](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#recurring-quantity-strategy) applies again.

The [billing cadence](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#billing-cadence) must be a whole multiple of the quantity cadence. In the example, seats have a monthly quantity cadence, and are billed quarterly from April. Each billing period from April covers three periods of the quantity cadence. A quarterly quantity cadence does not fit monthly billing.

```mermaid theme={null}
gantt
  title A monthly quantity cadence billed quarterly
  dateFormat YYYY-MM-DD
  axisFormat %b
  tickInterval 1month
  section Seats
  Quantity cadence of seats, April                    :2027-04-01, 2027-04-30
  Quantity cadence of seats, May                      :2027-05-01, 2027-05-31
  Quantity cadence of seats, June                     :2027-06-01, 2027-06-30
  Billing period of seats, April to June              :2027-04-01, 2027-06-30
```

This conceptual diagram shows how one quarterly billing period of seats covers three periods of a monthly quantity cadence.

A quantity version under the recurring quantity strategy also has [partial-period handling](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#partial-period-handling). See [Partial-period handling: how part of a billing period is charged](https://zenskar.com/docs/20260301/zenskar-modules/products/concepts/products.md#partial-period-handling-how-part-of-a-billing-period-is-charged).

## Quantity breakdowns: units for each combination

A **quantity breakdown** is the split of a quantity entry into the number of units for each combination of [dimension values](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#dimension-value).

A fixed quantity needs quantity breakdowns when its pricing preset uses the [dimensional pricing model](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#dimensional-pricing-model). Each quantity entry then has a quantity breakdown, such as 500 units for the region US and 200 units for the region EU. The number of units of the quantity entry is the sum of its quantity breakdown, such as 700.

The dimension values of a quantity breakdown must exist in the prices of each pricing version that charges the quantity entry: its [price override](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#price-override), if it has one, or its pricing preset. A quantity entry with no units needs no quantity breakdown.

See [Set the quantity of a line item](https://zenskar.com/docs/20260301/zenskar-modules/contracts/how-to-guides/line-items.md#set-the-quantity-of-a-line-item).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.