Supported formats
Template syntax
- DOCX (Word)
- Google Docs / Slides
Inserting merge fields
- Place your cursor where you want the dynamic value.
- Press
Ctrl+F9(Windows) orCmd+F9(Mac) to create field brackets{ }. - Type the MERGEFIELD syntax between the brackets.
- Press
Cmd+Shift+Option+Uto save the merge field. - Use
Alt+F9(Windows) orOption+F9(Mac) to toggle between field codes and rendered values.
Syntax reference
Template variables reference
Every variable below is available in all template formats. Use dot notation to access nested values (e.g.,owner.name, line.formatted.price).
Top-level fields
Owner (sales rep)
Access viaowner.*.
Title block
Access viatitle_block.* or when iterating blocks with is_title.
Blocks
Theblocks array contains all blocks in the quote, in display order. Since blocks are polymorphic (they can be different types), use the type flags to conditionally render content.
Each block also has
terms_html (for Terms/Text blocks) and name (for Title/Option blocks).
Options
Access via theoptions array, primary_option, or when iterating blocks with is_option. Each option contains:
Calculations (periods)
Each option contains acalculations array with one entry per billing period (year, quarter, month). Access via option.calculations.
Formatted totals
Access viacalc.formatted.*.
One-time vs. recurring breakout
Access viacalc.breakout.*. Both raw numbers and formatted strings are available.
Line items
Access viacalc.lines, calc.one_time_lines, or calc.recurring_lines. Each line represents a single product on the quote.
Formatted line values
Access vialine.formatted.*. These are pre-formatted for display.
Unit of Measure
Access vialine.uom.* (nullable — may not be present on all lines).
Salesforce data
Available when the quote is linked to Salesforce. Always wrap in a conditional since this is null when Salesforce is not connected.Addresses
Access viasalesforce.billing_address.* or salesforce.shipping_address.* (both nullable).
Template examples
Cover page (DOCX)
Iterating through all blocks (DOCX)
Use the type flags to render each block type differently:Pricing options with year-by-year breakdown (DOCX)
Line items table (DOCX)
Separate one-time and recurring tables (DOCX)
Salesforce customer info with conditional (DOCX)
Full proposal (Google Docs)
Dynamic hash fields
Several variables use dynamic keys (marked as “Hash” in the reference). These includecustom_fields, custom_columns, summary, uom_fields, and product_custom_fields.
Access dynamic fields with dot notation using the field key:
Tips
Useformatted values for display. Most numeric fields have both a raw value (e.g., line.unit_price = 100.0) and a formatted version (e.g., line.formatted.unit_price = "$100.00"). Use the formatted versions in templates to get proper currency formatting without manual work.
Always wrap Salesforce data in conditionals. The salesforce object is null when no CRM is connected. Referencing salesforce.account_name without a conditional will produce an error in the generated document.
Use one_time_lines and recurring_lines for split tables. Instead of looping through all lines and checking the one_time flag on each, use the pre-filtered arrays for cleaner templates.
Test with a real quote. Generate a document from an actual quote to verify all merge fields resolve correctly. Nullable fields, empty arrays, and missing custom fields are the most common causes of template errors.
What’s next
Account Setup
Configure the logo and brand color that appear in generated documents.
Quote Overview
Understand the quote structure that document generation renders from.
Display Options
Control what pricing detail appears in generated documents.
Web Portal
Share interactive proposals alongside generated documents.

