2.0 KiB
14 — Pricing & Supplier Master Data
Status: Not Started Depends On: 01 — Item Catalog
Goal
Covers the remainder of mainPlan.md §7
not already handled by 01_item_catalog.md: price lists and supplier master
records. createProduct/deactivateSku live in 01; this step is everything else in §7.
Background / Context
Item.BasePrice (from 01_item_catalog.md) is a single flat price. There is
no concept of a region- or date-scoped price list, and no Supplier entity anywhere in the schema.
Data Model Changes
Price List
Name, RegionId (nullable — null means global), EffectiveFrom, EffectiveTo.
Price List Item
PriceListId, ItemId, Price — overrides Item.BasePrice when an applicable, currently-
effective price list exists for the order's region.
Supplier
Name, ContactInfo, PerformanceScore (nullable, populated by
15_procurement.md's evaluateSupplier).
API Endpoints
| Function reference | Endpoint intent |
|---|---|
createPriceList(name, region, effectiveDates) |
POST /api/price-lists |
updateProductPricing(sku, priceListId, price) |
PUT /api/price-lists/{id}/items/{sku} |
createSupplierMaster(supplierData) |
POST /api/suppliers |
Business Rules
applyPricingAndDiscounts(§1, used in 01_item_catalog.md and 06_sale_ride.md) resolves price in this order: region-scoped active price list → global active price list →Item.BasePrice.- Two price lists cannot have overlapping
EffectiveFrom/EffectiveToranges for the same(ItemId, RegionId)pair.
Open Questions
- Are price lists customer/segment-specific as well as region-specific (ties into
Store.Segmentfrom 12_store_management.md), or region-only in v1?
Implementation Notes
Fill this section in during planning discussion before writing any code.