SKU (Stock Keeping Unit)
The SKU represents the minimum sellable unit and is trackable in inventory. While the Variant defines a category (e.g., "Nike Pegasus Green"), the SKU defines the specific and final combination ready for purchase (e.g., "Nike Pegasus Green, Size 42").
The options themselves provide the specificity for each SKU.
SKU Definition
| Property | Type | Description |
|---|---|---|
| id | string (UUID) | Unique identifier of the SKU in the system. |
| sku | string | Commercial identification code (e.g., "NIK-A6B512-283BBA"). |
| quantity | number | Quantity currently available in stock. |
| allowBackorder | boolean | If true, allows purchase even if stock is exhausted. |
| backorderDays | number | Estimated days for restocking in case of backorder. |
| isFavourite | boolean | Indicates if this SKU is the one selected by default in the variant. |
| maxOrderQuantity | number | Maximum limit of items purchasable in a single order. |
| options | Object | Map of selected options (e.g., {"OPTION_ID": "OPTION_VALUE_ID"}). |
| prices | Price[] | Array of prices applicable to this specific SKU. |
| allowFreeShipping | boolean | Indicates if the SKU is eligible for free shipping according to general rules. |
| forceFreeShipping | boolean | If true, forces free shipping regardless of cart rules. |
| ean / mpn | string | International standard codes (EAN, Barcode, Manufacturer Part Number). |
Object example
{
"allowFreeShipping": false,
"backorderDays": 0,
"quantity": 8,
"allowBackorder": false,
"mpn": "",
"ean": "",
"forceFreeShipping": false,
"options": {
"2d395c94-552a-4dbf-95de-230f94e0844c": "eccd7e69-2aa2-4bbc-92ef-75a07f0a01e6"
},
"purchaseRestock": false,
"sku": "NIK-E172D4-FAE227",
"prices": [
{
"amount": 140,
"isDefault": true,
"comparePrice": 0,
"quantityTable": null,
"externalId": null,
"id": "d6b5e7a9-d202-4e25-a579-e4875c2ca3b8",
"currencyCode": "EUR",
"cadence": "once",
"netAmount": 140,
"grossAmount": 170.79999999999998,
"rate": 22,
"netCompare": 0,
"grossCompare": 0
}
],
"isFavourite": false,
"maxOrderQuantity": 30,
"id": "9fd983d3-17f0-409c-b29e-f51188be51c3"
}
Price
Represents the specific price of the SKU. Unlike the variant's PriceRange, here the values are defined individually.
| Property | Type | Description |
|---|---|---|
| id | string (UUID) | Unique identifier for the price. |
| amount | number | Nominal value of the price. |
| netAmount | number | Unit net price. |
| grossAmount | number | Unit gross price (including tax). |
| netCompare | number | Net comparison price (original price). |
| grossCompare | number | Gross comparison price (original price including tax). |
| currencyCode | string | Currency code (e.g., EUR). |
| cadence | string | Payment frequency (e.g., once). |
| isDefault | boolean | Indicates if this is the primary price for the current currency. |
| quantityTable | QuantityTable | null | Table for quantity-based discounts (tier pricing). |
Object example
{
"amount": 140,
"isDefault": true,
"comparePrice": 0,
"quantityTable": null,
"externalId": null,
"id": "d6b5e7a9-d202-4e25-a579-e4875c2ca3b8",
"currencyCode": "EUR",
"cadence": "once",
"netAmount": 140,
"grossAmount": 170.79999999999998,
"rate": 22,
"netCompare": 0,
"grossCompare": 0
}
In a checkout interface, the correct SKU is typically identified by matching the user's selections (the options) with the skus array contained within the selected variant.
QuantityTable (Tier Pricing)
The quantityTable allows you to define automatic discounts based on the quantity of items added to the cart. It is an array of objects that define price thresholds (tiers).
Tier Definition
| Property | Type | Description |
|---|---|---|
| min | number | Minimum quantity to activate the tier. |
| max | number | null | Maximum quantity for the tier (null indicates "infinite"). |
| discountType | string | Type of discount applied: percentage, fixed. |
| discountValue | number | The discount value to be subtracted from the base price. |
| rounding | string | null | Rounding rule for the resulting price (e.g., 99 for .99€). |
Application Example
In the following example, the discount increases progressively as the number of items increases:
- From 1 to 4 items: 5% discount and rounding to
.00. - From 5 to 9 items: 10% discount and rounding to
.00. - Over 10 items: 20% discount and rounding to
.99.
[
{
"min": 1,
"max": 4,
"discountType": "percentage",
"discountValue": 5,
"rounding": "00"
},
{
"min": 5,
"max": 9,
"discountType": "percentage",
"discountValue": 10,
"rounding": "00"
},
{
"min": 10,
"max": null,
"discountType": "percentage",
"discountValue": 20,
"rounding": "99"
}
]
The webround.com SDK automatically calculates the final price by applying the discount tier corresponding to the SKU's amount (or grossAmount). If the quantity in the cart changes, the unit price is recalculated in real time.