W076: Create SKU
Creates a new finished-goods SKU. Triggered from the SKUs page, "New SKU".
Steps
-
Check code uniqueness. Verify
codeis unique within this org (case-insensitive). -
Validate type if supplied. If
typeIdis set, confirm it exists. -
Insert the SKU. Call
Products.createSku.
Returns
The new SKU.
Business rules
- Code is unique per org.
- Type is optional.
Errors
ValidationError. Duplicate code.NotFoundError. Type was not found.