Build to Order
Raise Manufacturing Orders for a Sales Order
Runs build to order for one sales order now, synchronously, and returns what it did. Works even while the automatic setting is off, and for orders placed before it was switched on; a product set to never build (or, when only selected products build, one not set to always) is still left alone. Safe to repeat: a second run with nothing changed raises nothing.
Raise a Manufacturing Order for a Sales Order Line
Raises a manufacturing order for one sales order line now, using the same per-line build-to-order run as Raise Manufacturing Orders for a Sales Order: the order is created for the line's uncovered shortfall, confirmed, and carries the line's customer options (snapshot on the order, bound to the recipe steps that use them). Works even while the automatic build-to-order setting is off, because someone asked for it. No request body.
List Build-to-Order Exceptions
Paginated open exceptions: sales-order lines that qualified for build to order but could not get a working manufacturing order. One row per line; a row disappears once a later run succeeds. `attempts` counts the runs that hit it.
Retry Build-to-Order Exception
Runs build to order again for the exception's sales order (same as Raise Manufacturing Orders for a Sales Order) and returns the same result shape. When the cause is fixed the exception is resolved and no longer listed.
Dismiss Manufacturing Order Build-to-Order Flag
Clears the flag build to order sets on a manufacturing order it may not change any more (`no_longer_needed`, `need_reduced`, `warehouse_changed`). The order itself is left as it is. Returns the manufacturing order.
Get Backorder Backfill Preview
How many open sales orders and lines Start Backorder Backfill would act on: lines with an uncovered shortfall on an eligible recipe item and no manufacturing order yet.
Start Backorder Backfill
Starts a background job, 'Raise manufacturing orders for existing backorders', that runs build to order for every order in the preview. It only raises or grows orders, never shrinks or cancels. Returns 202 with the tracked job ID; poll the tracked job for progress and its results (`orders_processed`, `manufacturing_orders_raised`, `manufacturing_orders_grown`, `exceptions_recorded`).