Terminal
Terminal/Skill
Reference for Saleor backend behavior, covering discount precedence, stock availability modes, webhook triggers and migration pitfalls.
By Saleor
Works with
npx skills add saleor/agent-skills --skill saleor-coreBackend behavior reference derived from the Saleor core source code. Covers internal mechanics that aren't fully documented in the public API reference — discount precedence, stock availability modes, denormalized fields, and known Dashboard gotchas.
OrderDiscount / OrderLineDiscount objectsunit_discount_value on OrderLineOrderLine.isGift = true)Shop.useLegacyShippingZoneStockAvailabilityPRODUCT_VARIANT_*_IN_CHANNEL webhooks aren't firing| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Discounts | CRITICAL | discount- |
| 2 | Stock | CRITICAL | stock- |
discount-precedence — Full precedence hierarchy, stacking rules, manual vs voucher vs promotion interactions, denormalized field semantics, known Dashboard bugorder-discount-allocation — Two-pass calculation of order-level discounts (Pass A collapses records into a single subtotal_discount; Pass B distributes proportionally across lines with last-line absorbing rounding), what the API exposes (per-line totals, per-record-at-order amounts) and what it doesn't (per-record-per-line decomposition), gift-line shape gotcha (ORDER_PROMOTION on OrderLine.discounts[] when isGift = true), reconstruction guidance for consumersstock-availability-modes — Shop.useLegacyShippingZoneStockAvailability (3.23+), purchasability vs shippability, server queryset dispatch, mode-conditional webhooks, Dashboard UI / copy / severity rules, migration footguns, test fixturesRead individual rule files for detailed explanations and source-level evidence:
rules/discount-precedence.md
rules/order-discount-allocation.md
rules/stock-availability-modes.md
Each rule file contains:
saleor/ with function names and file paths