Commerce
crubal.com/commerce: the machinery of selling. It attaches to items and services; it is never part of the core (chapter 1, "the engine is universal at the kind level").
Facets
| Key | Type | How many | Values and settings | Same as |
|---|
price | number | one | unit currency | schema:price |
compareAt | number | one | unit currency | |
cost | number | one | unit currency | |
sku | text | one | up to 80 characters | schema:sku |
stock | number | one | | |
offerStatus | choice | one | draft, listed, reserved, sold, withdrawn | |
shippingWeight | number | one | unit kg, accepts g, lb, oz | |
shipsFrom | text | one | | |
taxCode | text | one | | |
Classes
Offer Offer
For item, service.
| Facet | Asked | Narrowed to | Level |
|---|
price | | | unit |
compareAt | | | unit |
cost | | | unit |
sku | | | unit |
stock | | | unit |
offerStatus | required | | unit |
shippingWeight | | | |
shipsFrom | | | |
taxCode | | | |
Rules
| Rule | When | Then | Strength |
|---|
listedNeedsPrice | offerStatus is listed | price has | must |
costIsStaff | | cost shown to staff | must |
soldHasNoStock | offerStatus is sold | stock in 0..0 | should |
Use it
package: mine /2026-10-14
owner: example.com
extends: crubal.com/commerce /2026-10-14
prefixes:
commerce: crubal.com/commerce