Skip to main content

Line item: discounts

This page explains how the charge of a line item can be reduced for a range of dates, and in what order the reductions apply.

Map of concepts

Discounts uses the following modules:

Discounts: what reduces a charge

A discount is a reduction to the charge of a line item for a range of dates. A line item can carry several discounts. Each discount has a start date and an end date within the line-item duration. The dates of two discounts can overlap. A discount can have an optional label. Discounts belong only to the line items of a contract. A pricing preset does not add discounts to a line item. Discounts apply after the line-item minimum commitments of the line item. A line item whose pricing preset uses the dimensional pricing model cannot carry discounts.

Discount order: which discount applies first

The discount order is the position of a discount in the sequence in which Zenskar applies the discounts of a line item. Zenskar applies the discounts of a line item one after another, lowest discount order first. Each discount applies to the result of the one before. Each discount order is unique within a line item. The discount order changes the result. For example, a line item charges $1,000 for a month, with a discount of 10% and a discount of $100:

Discount types: how a discount reduces the charge

A discount type is the kind of reduction that a discount makes: a percentage of the charge, a fixed amount, or a number of free units. Each discount has one discount type. The discount type decides what the discount reduces, and whether it applies before or after Zenskar calculates the charge.

Percentage discounts

A percentage discount is a discount that reduces the charge of a line item by a percentage. The percentage is more than 0 and at most 100. For example, a percentage discount of 15% reduces a charge of $1,000 to $850.

Fixed-amount discounts

A fixed-amount discount is a discount that reduces the charge of a line item by an amount of money in each discount cadence. A discount cadence is how often the amount of a fixed-amount discount, or the free units of a quantity discount, become available again, such as every month. The amount is in the currency of the contract. The discount cadence of a fixed-amount discount is monthly by default. It can be any length from one day to 10 years. Within each discount cadence, the amount is used up across the billing periods, in date order. What is left at the end of the discount cadence does not carry forward. A fixed-amount discount never reduces a charge below zero. For example, a fixed-amount discount gives $100 every quarter, and the line item is billed monthly: In April, a new quarter starts, and the full $100 is available again. When a discount cadence is only partly within the dates of the discount, the fixed-amount discount handles the partial period in one of two ways:

Quantity discounts

A quantity discount is a discount that gives a number of free units of a line item in each discount cadence. The number of free units is a whole number. Zenskar subtracts the free units from the quantity before it calculates the charge, and after any minimum-quantity commitment. The discount cadence of a quantity discount starts with the billing cadence of the line item, or monthly when the line item has none. Within each discount cadence, the free units are used up across the billing periods, in date order. Unused free units do not carry forward. For example, a quantity discount gives 1,000 free API calls every month. A customer makes 1,500 calls in a month. Zenskar charges for 500 calls. When a discount cadence is only partly within the dates of the discount, the quantity discount handles the partial period in one of two ways: Prorating can produce a fraction of a unit. The rounding of the free units is one of three options:

Discount types compared

Zenskar applies the discounts of a line item in two groups, one on each side of the charge calculation:
  1. Quantity discounts reduce the quantity, in discount order.
  2. Zenskar calculates the charge from the quantity that is left.
  3. Percentage discounts and fixed-amount discounts reduce the charge, in discount order.
The discount order decides the sequence only within each group. A quantity discount always applies before a percentage discount or a fixed-amount discount, whatever their discount orders. For example, a line item charges $1 for each API call. A customer makes 1,500 calls in a month. The line item has a percentage discount of 10% with discount order 1, and a quantity discount of 1,000 free calls with discount order 2: The quantity discount applies first, although its discount order is higher.