Skip to main content

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.

Concepts

Package pricing is a model where a service or product is sold in fixed-size bundles. Instead of billing per individual unit, you define a package size and a price per package. Customers are billed for the number of whole packages that cover their usage, regardless of whether they fill the last package entirely.

The logic of dimensions

Package pricing is a 1-dimensional model. It relies on a single factor: Quantity (dimension 1). Think of this as “the bundle.” Unlike per-unit pricing, which scales smoothly, package pricing moves in steps. Every time usage crosses a package boundary, the cost jumps to the next full package. Partial packages are always rounded up.

SaaS example: SMS notifications

A communications platform sells SMS credits in packages of 100 messages for $8 per package. Customers pay for full packages only.
  • Package size: 100 messages
  • Package price: $8.00
The ceiling calculation: Usage is divided by the package size and rounded up to the nearest whole number, then multiplied by the package price.
Usage (messages)Packages billed (⌈q / s⌉)Total bill
1001$8.00
1012$16.00
2503$24.00
3014$32.00

Get started

Create a package pricing product

This tutorial walks you through building a global package pricing template 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. Fill in the required details and click Save & Proceed.
  3. Open Price Details: You will be redirected to the Price Details page. Click + Add Price to configure pricing for the product.
  4. Select Package Pricing Model: In the Pricing Model dropdown, select Package Pricing.
  5. Choose metered or non-metered:
    • Metered: Select this if usage is tracked automatically. Choose the appropriate usage aggregate from the dropdown.
    • Non-metered: Select this if quantity is entered manually at billing time.
  6. Set package size and package price: Enter the number of units per package and the price per package.
  7. Save: Click Confirm, then click Done on the Price Details page to finalize.

How-to: Add a package pricing product to a contract

1. Via Contracts

  1. Open the target contract in Contracts > Contracts.
  2. In the Summary tab, click + ADD PRODUCT.
  3. Search for and select your configured package pricing product.
  4. 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.
  4. Search for and select your configured package pricing product.
  5. Click ADD PRODUCT. You will be redirected to the Summary page. Click Publish.
Constraint: You can attach only one pricing model to a single product instance.

Reference

Technical specifications

AttributeSpecification
Dimensionality1-dimensional (quantity-based)
Math formulaP = ⌈q / s⌉ × p (where q is quantity, s is package size, p is price per package)
Logic typeCeiling function: Usage is divided by package size and rounded up, so any partial package is always charged as a full package.
Boundary behaviorStep increase at each package boundary: The total cost jumps by one package price each time usage crosses a multiple of the package size.
Calculation engineCeiling-based scaling: The engine divides reported quantity by package size, applies a ceiling, and multiplies by the package price.
Data objectpricing_model_type: package_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 (package pricing) that defines how that product is billed.
Entity hierarchy:

Price resolution flow

The following flow describes how package pricing calculates the final price:
  1. Product library: Defines the package size (s) and the price per package (p).
  2. Contract: Links the product to a customer and defines the quantity source (q).
  3. Data source: Provides the value of q (either from a usage meter or a manually entered quantity).
  4. Billing engine: Divides q by s, applies a ceiling to round up to the next whole package, and multiplies by p to resolve the total price P.