All articles

June 23, 2026 · Articles

HTML Templates: How to Use Field Codes


This is part two of our four-part series on HTML email templates in BigWave. If you’re new to templates, start with what they are and why they matter — including how AI can build the layout for you so you never have to touch raw HTML. Part three covers formatting dates and dollar amounts, and part four covers alerts and everything else.

Here we’re focused on the most valuable template of all: the invoice email. A clean, accurate invoice that lands in your customer’s inbox with a one-click payment button gets you paid faster and makes your business look buttoned-up.

What makes an invoice template tick

Once your layout is in place (built by hand or generated by AI), you personalize it with field codes — placeholders in [square brackets] that BigWave fills in from the work order when the invoice is sent. There are three kinds:

  1. Simple value codes replace themselves with one piece of data. [InvoiceNumber] becomes 14695-1; [TotalSummary.TotalPricePlusTax] becomes the grand total.
  2. Repeating blocks print a row for each line item on the job, so a 12-item invoice and a 2-item invoice both come out correctly without you touching the template.
  3. Conditional blocks show or hide text depending on the invoice — for example, only mentioning a deposit when the balance is over a threshold.

Any code that carries a date or a dollar amount can also take an inline format instruction so you control exactly how it reads — $1,250.00 instead of 1250.00, or July 1, 2026 instead of a full timestamp. That’s the whole subject of part three.

Remember: keep all styling inline, and if a code prints as literal [bracketed] text in a preview, it’s misspelled. Fix the spelling and preview again.


Sample field codes

Drop these into your template. When the invoice is sent, BigWave replaces each one with the real value from the work order. Spelling must match exactly.

Want the complete, always-current list instead of just the highlights? Here’s how to pull the full merge-field list directly from BigWave, with real sample data for a work order of your choice.

Invoice & job details

Field codeWhat it becomes
[InvoiceNumber]Invoice number (e.g. 14695-1)
[InvoiceDate.Date]Date of the invoice
[WO.WOID]Work order number
[WO.PONumber]Customer PO number
[WO.ScheduledStartDateSite]Scheduled job date/time
[Notes]Invoice / work description
[WO.CustomField.Group.Name]Any custom field (e.g. permit number)

Addresses

Field codeWhat it becomes
[BillingAddress.AddressName]Bill-to name
[BillingAddress.StreetAddress]Bill-to street
[BillingAddress.CSZ]Bill-to city/state/zip
[BillingAddress.EmailAddress]Bill-to email
[WO.Site.SiteName]Service site name
[WO.Site.StreetAddress]Service site street
[WO.Site.CSZ]Service site city/state/zip
[WO.Site.MainPhone]Service site phone

Your company (payment address)

Field codeWhat it becomes
[PaymentAddress.StreetAddress]Your street (footer)
[PaymentAddress.CSZ]Your city/state/zip
[PaymentAddress.MainPhone]Your phone
[PaymentAddress.EmailAddress]Your email

Totals

Field codeWhat it becomes
[LaborSummary.TotalPrice]Labour subtotal
[MaterialsSummary.TotalPrice]Materials subtotal
[OtherSummary.TotalPrice]Other subtotal
[FeesSummary.TotalPrice]Fees subtotal
[TotalSummary.TotalPrice]Subtotal (before tax)
[TotalSummary.SalesTaxGST]Tax amount
[TotalSummary.TotalPricePlusTax]Grand total due

Line-item sections & repeating rows

Wrap a section so it hides when empty, and repeat one row per line item:

[#block LaborPricingContainer collapseIfEmpty]
  <h3>Labour</h3>
  <table>
    [#each Pricing]
      <tr><td>[ItemNameForInvoice]</td><td>[Qty]</td><td>[TotalPrice]</td></tr>
    [/each]
  </table>
  Subtotal: [Summary.TotalPrice]
[/block]
ConstructWhat it does
[#block Container collapseIfEmpty] … [/block]A section that disappears (heading and all) when it has no items. Containers: LaborPricingContainer, MaterialsPricingContainer, OtherPricingContainer, FeesPricingContainer.
[#each Pricing] … [/each]Repeats its row once per line item inside a section.
[Summary.TotalPrice]That section’s subtotal (used inside a #block).

Row fields available inside [#each Pricing]: [ItemNameForInvoice] / [MaterialName] / [ItemName], [Qty], [UnitPrice], [TotalPrice], and [TransactionDate.Date].


Conditional text

Show text only when a condition is true ([#else] is optional):

[#if AmountDue > 100]
  A deposit is required for balances over $100.
[#else]
  Thank you — your balance is under the deposit threshold.
[/if]

Compare values with >, >=, <, <=, ==, !=; combine conditions with && or ||. A bare field name tests whether it has a value (or a non-empty list).


Your personal message

Field codeWhat it becomes
[UserMessage]The note you type when sending the invoice lands here.

Pay Now button

The Pay Now button is powered by BigWave’s built-in integration with Gravity Payments, our payment processing partner. When a customer clicks the button, they land on a hosted, PCI-compliant payment page pre-filled with the invoice total. Once they pay, the transaction is recorded against the invoice automatically.

Field codeWhat it becomes
[PaymentLink]Put this inside the button’s link (href); it becomes a secure payment URL on a real, sent invoice.

Work Order Status button

This is what lets a routine email double as a workflow step: instead of asking someone to log in and update a work order by hand, you hand them a link that does it in one click. A customer quote email can carry an “Approve” button that moves the job from Pending Approval to Approved; an internal notification can carry a “Mark Complete” button for a technician or supervisor. The recipient doesn’t need a BigWave login — clicking the link and confirming is enough to trigger the status change.

Field codeWhat it becomes
[WOStatusAction status='Approved']Put this inside a button’s href; clicking it moves the work order to the status name you specify (e.g. Approved) once the recipient confirms. Case insensitive, but the work order status spelling must match.

Use single quotes around the status name so they don’t clash with the double-quoted href="…". The status must match a status name on that work order’s project (case doesn’t matter). Add as many buttons as you like — an “Approve” and a “Reject” button can sit side by side, each pointing at its own status.

Building this for quote approvals? Add a snippet='…' argument alongside status to control the confirmation page your customer sees before the status changes — without it, they land on a blank page after clicking. How to Automate Quote Approvals walks through setting one up end to end.


Build it step by step

  1. Start with a layout — generated by AI from your logo and text (see part one).
  2. Add your header and footer — logo up top, payment address in the footer using the [PaymentAddress.*] codes.
  3. Drop in the details — invoice number, dates, and the bill-to/site addresses from the tables above.
  4. Add a repeating line-item section using a [#block] / [#each Pricing] pair so the table grows and shrinks with the job.
  5. Show the totals, ending with [TotalSummary.TotalPricePlusTax] for the grand total due — or use a formatted numeric code if you’d rather control how it reads (see part three).
  6. Add a Pay Now button by putting [PaymentLink] inside the button’s href.
  7. Preview against a real work order, fix any field code that prints as literal text, then save.

From then on, sending an invoice is as simple as choosing the template and adding your personal note — and your customers get a clean, professional invoice they can pay in one click.

Next: Formatting dates and dollar amounts →

Try BigWave free for 30 days

Streamline national service centers and help desks, manage assets, eliminate status meetings, and deliver reliably with less.