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

# Line item: quantity

## Line item: quantity

This document explains what the quantity of a line item is, where it comes from, how it changes over time, and how it splits across the combinations of a dimensional pricing preset.

### Map of concepts

| Concept | Details |
| - | - |
| [Quantity version](#quantity-versions-how-many-units) | Each quantity version has a quantity strategy, and either a fixed quantity or metered usage. |
| [Fixed quantity](#fixed-quantities-and-quantity-entries) | A fixed quantity changes through quantity entries. |
| [Metered usage](#metered-usage) | A billable metric measures the quantity. |
| [Quantity cadence](#recurring-quantities) | With the recurring quantity strategy, the quantity applies again after each quantity cadence. |
| [Dimensional pricing presets](#dimensional-pricing-presets) | A fixed quantity under a dimensional pricing preset is split across the combinations of dimension values. |

### Related modules

The quantity of a line item uses the following modules:

| Module | Details |
| - | - |
| [Products](/docs/20260301/product-modules/products/concepts/products) | The quantity strategy, metered usage, and partial-period handling are defined there. The pricing preset of a line item can carry a quantity setting. |
| [Billable metrics](/docs/20260301/product-modules/usage/concepts/billable-metrics) | Metered usage gets its quantity from a billable metric. You create billable metrics in that module. |
| [Contracts](/docs/20260301/product-modules/contracts/concepts/contracts) | The quantity belongs to the line items of a contract. |

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

The **quantity** is the number of units that a line item charges for.

A line item gets its quantity in one of two ways: as a [fixed quantity](#fixed-quantities-and-quantity-entries) that you enter, or from [metered usage](/docs/20260301/product-modules/products/glossary#metered-usage) that a billable metric measures.

## Quantity versions: how many units

A **quantity version** is the [version](/docs/20260301/product-modules/contracts/glossary#version) of the quantity of a [line item](/docs/20260301/product-modules/contracts/glossary#line-item). Each quantity version has a [quantity strategy](/docs/20260301/product-modules/products/glossary#quantity-strategy): on demand or recurring. Each quantity version also gets its quantity in one of two ways: as a number that you enter, or from [metered usage](/docs/20260301/product-modules/products/glossary#metered-usage).

A line item starts with the quantity setting of its [pricing preset](/docs/20260301/product-modules/products/glossary#pricing-preset). If the pricing preset has no quantity setting, the line item starts with a recurring fixed quantity of 1, prorated.

The UI shows the combinations as four modes:

| Mode | Description in the UI |
| - | - |
| On demand, fixed | A single value set at purchase. No refresh, no proration. |
| On demand, metered | Each metered event is billed as it occurs. |
| Recurring, fixed | Same value granted every cycle. Entries can vary value mid-version. |
| Recurring, metered | Metered usage summed per cycle, billed at cycle end. |

Within each [pricing version](/docs/20260301/product-modules/contracts/glossary#pricing-version), the quantity versions must cover all the dates, or none. Without quantity versions, the line item uses the quantity setting of its pricing preset.

## Fixed quantities and quantity entries

A **fixed quantity** is a quantity that you enter as a number, instead of measuring it with a billable metric.

A **quantity entry** is a dated value within a version of a fixed quantity, such as a new seat count from a date. What a quantity entry does depends on the quantity strategy and the [product type](/docs/20260301/product-modules/products/glossary#product-type):

| Quantity strategy | Product type | Each quantity entry |
| - | - | - |
| On demand | Any | Adds a separate batch of units to a pool. For example, a purchase of 1,000 API calls. |
| Recurring | Point in time | Sets the allowance of units from its date forward. |
| Recurring | Period of time | Replaces the previous count from its date. For example, a new seat count. |

For example, a seat line item starts with 20 seats. A quantity entry from April changes the count to 25 seats. January to March are charged for 20 seats, and April onward for 25 seats:

```mermaid theme={null}
gantt
  title Seat count of one line item
  dateFormat YYYY-MM-DD
  axisFormat %b
  section Quantity
  20 seats                   :2027-01-01, 2027-03-31
  25 seats from April        :2027-04-01, 2027-12-31
```

## Metered usage

With metered usage, a [billable metric](/docs/20260301/product-modules/products/glossary#billable-metric) measures the quantity of the line item. Each quantity version with metered usage refers to one billable metric.

Metered usage with the on-demand quantity strategy cannot be prepaid, because Zenskar cannot know the usage before the [billing period](/docs/20260301/product-modules/contracts/glossary#billing-period). See [Line item: billing](/docs/20260301/product-modules/contracts/concepts/line-items/billing#billing-and-pricing).

## Recurring quantities

The **quantity cadence** is how often a recurring quantity applies again, such as monthly. Monthly is the default. The quantity cadence cannot be longer than the [billing cadence](/docs/20260301/product-modules/contracts/glossary#billing-cadence), and the billing cadence must be a whole multiple of it. For example, a monthly quantity fits monthly or quarterly billing.

```mermaid theme={null}
gantt
  title A monthly quantity with quarterly billing
  dateFormat YYYY-MM-DD
  axisFormat %b
  section Quantity cadence
  Jan                        :2027-01-01, 2027-01-31
  Feb                        :2027-02-01, 2027-02-28
  Mar                        :2027-03-01, 2027-03-31
  Apr                        :2027-04-01, 2027-04-30
  May                        :2027-05-01, 2027-05-31
  Jun                        :2027-06-01, 2027-06-30
  section Billing periods
  Invoice for Q1             :2027-01-01, 2027-03-31
  Invoice for Q2             :2027-04-01, 2027-06-30
```

A recurring quantity also has [partial-period handling](/docs/20260301/product-modules/products/glossary#partial-period-handling). It decides how Zenskar charges for a quantity that starts partway through a period:

| Partial-period handling | Result |
| - | - |
| Prorate | Zenskar charges only for the part of the period that the quantity was in place. This is the default. |
| Charge full | Zenskar charges the full amount for the period, regardless of when the quantity started. |

For example, a customer adds 10 seats on 16 January, with monthly billing. With prorate, Zenskar charges the 10 seats from 16 to 31 January. With charge full, Zenskar charges the 10 seats for all of January:

```mermaid theme={null}
gantt
  title 10 seats added on 16 January
  dateFormat YYYY-MM-DD
  axisFormat %d %b
  section Billing period
  January                    :2027-01-01, 2027-01-31
  section Prorate
  10 seats charged           :2027-01-16, 2027-01-31
  section Charge full
  10 seats charged           :2027-01-01, 2027-01-31
```

Partial-period handling applies only to the recurring quantity strategy.

## Dimensional pricing presets

When the pricing preset of a line item uses the [dimensional pricing model](/docs/20260301/product-modules/products/glossary#dimensional-pricing-model), a fixed quantity must say which combination of dimension values its units fall in. Each quantity entry then has a breakdown: the number of units for each combination, such as 500 for region US and 200 for region EU. The combinations in a breakdown must exist in the pricing preset.


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