What placeholder variables are available in Sales Order document templates, and how do I add a line-item unit price column?
Last updated: October 11, 2026
Overview
Sales Order document templates in Luminous use Mustache — a logic-less template language where {{placeholderName}} inserts a value and {{#sectionName}}...{{/sectionName}} loops over a list or conditionally shows content. Templates are managed under Manage → Templates. The built-in placeholder picker (the Insert Placeholder button) in the template editor lists every available field; this article is the full written reference.
How to add a Unit Price column to the order lines table
This is the most common customization. The placeholder is {{unitPrice}} and it lives inside the {{#orderLines}} loop. Here is how to add the column:
Step 1 — Add the column header
In the Items Header HTML section of your template, add a <th> for Unit Price:
<th scope="col" style="text-align: right;">Unit Price</th>
Place it wherever you want it relative to the other headers (e.g., after the Description column and before the Qty columns).
Step 2 — Add the data cell in the row template
In the Item Row HTML section, inside the {{#orderLines}}...{{/orderLines}} loop, add the matching <td>:
<td valign="top" style="text-align: right;">{{unitPrice}}</td>
{{unitPrice}} renders as $X,XXX.XX (formatted with the dollar sign and two decimal places). If you need the raw number without formatting — for example, to test whether the price is non-zero — use {{unitPrice.raw}}.
Tip: Keep the number of
<th>cells in the header and<td>cells in the row in sync so the table columns align correctly.
Full placeholder reference
Order Details
Placeholder | Description |
|---|---|
| Sales order number |
| Order creation date/time (formatted). Also: |
| Estimated ship date. Also: |
| Public/customer-facing notes |
| Internal notes (not customer-facing) |
| Shipping/delivery instructions from the ship-to address |
| Shipping notes with line breaks preserved as HTML (use triple braces) |
| Requested shipping service |
| Current order status |
| Customer PO number |
| First associated invoice ID |
| First invoice grand total as $X,XXX.XX (use |
| First invoice subtotal as $X,XXX.XX |
| First invoice tax amount as $X,XXX.XX |
| First invoice shipping amount as $X,XXX.XX |
Company Information (prefix: company.)
Placeholder | Description |
|---|---|
| Your company name |
| Your company logo URL (wrap in |
| Your company address (Ship-from / Invoice Address) |
| Your company email |
| Your company website |
| Your company phone |
Customer Information (prefix: customer.)
Available fields include {{customer.name}}, {{customer.email}}, {{customer.phone}}, {{customer.companyName}}, and customer custom fields via {{customer.customFields.YourFieldName}}.
Shipping & Billing Contacts
{{shipTo.*}} and {{billTo.*}} provide structured contact details. Common sub-fields include {{shipTo.name}}, {{shipTo.company}}, {{shipTo.street1}}, {{shipTo.city}}, {{shipTo.state}}, {{shipTo.postalCode}}, {{shipTo.country}}, {{shipTo.phone}}. Use {{{shipTo.fullAddressBlock}}} (triple braces) for a pre-formatted multi-line address block.
Document Totals
These totals are calculated from the line items on this specific document (for fulfillment orders, only items in the FO; for full sales orders, all items).
Placeholder | Description |
|---|---|
| Sum of all line subtotals on this document |
| Total discount for this document |
| Tax (always $0 for fulfillment orders) |
| Shipping (always $0 for fulfillment orders) |
| Grand total for this document |
For full sales-order totals that stay consistent even when exporting a fulfillment order, use the salesOrder* variants: {{salesOrderSubtotal}}, {{salesOrderDiscount}}, {{salesOrderTax}}, {{salesOrderShipping}}, {{salesOrderGrandTotal}}.
Overall Unit Totals
Placeholder | Description |
|---|---|
| Sum of all top-level line quantities |
| Sum of kit component quantities |
| Non-kit line quantities + component quantities |
Shipments Loop ({{#shipments}}...{{/shipments}})
Inside this loop: {{trackingNumber}}, {{carrierCode}}, {{serviceCode}}, {{shipDate}}, {{shipmentCost}}, {{isReturnLabel}}.
Inside the Order Lines loop ({{#orderLines}}...{{/orderLines}})
Every placeholder below is only valid inside the {{#orderLines}} loop.
Identity & Description
Placeholder | Description |
|---|---|
| 1-based line number |
| SKU as received from the sales channel |
| Product name as received from the sales channel |
| Internal (Luminous-managed) SKU |
| Internal product name |
| Channel-mapped SKU |
| Channel-mapped product name |
| Line item description from the order source |
| Unit of measure (e.g., EA) |
| Thumbnail image URL |
Quantities
Placeholder | Description |
|---|---|
| Ordered quantity (formatted number; |
| Quantity assigned to fulfillment orders |
| In fulfillment but not yet shipped |
| Total quantity shipped |
| Quantity not yet in fulfillment or shipped |
Pricing
Placeholder | Description |
|---|---|
| Unit (wholesale) price as $X,XXX.XX; use |
| Line subtotal (quantity × unit price) as $X,XXX.XX |
| Discount amount for this line as $X,XXX.XX |
| Line total after discount (lineSubtotal − lineDiscount) as $X,XXX.XX |
Status & Dates
Placeholder | Description |
|---|---|
| Operational status: Shipped, Partially Shipped, In Fulfillment, Partially In Fulfillment, or Backordered |
| Customer-facing status (future-dated unshipped lines show as Backordered) |
| Estimated ship date for this line. Also: |
|
|
|
|
Location
Placeholder | Description |
|---|---|
| Warehouse name from the picking location |
| Bin/shelf pick location within the warehouse |
| External location code from the order source |
Custom Fields (within the loop)
Line item custom fields:
{{lineCustomFields.YourFieldName}}(or loop with{{#lineCustomFields.list}})SKU custom fields:
{{skuCustomFields.YourFieldName}}Variant attributes:
{{variantAttributes.YourAttributeName}}
Kits & Lots
Use
{{#isKitParent}}...{{/isKitParent}}to show content only for kit parent lines.Kit component lines are available via the nested
{{#components}}...{{/components}}loop (fields:sku,productName,quantity,uom,warehouse,location).Lot data is available via
{{#lot}}...{{/lot}}(fields:number,expiryDate,productionDate,manufacturerCode).
Tips for currency and number fields
{{unitPrice}}→$12.50(formatted, always present){{unitPrice.raw}}→12.5(unformatted float, useful for zero-checks — see the conditional content guide)All currency fields (
unitPrice,lineSubtotal,lineTotal,lineDiscount,orderSubtotal, etc.) follow the same pattern.
Where to find the authoritative placeholder list
The template editor under Manage → Templates includes a live placeholder picker (Insert Placeholder) that reflects your account's custom fields alongside all standard fields. Use it as the authoritative reference for field names — placeholders are case-sensitive and must be camelCase (e.g., {{unitPrice}}, not {{unit_price}}).