batches_from_csv
Generate manufacturing-batch drafts from an MRP worksheet CSV, listing BOM components and selecting warehouse, for read-only review before posting to EBMS.
Instructions
Turn approved MAKE rows of an MRP worksheet into manufacturing-batch drafts, read-only. For each it checks EBMS will accept the product as a finished good (it must be classified Track Count), lists every component from the bill of materials with its quantity per one finished good (EBMS does NOT add consumed materials itself when a batch arrives through the API), picks the warehouse (the one given, else where the product was last made), and returns the exact body to POST to INMFG with ebms_write. It creates nothing. Drafts mark nothing as made or consumed and never carry PROCESS: finishing and processing a batch is done by a person in EBMS. Show each draft and get a clear yes before writing it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | No | The worksheet's CSV text, exactly as the user attached or pasted it. | |
| path | No | Path of the worksheet CSV on this computer. Give this or csv. | |
| company | Yes | Required. Company, by ID or name. Must match the worksheet's company. | |
| warehouse | No | Warehouse ID for every batch. ASK the user if they have more than one; when omitted, each product's batch goes where it was last made. |