Precedent Documents¶
Precedent documents are Word templates (.docx) that contain placeholders which get replaced with matter data.
Creating a Precedent Document¶
Step 1: Start with Your Existing Document¶
Take any existing Word document you use as a template.
Step 2: Add Placeholders¶
Replace the parts that change from matter to matter with placeholders:
Before:
Dear Mr Smith,
Re: Sale of 123 Main Street, Sydney
The sale price of $1,250,000 is...
After:
Dear {{ client.title }} {{ client.surname }},
Re: Sale of {{ property.address }}
The sale price of {{ transaction.sale_price | currency }} is...
Step 3: Save as .docx¶
Save the file in your precedents folder with a descriptive name:
precedents/
└── 010 Contract/
└── Letter to Purchaser.docx
Placeholder Syntax¶
Placeholders use double curly braces: {{ field.key }}
Basic Placeholders¶
{{ client.surname }}
{{ client.first_name }}
{{ property.address }}
{{ transaction.sale_price }}
With Formatting (Filters)¶
Add a pipe | and a filter name to format values:
{{ transaction.sale_price | currency }} → $1,250,000.00
{{ transaction.settlement_date | date_long }} → 15 January 2025
{{ client.surname | upper }} → SMITH
{{ client.first_name | title }} → John
Available Filters¶
| Filter | Description | Example Output |
|---|---|---|
currency |
Format as dollars | $1,250,000.00 |
date_long |
Long date format | 15 January 2025 |
date_short |
Short date format | 15/01/2025 |
upper |
UPPERCASE | SMITH |
lower |
lowercase | smith |
title |
Title Case | John Smith |
required |
Show placeholder if missing | [REQUIRED: Description] |
optional |
Show optional placeholder if missing | [OPTIONAL: Description] |
review |
Show review placeholder if missing | [REVIEW REQUIRED: Message] |
New: Placeholder Filters
Use required, optional, and review filters to ensure incomplete documents are never accidentally finalized. See the Placeholder System guide for details.
Conditional Content¶
Show or hide content based on field values:
If/Endif¶
{% if property.is_strata %}
The property is a strata lot. Strata levies apply.
{% endif %}
If/Else¶
{% if transaction.gst_applicable %}
GST of {{ transaction.gst_amount | currency }} applies to this transaction.
{% else %}
This transaction is not subject to GST.
{% endif %}
Checking for Empty Values¶
{% if purchaser.solicitor.firm_name %}
The purchaser is represented by {{ purchaser.solicitor.firm_name }}.
{% else %}
The purchaser is unrepresented.
{% endif %}
Missing Conditional Values¶
When you use a conditional like {% if property.is_strata %}, Certum Draft checks whether that field exists in the matter data:
If the field is missing: You'll be prompted to provide a value during document generation. For boolean conditions (yes/no questions), simply enter "yes" or "no".
Accepted boolean values:
| Treated as Yes | Treated as No |
|---|---|
yes |
no |
true |
false |
1 |
0 |
on |
off |
| (empty) |
Default behaviour: If a conditional field is left empty or not provided, it defaults to "No" — meaning the conditional paragraph will be excluded from the generated document.
Boolean Fields in matter.json
If you frequently need a conditional, add it to your matter type's field definitions with type bool. This ensures it appears in the matter form and is always captured upfront.
Organising Precedents¶
Folder Structure¶
Organise your precedents into logical subfolders. Certum Draft displays your folder structure in the app, making it easy to navigate large collections of precedents.
precedents/
├── 000 General/
│ ├── Cost Agreement.docx
│ ├── Authority to Act.docx
│ └── Letter of Engagement.docx
├── 010 Getting Started/
│ ├── Letter to Agent.docx
│ └── Section 66W Certificate.docx
├── 020 Contract Documents/
│ ├── Contract for Sale.docx
│ └── Vendor Disclosure.docx
└── 030 Settlement/
├── Settlement Statement.docx
└── Letter to Purchaser Solicitor.docx
How Folders Appear in the App¶
When generating documents, your folder structure is displayed as an expandable tree:
- Folders appear with orange folder icons and show template counts
- Click the chevron to expand or collapse folders
- Click a folder's selection circle to select all templates in that folder at once
- Nested folders are fully supported—you can organise as deeply as needed
This is especially useful for matter types with many precedents, as you can collapse folders you don't need and quickly find the documents you're looking for.
Numbered Prefixes¶
Use numbered prefixes (000, 010, 020) to control the display order. Folders and files appear sorted alphabetically, so numbers ensure a logical workflow order that matches your typical matter progression.
Common Patterns¶
Full Name Combinations¶
{{ client.first_name }} {{ client.surname }} → John Smith
{{ client.surname | upper }} {{ client.first_name }} → SMITH John
{{ client.title }} {{ client.first_name }} {{ client.surname }} → Mr John Smith
Address Formatting¶
For addresses entered in a textarea:
{{ property.address }}
If you need it on one line:
{{ property.address | replace('\n', ', ') }}
Currency Without Cents¶
{{ transaction.sale_price | currency | replace('.00', '') }}
Date Calculations¶
For dates relative to another date:
Settlement Date: {{ transaction.settlement_date | date_long }}
(being {{ transaction.settlement_period }} days from exchange)
Testing Precedents¶
Use the Test Templates feature to validate your precedents:
- Open Certum Draft
- Click Test Templates
- Select your matter type
- Click Validate
The validator will:
- Check that all placeholders match defined fields
- Flag any syntax errors
- Warn about potentially missing data
Troubleshooting¶
Placeholder not replaced¶
- Check the field key matches exactly (including dots)
- Ensure the field is defined in
matter.json - Check for typos in the placeholder
Formatting looks wrong¶
- Word may insert hidden formatting inside placeholders
- Type the placeholder in a simple text editor, then paste into Word
- Or: Type it directly without copying/pasting
Document won't generate¶
- Check for syntax errors (missing
}}or%}) - Validate using Test Templates
- Check the app logs for specific error messages