Skip to content

Template Author's Guide

Welcome to template authoring! 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 }} → Lot 15
{{ property.plan }} → DP 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.swimming_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 sale.not_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:

Primary FieldAuto-Computed InverseWhat It Controls
property.is_strataproperty.not_strataStrata/unit title
property.has_poolproperty.no_poolSwimming pool
property.has_illegal_worksUnapproved building works
sale.is_auctionsale.not_auctionAuction vs private treaty
sale.is_estatesale.not_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

Currency fields are automatically formatted:

{{ transaction.purchase_price }} → $750,000.00
{{ transaction.deposit }} → $75,000.00

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.swimming_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?

Usually an unbalanced conditional tag.

Fix: Search for {%p if and {%p endif - you should have equal numbers of each.

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": "boolean".

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