What placeholders and loop structures are available in Production Run export templates (including BOM components)?
Last updated: July 23, 2026
Overview
Production Run HTML export templates use Mustache syntax. The data context has two levels:
Run-level fields and loops — available directly in the template (batch header, summary, consolidated BOM, boolean flags).
Work-order-level fields and loops — available only inside the
{{#workOrders}}loop; each iteration exposes the full set of Work Order template placeholders.
Run-level placeholders
Production Run details
Placeholder | Description |
|---|---|
| Production run / batch number |
| Production run ID |
| Production run name |
| Production run status |
| Production run notes |
| Comma-separated alternate IDs |
| Date/time the run was created (formatted) |
| Date portion only |
| Time portion only |
| Expected completion date (formatted) |
Co-manufacturer (vendor) & warehouse
Placeholder | Description |
|---|---|
| Vendor / co-manufacturer name |
| Vendor email |
| Vendor address (single comma-separated line) |
| Production warehouse name |
| Production warehouse address (single line) |
Summary block
All prefixed with summary.:
Placeholder | Description |
|---|---|
| Total work orders in the run |
| Completed work orders |
| In-progress work orders |
| Planned work orders |
| Draft work orders |
| Overall progress percentage |
| Total planned quantity |
| Total completed quantity |
| Total service cost (formatted currency) |
Company & branding
These are the same on Production Run, Work Order, and other document types.
Placeholder | Description |
|---|---|
| Your company name |
| Company logo URL — use in |
| Ship-from / invoice address (plain text; falls back to Company Address if blank) |
| Same address formatted with line breaks and an HTML |
| Accounting email |
| Company website |
| Company phone |
| Luminous footer logo (base64 data URI — use triple braces in an |
Note on
company.address: This placeholder is present on Production Run templates, identical in shape to other document types. It sources from your Ship-from / Invoice Address setting, falling back to the general Company Address.
Boolean (conditional) flags at the run level
Use these to show or hide entire sections:
Flag | When it is |
|---|---|
| The consolidated BOM has at least one component row |
| The run has at least one work order |
| At least one work order in the run has BOM components |
hasWorkOrdersWithBomComponents is the correct run-level gate for a cross-work-order BOM table. Wrap the entire section — including the {{#workOrders}}{{#bomComponents}} inner loop — in this flag so the header and table disappear cleanly when no work order has components.
Consolidated BOM loop — {{#consolidatedBom}} (run level)
This loop aggregates component requirements summed across all work orders in the run. It is the right choice when you want a single run-level material requirements table.
{{#hasConsolidatedBom}}
<table>
{{#consolidatedBom}}
<tr>
<td>{{internalSku}}</td>
<td>{{productName}}</td>
<td>{{totalQty}}</td>
<td>{{uom}}</td>
<td>{{availableQty}}</td>
</tr>
{{/consolidatedBom}}
</table>
{{/hasConsolidatedBom}}
Placeholder | Description |
|---|---|
| Component SKU |
| Component product name |
| Unit of measure |
| True if the component is itself an assembly |
| Current on-hand available quantity for this SKU |
| Total required quantity summed across the entire run |
| Number of work orders that require this component |
| Comma-separated list of those work order numbers |
| Dynamic SKU custom fields (keyed by field name) |
| Dynamic variant attributes (keyed by attribute name) |
Sorting: Rows are sorted by
internalSkualphabetically.
Work Orders loop — {{#workOrders}} (run level)
Each iteration of this loop renders one work order using the full Work Order view model — every Work Order placeholder is available inside. This is how per-work-order appendices and BOM breakdowns per work order are built.
{{#workOrders}}
<h2>Work Order {{workOrderNumber}}</h2>
<p>{{producedSku}} — Planned: {{plannedQuantity}}</p>
{{#hasBomComponents}}
<table>
{{#bomComponents}}
<tr>
<td>{{componentSku}}</td>
<td>{{componentDescription}}</td>
<td>{{requiredQty}}</td>
<td>{{availableQty}}</td>
</tr>
{{/bomComponents}}
</table>
{{/hasBomComponents}}
{{/workOrders}}
Work order header fields (inside {{#workOrders}})
Placeholder | Description |
|---|---|
| Work order number |
| Work order ID |
| Work order status |
| Work order notes |
| Comma-separated alternate IDs |
| Date/time the work order was created |
| Expected completion date |
Produced product (inside {{#workOrders}})
Placeholder | Description |
|---|---|
| Produced (assembly) SKU |
| Produced product name |
| The co-manufacturer's own SKU for this product |
| Unit of measure name |
| Planned production quantity |
| Service fee per unit (currency) |
| Total service cost — planned qty × service fee (currency) |
Completions (inside {{#workOrders}})
Placeholder | Description |
|---|---|
| Total produced quantity |
| Total scrapped quantity |
| Yield percentage |
Vendor & warehouses (inside {{#workOrders}})
Placeholder | Description |
|---|---|
| Co-manufacturer name |
| Co-manufacturer email |
| Co-manufacturer phone |
| Co-manufacturer address (single line) |
| Production warehouse name |
| Production warehouse address |
| Destination warehouse name |
BOM components loop — {{#bomComponents}} (inside {{#workOrders}})
This loop lists the individual BOM component rows for that specific work order (not aggregated).
Placeholder | Description |
|---|---|
| Component SKU |
| Component description / product name |
| Component supply mode |
| Component quantity required per unit of output |
| Total required quantity (qty per unit × planned qty for this work order) |
| Current on-hand available quantity for this component SKU |
| Dynamic SKU custom fields |
| Dynamic variant attributes |
Production steps loop — {{#productionSteps}} (inside {{#workOrders}})
Placeholder | Description |
|---|---|
| Step sequence number |
| Step output SKU |
| Step output product name |
| Step status |
| True if the step uses an outside vendor |
| Outside-processing vendor name |
| Step planned quantity |
| Step completed quantity |
| Step remaining quantity |
Per-work-order boolean flags (inside {{#workOrders}})
Flag | When it is |
|---|---|
| This work order has at least one BOM component |
| This work order has at least one production step |
Work order custom fields (inside {{#workOrders}})
Access work order-level custom fields by name using {{orderCustomFields.YourFieldName}}.
Quick reference: which loop / field to use for BOM components
Goal | Loop to use | Key field for SKU |
|---|---|---|
One table with totals across the entire run |
|
|
Per-work-order breakdown (one table per WO) |
|
|
Hide entire BOM section when nothing exists |
| — |
Hide BOM table for one specific work order |
| — |
Common mistake: There is no top-level
bomComponentsloop, nosharedComponentssection, and nohasBomComponentsflag at the run level. The run-level aggregated BOM is always underconsolidatedBom, and the per-work-order BOM is alwaysbomComponentsnested inside{{#workOrders}}.