DocForgeDocForge
TemplatesUse casesGlossaryHow-toPricingDevelopers
Sign inStart free
DocForgeDocForge© 2026
PricingAboutTemplatesUse casesGlossaryHow-toDevelopersTermsPrivacyRefundsContact

DocForge is a product of Rev Vision Ltd, registered in England & Wales (Company No. 14368830). Registered office: 86–90 Paul Street, London, England, United Kingdom, EC2A 4NE.

Glossary

Glossary

Template variable

A template variable is a named placeholder that gets replaced with a value from a CSV row, database record, or API payload.

What is Template variable?

A template variable is a named placeholder that marks where a generated document should insert a value from source data. A variable might represent customer_name, quote_number, invoice_total, start_date, site_address, or technician_name. During rendering, the system matches that name to a CSV column, database field, form answer, or API payload property and replaces the placeholder with the current record's value. Template variables are the contract between the document layout and the data feeding it, so clear naming is important. Ambiguous variables make mapping harder and can put the wrong value into a polished PDF. Good workflows document which variables are required, show missing values during preview, and test edge cases such as long text, blank optional fields, and unusual currency values before generating documents at volume for real recipients.

A template variable is the named connection point between a document template and its source data. Variables such as customer_name, quote_number, total, site_address, or technician_name mark the places where generated documents should insert values. During rendering, the system looks up each variable in the current row or payload and replaces the placeholder with the matching content.

Variables are simple, but naming discipline matters. Clear names help operators understand what a template expects and make mapping easier when a CSV export changes. Ambiguous names create review risk because the wrong value can appear in a polished document. A good template also distinguishes required variables from optional ones and makes missing data obvious during preview. In a larger document automation workflow, variables work alongside filters, conditionals, and repeated sections, but they remain the most important contract between people and software. If a finance, sales, or operations teammate can read the variable list and understand the document, the workflow is much easier to maintain.

Questions, answered

Should template variable names match CSV headers?
Usually yes. Matching names makes previews and troubleshooting easier because the source column and the placeholder use the same language.

Related terms

  • Variable substitution
  • Liquid template
  • Document template

Related templates

  • Quote PDF template
  • Work order PDF template
  • Receipt PDF template

Related how-tos

  • How to generate work orders from a CSV
  • How to generate quotes from a CSV