Skip to content

PRD: Product options & variants

ModuleProductsPRD IDPRD-OPT-001
StatusReady to devFEATOPT
EpicPlaneBANA-1553
Date2026-06-12Versionv1.0
Packages@nx/commerce · @nx/coreURDOPT
SurfaceClient · Owner/MgrSale · POS
OwnerPhát Nguyễn

What product options & variants are

Variants tell us a product has several sellable forms, but not why they differ. With free-text names alone, nothing stops two identical variants, the POS can't tell size apart from ice, and there's no stable key to match against an external listing.

This PRD makes an option, its option values, and each variant's combination explicit - declared by the owner, kept consistent by the system. Owners describe how a product varies - options like size, ice, or colour, each with its own list of values - and every sellable variant picks one value per option.

Two rules keep it honest

RuleMeaning
A value must belong to the productA variant cannot use a value from an option owned by a different product
No two variants may share a combinationThe same set of chosen values can only ever belong to one variant in the product

Because of these two rules, the POS, online channels, and reporting can all treat a combination as the variant's identity - pull the combination and you know exactly which variant it is.

One product, from declaring options to picking an order

An owner sets up a milk tea with size (S/M/L) and ice (100/50/0), then declares the five combinations actually sold. A cashier then picks a variant by choosing size, then ice - not from one long list.

A second "Large, 50%" variant is refused because the combination already exists; choosing two sizes for one variant is also refused because a variant takes at most one value per option.

Where this is easy to get wrong

The system does not generate every combination for the owner

Most merchants don't sell the full matrix. Owners declare only the combinations they actually sell; the system never auto-explodes Size × Ice into every possibility and expects the owner to delete the rest. Declaring only what's sold keeps the catalogue equal to what's actually sellable - no phantom variants to hide, price, or stock.

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.