Skip to content

Template Author's Guide

This guide is written for legal professionals who want to create or customise their own document templates. No programming experience required.

Think of a template like a form letter where you leave blanks to fill in later. Instead of:

Dear _______, Thank you for instructing us in the matter of _______.

You write:

Dear {{ client.salutation }}, Thank you for instructing us in the matter of {{ matter.re_line }}.

When you generate a document, Certum Draft fills in those blanks automatically.

Throughout this guide, we’ll use examples from the fictional Dunder Mifflin Law Firm:

Michael Scott

Buying his first home in Scranton

Dwight Schrute

Selling his beet farm

The Knights Who Say Ni

Purchasing a shrubbery (strata property)

King Arthur

Estate of the Black Knight


A placeholder is text wrapped in double curly braces: {{ field.name }}

What You TypeWhat It Becomes
{{ client.full_name }}Michael Gary Scott
{{ client.street_address }}123 Slough Avenue
{{ property.address }}Schrute Farms, Rural Route 6
{{ matter.number }}2025-00042

Placeholders use dots to organise fields into categories:

{{ category.field_name }}

Think of it like a filing system:

  • client. = Client drawer
  • matter. = Matter drawer
  • property. = Property drawer
  • transaction. = Transaction details drawer

Your primary client’s information:

{{ client.full_name }} → Michael Gary Scott
{{ client.surname }} → Scott
{{ client.given_names }} → Michael Gary
{{ client.addressee }} → Mr M Scott
{{ client.salutation }} → Mr Scott
{{ client.street_address }} → 123 Slough Avenue
{{ client.suburb }} → Scranton
{{ client.state }} → PA
{{ client.postcode }} → 18505
{{ client.email }} → [email protected]
{{ client.phone }} → 555-0100

Information about the file:

{{ matter.number }} → 2025-00042
{{ matter.re_line }} → Purchase of 456 Paper Street
{{ matter.person_acting }} → Angela Martin (Solicitor)
{{ matter.person_assisting }} → Kevin Malone (Legal Assistant)
{{ property.address }} → 456 Paper Street, Scranton PA 18505
{{ property.re_line }} → 456 Paper Street, Scranton
{{ property.lot_number }} → 15
{{ property.dp_number }} → 123456

Your firm’s details (usually in letterheads):

{{ firm.name }} → Dunder Mifflin Law
{{ firm.street_address }} → 1725 Slough Avenue
{{ firm.phone }} → 555-0199
{{ firm.email }} → [email protected]

Sometimes you only want text to appear in certain situations. Use conditionals:

{%p if property.is_strata %}
This is a strata property. You should review the by-laws carefully.
{%p endif %}

This paragraph only appears if the property is strata titled.

{%p if property.has_pool %}
We remind you that a valid Certificate of Compliance for the swimming
pool must be attached to the contract before it is signed.
{%p endif %}

Example: Different Text for Different Situations

Section titled “Example: Different Text for Different Situations”

Let’s say Sir Lancelot is selling his castle. We need different text depending on whether it’s an auction:

{%p if sale.is_auction %}
The property will be sold at auction. You should attend or arrange
for someone to bid on your behalf. Remember: once the hammer falls,
you're committed - there's no saying "I didn't mean it!"
{%p endif %}
{%p if not sale.is_auction %}
Once a buyer has been found, please let us know so their solicitor's
details can be added to the contract.
{%p endif %}

These are the typical yes/no questions that trigger conditional text:

FieldWhat It Controls
property.is_strataStrata/unit title
property.has_poolSwimming pool
property.has_illegal_worksUnapproved building works
sale.is_auctionAuction vs private treaty
sale.is_estateDeceased estate
transaction.simultaneous_purchaseCoordinated sale/purchase
transaction.deposit_releaseEarly deposit release

Dates are stored in a standard format but can be displayed however you like:

{{ client.dob | date }} → 15 January 1965
{{ client.dob | date("%d/%m/%Y") }} → 15/01/1965
{{ client.dob | date("%-d %B %Y") }} → 15 January 1965
{{ contract.date | date("%B %Y") }} → January 2025

Add the | currency filter to format a numeric field as Australian dollars:

{{ transaction.sale_price | currency }} → $750,000.00
{{ transaction.deposit_amount | currency }} → $75,000.00

Without the filter, the value renders as the raw number you entered.


