Independent Variant Matrix & Stock Controls
Manage multi-attribute variations (Size, Color, Material) with independent SKUs, prices, barcodes, and stock counts
The Independent Variant Matrix Architecture
Most consumer retail products do not come in a single uniform specification. For instance, an Oxford Shirt is sold in multiple Sizes (S, M, L, XL) and multiple Colors (White, Sky Blue, Navy).
Unlike legacy platforms that treat variations as simple cosmetic labels, Teyweb implements a normalized **Independent Variant Matrix** (`ProductVariant` schema).
Every single combination (e.g. "Size: L / Color: Navy") exists as an independent, fully realized inventory record capable of maintaining its own distinct SKU, barcode, stock count, cost price (COGS), weight, and retail price.
Granular Inventory Precision
If your "Size: M / Color: White" shirt sells out, only that specific option is disabled on your storefront. Shoppers can continue purchasing "Size: L / Color: White" or "Size: M / Color: Navy" without interruption.
Generating Multi-Dimensional Combinations
When creating or editing a product, scroll to the "Options & Variants" card:
Define Option Dimensions
Enter an Option Name (e.g. "Size", "Color", or "Material").
Add Option Values
Type each value and press Enter or comma (e.g., "Small, Medium, Large, Extra Large").
Add Secondary & Tertiary Options
Click "+ Add another option" to add further dimensions (e.g., "Color: Black, White, Olive").
Automatic Matrix Generation
Teyweb automatically computes the Cartesian cross-product matrix. For 4 sizes and 3 colors, a grid of 12 distinct variants is generated instantly.
Per-Variant SKUs, Prices, Barcodes & COGS
Inside the generated matrix table, every row provides complete financial and logistical control:
Bulk Apply Helper
Have 20 variants that share the same price or starting inventory? Use the "Apply to All" top row action in the editor to populate all variant prices, stock counts, or weights in a single click.
| Variant Column | Example Entry | Operational Behavior |
|---|---|---|
| Variant Combination | Size: XL / Color: Navy | Displayed on storefront button pills and cart items. |
| Price (NGN) | ₦16,500 (Base: ₦14,000) | Larger sizes, exotic leather, or premium finishes can have higher retail prices. |
| Cost Price / COGS (NGN) | ₦8,500 | Private merchant cost for margin calculations per variant. |
| SKU | OXF-NAV-XL | Distinct stock tracking alphanumeric identifier printed on packing slips and receipts. |
| Barcode (UPC/EAN) | 079943912045 | Standard barcode numbers compatible with physical retail barcode scanners. |
| Stock Quantity | 35 in stock | Available units deducted in real-time when orders are completed. |
| Weight (kg) | 0.35 kg | Used for calculating weight-based delivery shipping tiers at checkout. |
Real-Time Inventory Deduction & Overselling Locks
Inventory reliability is paramount for merchant reputation:
1. Real-Time Deduction: The moment an order is confirmed, the specific variant's stock count is decremented immediately.
2. Concurrency Locking: During payment checkout, Teyweb implements database row locking to prevent two buyers from purchasing the last single remaining variant unit simultaneously.
3. Low Stock Alerts: When a variant drops below your configured threshold (default: 5 units), a warning notification alerts you to reorder stock.
4. Backorder Control: You can toggle whether shoppers can purchase backorders when stock hits 0, or strictly enforce "Sold Out" states.
Customer Experience: Swatches, Pills & Out-of-Stock Handling
On your customer-facing storefront:
- Variants appear as interactive button pills or visual color swatches.
- Selecting a variant updates the price display dynamically if that variant carries a price premium.
- If a selected combination is completely out of stock, the "Add to Cart" button changes to a disabled "Out of Stock" state with strikethrough styling on the pill.
- When exported or imported via spreadsheets, variant rows are linked by parent title with their full JSON option definitions intact.
Was this guide helpful?
Help us improve our merchant documentation by sharing your feedback.
