What placeholder variables are available in Sales Order document templates, and how do I add a unit price column to the line-item loop?
Last updated: October 11, 2026
Overview
Sales Order document templates in Luminous use Mustache-style placeholders ({{variableName}}) inside four HTML sections: Header, Items Header, Item Row, and Footer. The Item Row section wraps each line in a {{#orderLines}}…{{/orderLines}} loop. The default template does not include a price column, but you can add one in a few steps.
How to open and edit a Sales Order template
Go to Manage → Templates.
Locate your Sales Order template, or create a new one.
Click the ⋮ menu on the template's row and choose Edit to open the HTML editor (Configuration Mode: Use Custom HTML).
Make changes to the Items Header and Item Row sections, then click Save.
Adding a Unit Price column — step by step
Step 1 — Add the column header
In the Items Header section, add a <th> cell where you want the price to appear. For example, after the Qty Ordered header:
<th scope="col" style="text-align: right;">Unit Price</th>
Step 2 — Add the data cell inside the line loop
In the Item Row section, inside the {{#orderLines}}…{{/orderLines}} block, add a matching <td> cell:
<td valign="top" style="text-align: right;">{{unitPrice}}</td>
{{unitPrice}} renders as a formatted dollar amount (e.g. $12.50). If you need the raw number without the $ symbol or comma formatting — for example to use in a calculation or custom script — use {{unitPrice.raw}} instead.
You may also add the line subtotal, discount, and total columns the same way:
Placeholder | What it shows |
|---|---|
| Unit price, formatted as $X,XXX.XX |
| Quantity × unit price, formatted as $X,XXX.XX |
| Discount applied to this line, formatted as $X,XXX.XX |
| Line subtotal minus discount, formatted as $X,XXX.XX |
Append .raw to any of these (e.g. {{lineTotal.raw}}) to get the plain numeric value.
Full placeholder reference
Order-level placeholders (use anywhere in Header / Footer)
Placeholder | Description |
|---|---|
| Sales order number |
| Order creation date (formatted) — also |
| Estimated ship date — also |
| Current order status |
| Customer-facing notes |
| Internal/private notes |
| Shipping instructions from the ship-to address |
| Shipping notes with line breaks preserved (use triple braces) |
| Requested shipping service |
| Customer PO number |
Company (your business)
Placeholder | Description |
|---|---|
| Your company name |
| Your company logo URL |
| Your company email |
| Your company website |
| Your company phone |
| Ship-from / invoice address (plain text) |
Customer
Placeholder | Description |
|---|---|
| Customer / account name |
| Customer email |
| Customer phone |
Addresses
Placeholder | Description |
|---|---|
| Ship-to contact fields |
| Ship-to address as a preformatted HTML block (use triple braces) |
| Same fields as |
Document totals
Placeholder | Description |
|---|---|
| Sum of all line subtotals |
| Total discount across all lines |
| Tax amount |
| Shipping amount |
| Subtotal − discount + tax + shipping |
| Same values always pulled from the parent Sales Order (useful on Fulfillment Order exports) |
Append .raw to any currency placeholder for the unformatted number.
Invoice details (first associated invoice)
Placeholder | Description |
|---|---|
| First invoice ID |
| First invoice grand total |
| First invoice sub-components |
Totals & unit counts
Placeholder | Description |
|---|---|
| Sum of all top-level line quantities |
| Non-kit line quantities + kit component quantities |
Inside the {{#orderLines}} loop (Item Row section)
Identity & description
Placeholder | Description |
|---|---|
| Sequential line number (1, 2, 3…) |
| 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 (if configured) |
| Channel-mapped product name |
| Line item description from the order source |
| Unit of measure (e.g. EA) |
| Product thumbnail URL |
Quantities
Placeholder | Description |
|---|---|
| Quantity ordered |
| Quantity assigned to fulfillment orders |
| Assigned to FOs but not yet shipped |
| Quantity already shipped |
| Quantity not yet assigned or shipped |
Append .raw for the plain number (e.g. {{quantity.raw}}).
Pricing
Placeholder | Description |
|---|---|
| Unit price as $X,XXX.XX |
| quantity × unitPrice as $X,XXX.XX |
| Line discount amount as $X,XXX.XX |
| lineSubtotal − lineDiscount as $X,XXX.XX |
Append .raw for unformatted values; append .decimals4 (or any digit 0–6) for custom decimal precision.
Status
Placeholder | Description |
|---|---|
| Shipped / Partially Shipped / In Fulfillment / Partially In Fulfillment / Backordered |
| Customer-facing version of status (future-dated lines show Backordered) |
Dates
Placeholder | Description |
|---|---|
| Estimated ship date for this line — also |
|
|
Location (for warehouse-picked orders)
Placeholder | Description |
|---|---|
| Warehouse name from the pick location |
| Bin / shelf name within the warehouse |
| Location code from external systems (e.g. ShipStation) |
Custom fields (inside {{#orderLines}})
Placeholder pattern | Description |
|---|---|
| A line-item custom field by name |
| A SKU-level custom field by name |
| Loop over all line custom fields |
Kits & lots
Use
{{#isKitParent}}…{{/isKitParent}}to show kit-specific content on parent rows.Kit component rows are available in a nested
{{#components}}…{{/components}}loop, with{{sku}},{{productName}},{{quantity}},{{uom}},{{warehouse}}, and{{location}}.Lot details (when lot tracking is enabled) are in a
{{#lot}}…{{/lot}}block:{{number}},{{expiryDate.short}},{{manufacturerCode}}.
Conditional sections
Use Mustache block tags to show content only when a value is present, or based on document type:
{{#unitPrice}}Unit Price: {{unitPrice}}{{/unitPrice}}
{{#isSalesOrder}}Sales Order: {{orderNumber}}{{/isSalesOrder}}
{{#isFulfillmentOrder}}Fulfillment Order{{/isFulfillmentOrder}}
Tip: browse placeholders in the template editor
The template editor in Manage → Templates includes a built-in placeholder reference panel. Use it to browse all available variables and copy them directly into your HTML without switching screens.