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
| Usage (messages) | Packages billed (⌈q / s⌉) | Total bill |
|---|---|---|
| 100 | 1 | $8.00 |
| 101 | 2 | $16.00 |
| 250 | 3 | $24.00 |
| 301 | 4 | $32.00 |
Get started
Create a package pricing product
This tutorial walks you through building a global package pricing template in your Product Library.- Navigate to the Library: Go to Contracts > Products.
- Create a Standalone Product: Click + CREATE NEW and choose Standalone Product from the dropdown. Fill in the required details and click Save & Proceed.
- Open Price Details: You will be redirected to the Price Details page. Click + Add Price to configure pricing for the product.
- Select Package Pricing Model: In the Pricing Model dropdown, select Package Pricing.
- 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.
- Set package size and package price: Enter the number of units per package and the price per package.
- 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
- Open the target contract in Contracts > Contracts.
- In the Summary tab, click + ADD PRODUCT.
- Search for and select your configured package pricing product.
- Click ADD PRODUCT. You will be redirected to the Summary page. Click Publish.
2. Via Customer
- Open the target customer in Customers.
- Go to Contracts and click + CREATE CONTRACT.
- In the Summary tab, click + ADD PRODUCT.
- Search for and select your configured package pricing product.
- Click ADD PRODUCT. You will be redirected to the Summary page. Click Publish.
Reference
Technical specifications
| Attribute | Specification |
|---|---|
| Dimensionality | 1-dimensional (quantity-based) |
| Math formula | P = ⌈q / s⌉ × p (where q is quantity, s is package size, p is price per package) |
| Logic type | Ceiling function: Usage is divided by package size and rounded up, so any partial package is always charged as a full package. |
| Boundary behavior | Step increase at each package boundary: The total cost jumps by one package price each time usage crosses a multiple of the package size. |
| Calculation engine | Ceiling-based scaling: The engine divides reported quantity by package size, applies a ceiling, and multiplies by the package price. |
| Data object | pricing_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.
Price resolution flow
The following flow describes how package pricing calculates the final price:- Product library: Defines the package size (s) and the price per package (p).
- Contract: Links the product to a customer and defines the quantity source (q).
- Data source: Provides the value of q (either from a usage meter or a manually entered quantity).
- 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.
