Skip to main content
Version: v1.0.0

Bills of Materials

A bill of materials (BOM) is a recipe: it lists what a product is made from and in what quantity. When you create a work order or a production order for a product, Pharus reads that product's BOM to work out which materials and components the job will consume.

A BOM has no header record of its own — it is the set of component lines attached to an output product. Each line names one component and a quantity.

What a line can be​

Each BOM line references exactly one of two things:

  • a material — a raw input, or
  • an input product — another product used as a sub-assembly.

A line can't be both, and a product can't appear in its own BOM. This is what lets you model multi-level products: a finished gift set whose BOM includes a boxed candle product, whose own BOM in turn includes wax and a jar.

FieldMeaning
productIdThe output product this recipe builds
materialId or inputProductIdThe component on this line (exactly one)
quantityHow much of that component one unit of the output needs

How orders use a BOM​

The BOM is read at order-creation time and snapshotted onto the order, so later edits to a recipe never rewrite the history of a job already in flight.

  • Work orders snapshot the BOM one level deep — both materials and component products become inputs.
  • Production orders explode the BOM all the way down to raw materials only.

Because recipes are snapshotted rather than referenced, editing a BOM replaces its lines wholesale; there's no in-place update.

See also​

Manage BOMs through the REST API or the MCP server.