Michael Scott
Buying his first home in Scranton
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 Type | What 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 drawermatter. = Matter drawerproperty. = Property drawertransaction. = Transaction details drawerYour 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-0100Information 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 123456Your 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 swimmingpool must be attached to the contract before it is signed.{%p endif %}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 arrangefor 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'sdetails can be added to the contract.{%p endif %}These are the typical yes/no questions that trigger conditional text:
| Primary Field | Auto-Computed Inverse | What It Controls |
|---|---|---|
property.is_strata | property.not_strata | Strata/unit title |
property.has_pool | property.no_pool | Swimming pool |
property.has_illegal_works | — | Unapproved building works |
sale.is_auction | sale.not_auction | Auction vs private treaty |
sale.is_estate | sale.not_estate | Deceased estate |
transaction.simultaneous_purchase | — | Coordinated sale/purchase |
transaction.deposit_release | — | Early 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 2025Currency fields are automatically formatted:
{{ transaction.purchase_price }} → $750,000.00{{ transaction.deposit }} → $75,000.00Here’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 relationto the above property.
Please find enclosed the Contract for Sale for your review andsignature.
{%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 theswimming 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:
All placeholders match your matter.json fields
If your matter.json has client.full_name, use exactly {{ client.full_name }} (not {{ client.fullname }})
All conditionals are balanced
Every {%p if %} has a matching {%p endif %}
Field names use the standard format
Use client.surname (lowercase, underscores) not Client_Surname or clientSurname
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.
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".
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 detailsmatter. - Matter/file detailsproperty. - Property detailstransaction. - Transaction detailsfirm. - Your firm’s detailspractitioner. - Solicitor detailstoday. - Current date