Miridia
Portal
Guides

Bills of material

Define what a product is made of. Version the recipe, add scrap factors and production costs, and calculate the cost on any date.

A bill of materials (BOM) is the recipe of a product. It lists the component products and the quantity of each that one output needs. Miridia uses the BOM to calculate a cost, to plan purchases, and to run production.

BOM types

TypeUse
AssemblyProduction uses the components to make a new finished good. The components leave stock, and the finished good enters stock.
KitThe components are packed together. Each component stays an individual product in inventory.

Revisions and status

A recipe changes over time. Miridia never changes an active recipe in place. You make a new revision.

Each BOM has a revision number, an effective date, and an optional expiry date. Each BOM also has a status:

StatusMeaning
DraftYou are still preparing the recipe.
ActiveThe current recipe. New work orders use it.
BlockedNobody can use the recipe, for example during a quality hold.
SupersededA newer revision replaced this recipe.

When you activate a new revision, it becomes the default for new work. Work orders that already started keep the revision that they started with. Read Production.

Line items

Each line item names a component product and gives:

  • the quantity for each output
  • the unit of measure
  • the scrap factor, as a percentage. This is the waste allowance. A scrap factor of 5% on 0.3 rolls of paper calculates the cost of 0.315 rolls.
  • a sort order and notes

A BOM also has an output quantity and assembly instructions.

Production cost lines

Some costs do not belong to a component. Examples are labour, packaging overhead, and inbound freight. Add them to the BOM as cost lines. Each cost line has a type:

Cost typeCalculation
FixedPerUnitA fixed amount for each unit.
PercentageA percentage of the material cost.
HourlyRateA rate for each hour of work.

Each cost line can have a general ledger account code. The accounting integration uses the code.

How Miridia calculates the cost

The BOM stores no prices. Miridia reads the purchase price of each component from its price history on the date that you ask for. It then adds the cost lines.

Notebook, cost on 2026-01-31
Component costs (from the price history)
  Paper roll      0.3 rolls  x R40.00  =  R12.00
  Ink             50 ml               =  R 4.50
  Cover           2 x R9.00           =  R18.00
  Scrap factor    5% on paper         =  R 0.60
  Material cost                       =  R35.10

Production cost lines
  Assembly labour (fixed per unit)    =  R 8.00
  Packaging overhead (fixed per unit) =  R 3.50
  Inbound freight (5% of material)    =  R 1.75
  Production costs                    =  R13.25

Total BOM cost                        =  R48.35

Selling price                         =  R89.00
Gross margin                          =  R40.65 (45.7%)

This design has three results:

  • One source of truth. The price history is the only place that holds a cost.
  • The past cost is always available. Ask for the cost on any date. Miridia uses the prices on that date.
  • A supplier price change applies at once. When the price of paper goes up, each BOM that uses paper shows the new cost.

Margin over time

The BOM history endpoint gives the cost, the selling price, and the gross margin of a product over time. It gives one point for each date on which a component price changed, and one point for today. Use it to find a margin that decreases slowly.

Multi-level BOMs

A component can have its own BOM. An example is a sauce that you make and then use in three products. The BOM tree endpoint expands the active BOM of a product into a full tree, with the cost rolled up from the lowest level.

Model a shared intermediate, for example a base mix, as its own product with its own BOM. Then you can stock it, cost it, and use it in more than one recipe.

API reference