Commerce Products
Manage product catalog entries and variants for storefront and order flows.
How It Works
- List and search products by
name, slug, or sku.
- Create product records with title, description, and base price.
- Add variants with unique SKUs, pricing, and attributes (size, color).
- Activate or deactivate products and variants as needed.
- Report catalog changes and sync to storefront indexes.
Usage
- CLI:
stateset "list products" or stateset-direct products <action>
- Writes require
--apply.
- MCP tools:
list_products, get_product, get_product_variant, create_product, update_product, create_product_variant.
Permissions
- Read:
list_products, get_product, get_product_variant — no --apply needed.
- Write:
create_product, update_product, create_product_variant — requires --apply.
Examples
stateset products list --status active --limit 25
stateset products get prod_123
stateset products create --name "Widget Pro" --sku WIDGET-PRO-001 --price 59.99 --apply
stateset products create-variant prod_123 --sku WIDGET-PRO-LG --size large --price 64.99 --apply
Status Flows
Product: Draft -> Active -> Archived
Output
{"status":"ok","product_id":"prod_123","sku":"WIDGET-001","name":"Widget","price":49.99,"active":true}
Present Results to User
- Product or variant identifiers affected.
- Pricing, status, or attribute changes applied.
- Variant count and active/archived state.
- Any validation checks or slug conflicts resolved.
Troubleshooting
- SKU not found: confirm variant SKU exists or create with
create_product_variant.
- Product inactive: activate before using in checkout or storefront.
- Slug conflict: use a unique slug or append a suffix.
- Missing price: every variant requires a
price before activation.
Error Codes
SKU_NOT_FOUND: No product or variant exists for the given SKU.
SLUG_CONFLICT: Another product already uses this slug.
MISSING_PRICE: Variant requires a price before activation.
Related Skills
- commerce-inventory — inventory items linked to product SKUs
- commerce-checkout — products added to carts during checkout
- commerce-vector-search — semantic search across the product catalog
- commerce-manufacturing — BOMs linked to finished products
References
- references/product-commands.md
- /home/dom/stateset-icommerce/examples/cli-reference.md
- /home/dom/stateset-icommerce/cli/src/commands/products.js
1---2name: commerce-products3description: Manage products, variants, and pricing in StateSet iCommerce. Use when listing, creating, or updating products, managing variants, or running `stateset-direct products`.4---56# Commerce Products78Manage product catalog entries and variants for storefront and order flows.910## How It Works11121. List and search products by `name`, `slug`, or `sku`.132. Create product records with title, description, and base price.143. Add variants with unique SKUs, pricing, and attributes (size, color).154. Activate or deactivate products and variants as needed.165. Report catalog changes and sync to storefront indexes.1718## Usage1920- CLI: `stateset "list products"` or `stateset-direct products <action>`21- Writes require `--apply`.22- MCP tools: `list_products`, `get_product`, `get_product_variant`, `create_product`, `update_product`, `create_product_variant`.2324## Permissions2526- **Read:** `list_products`, `get_product`, `get_product_variant` — no `--apply` needed.27- **Write:** `create_product`, `update_product`, `create_product_variant` — requires `--apply`.2829## Examples3031```bash32stateset products list --status active --limit 2533stateset products get prod_12334stateset products create --name "Widget Pro" --sku WIDGET-PRO-001 --price 59.99 --apply35stateset products create-variant prod_123 --sku WIDGET-PRO-LG --size large --price 64.99 --apply36```3738## Status Flows3940**Product:** Draft -> Active -> Archived4142## Output4344```json45{"status":"ok","product_id":"prod_123","sku":"WIDGET-001","name":"Widget","price":49.99,"active":true}46```4748## Present Results to User4950- Product or variant identifiers affected.51- Pricing, status, or attribute changes applied.52- Variant count and active/archived state.53- Any validation checks or slug conflicts resolved.5455## Troubleshooting5657- SKU not found: confirm variant SKU exists or create with `create_product_variant`.58- Product inactive: activate before using in checkout or storefront.59- Slug conflict: use a unique slug or append a suffix.60- Missing price: every variant requires a `price` before activation.6162## Error Codes6364- `SKU_NOT_FOUND`: No product or variant exists for the given SKU.65- `SLUG_CONFLICT`: Another product already uses this slug.66- `MISSING_PRICE`: Variant requires a price before activation.6768## Related Skills6970- commerce-inventory — inventory items linked to product SKUs71- commerce-checkout — products added to carts during checkout72- commerce-vector-search — semantic search across the product catalog73- commerce-manufacturing — BOMs linked to finished products7475## References76- references/product-commands.md77- /home/dom/stateset-icommerce/examples/cli-reference.md78- /home/dom/stateset-icommerce/cli/src/commands/products.js