Create Replenishment Order
create_replenishment_orderCreates a replenishment order for multiple SKUs at a store, validating items and grouping by supplier to generate purchase orders with computed totals.
Instructions
Place a replenishment (restock) order for one or more SKUs at a store. Validates each SKU against the store, groups lines by supplier into purchase orders, computes line/PO/order totals, and updates on-order quantities. Returns a confirmation with per-PO detail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | One or more order lines (SKU + quantity). | |
| notes | No | Optional note attached to the order. | |
| storeId | Yes | Store identifier, e.g. one of: STORE-001, STORE-002, 47, 102 |