Here’s a complete letter template for sending a contract to a client. Notice how placeholders, conditionals, and formatting work together:

{{ firm.name }}
{{ firm.street_address }}
{{ firm.suburb }} {{ firm.state }} {{ firm.postcode }}
{{ today.date_long }}
{{ client.addressee }}
{{ client.street_address }}
{{ client.suburb }} {{ client.state }} {{ client.postcode }}
Dear {{ client.salutation }},
RE: {{ property.re_line }}
Our Ref: {{ matter.number }}
We refer to your instructions to act on your behalf in relation
to the above property.
Please find enclosed the Contract for Sale for your review and
signature.
{%p if property.is_strata %}
As this is a strata property, we have also enclosed:
- A copy of the strata by-laws
- The most recent AGM minutes
- A strata inspection report
Please review these documents carefully.
{%p endif %}
{%p if property.has_pool %}
We remind you that a valid Certificate of Compliance for the
swimming pool must be attached to the contract.
{%p endif %}
{%p if transaction.simultaneous_purchase %}
We understand you are coordinating this sale with a purchase.
We will work to align the settlement dates.
{%p endif %}
The settlement date is currently {{ transaction.settlement_date | date }}.
If you have any questions, please contact {{ matter.person_acting }}
on {{ firm.phone }}.
Yours faithfully,
{{ practitioner.full_name }}
{{ firm.name }}

Before using a template, verify:

  1. All placeholders match your matter.json fields

    If your matter.json has client.full_name, use exactly {{ client.full_name }} (not {{ client.fullname }})

  2. All conditionals are balanced

    Every {%p if %} has a matching {%p endif %}

  3. Field names use the standard format

    Use client.surname (lowercase, underscores) not Client_Surname or clientSurname

  4. Test with real data

    Generate a test document and check every placeholder filled in correctly


The placeholder name doesn’t match any field in your matter.json.

Fix: Check spelling and category. Is it client.full_name or client.fullname?

”Rendered in fallback mode … Do not send”

Section titled “”Rendered in fallback mode … Do not send””

The template has a syntax error — usually an unbalanced conditional tag, or a stray % }. The engine first tries to repair an unclosed conditional and flags the result for review. When it can’t, rather than fail it renders the document in fallback mode: every alternative wording of each clause is left in, each broken control tag becomes a visible [TEMPLATE ERROR: …] marker, and the document is reported as needing review, never as complete. The red warning appears in the wizard and on the Documents list.

Fix: Search for {%p if and {%p endif - you should have equal numbers of each - and fix any tag the marker names. Template validation also catches a filter or test name the engine doesn’t know (including inside a conditional) and a .docx that can’t be opened, so run it after editing a precedent.

Word says the document has unreadable content

Section titled “Word says the document has unreadable content”

A precedent saved by some namespace-stripping tools names a prefix in mc:Ignorable with no matching declaration, and Word recovers it as “Document 1”. The renderer now drops undeclared prefixes before saving, so a generated document never carries the fault; fix the precedent itself if Word complains when you open the source file.

It no longer does. {{ x | date }} and {{ x | currency }} on an empty value render blank. If you see “None” in a document, it came from an older build — render it again.

Placeholders in a text box or a nested table weren’t asked for

Section titled “Placeholders in a text box or a nested table weren’t asked for”

Every paragraph is scanned, including text boxes, nested tables and content controls, so the wizard asks for those fields and the completeness check highlights any [MISSING:] marker inside them. In .xlsx precedents the default and namecase filters work in cells, and a cell that is only a placeholder and renders empty is left blank so =VALUE() gives 0 rather than #VALUE!.

Conditional text always shows (or never shows)

Section titled “Conditional text always shows (or never shows)”

The field might not be set up as a boolean (yes/no) field.

Fix: Check that your matter.json defines the field as "type": "bool".

Date shows as “2025-01-15” instead of “15 January 2025”

Section titled “Date shows as “2025-01-15” instead of “15 January 2025””

You need to add the date filter.

Fix: Use {{ date_field | date }} instead of just {{ date_field }}.


{{ category.field_name }}
{%p if condition %}
Text when true
{%p endif %}
{{ date_field | date }}
{{ date_field | date("%-d %B %Y") }}
  • client. - Client details
  • matter. - Matter/file details
  • property. - Property details
  • transaction. - Transaction details
  • firm. - Your firm’s details
  • practitioner. - Solicitor details
  • today. - Current date