Skip to content

Creating Templates

This guide walks you through creating a new template type from scratch.

You’ll need:

  • Access to the Templates folder
  • Microsoft Word (or compatible app) for editing documents
  • A text editor for matter.json (or use any JSON editor)
  1. Open your Templates folder in Finder
  2. Create a new folder with your template name (e.g., “Family Law”)
  3. Inside it, create a Precedents folder for documents
  • DirectoryTemplates/
    • DirectoryFamily Law/
      • DirectoryPrecedents/

Create a file called matter.json in your template folder. This file defines what information to collect.

Here’s a minimal example:

{
"version": "2.0",
"name": "Family Law",
"description": "Family law matters",
"blocks": {
"client": {
"label": "Client Details",
"fields": {
"full_name": {
"type": "text",
"label": "Full Name",
"required": true
},
"address": {
"type": "text",
"label": "Address",
"required": true
},
"phone": {
"type": "phone",
"label": "Phone Number",
"required": false
}
}
},
"matter": {
"label": "Matter Details",
"fields": {
"file_reference": {
"type": "text",
"label": "File Reference",
"required": false
},
"re_line": {
"type": "text",
"label": "Re: Line",
"required": true,
"help": "Brief description for folder naming"
}
}
}
}
}

Add a defaultFolders section to create subfolders when a matter is created:

{
"version": "2.0",
"name": "Family Law",
"defaultFolders": [
"Correspondence/Incoming",
"Correspondence/Outgoing",
"Documents",
"Court Documents",
"Financial"
],
"blocks": {
...
}
}

Now create Word documents with placeholders.

Use double curly braces with the block and field name:

{{ client.full_name }}
{{ client.address }}
{{ matter.file_reference }}
[Your Firm Letterhead]
{{ client.full_name }}
{{ client.address }}
Dear {{ client.full_name }},
Re: {{ matter.re_line }}
...
Yours faithfully,

Save your Word documents in the Precedents folder:

  • DirectoryFamily Law/
    • matter.json
    • DirectoryPrecedents/
      • DirectoryLetters/
        • Initial Client Letter.docx
        • Costs Agreement.docx
      • DirectoryCourt/
        • Application.docx
  1. Open Certum Draft
  2. Go to Preferences → Templates
  3. Click Test Templates to validate
  4. Create a test matter to verify fields appear correctly
  5. Generate a test document to check placeholders work

Most templates use similar client fields:

"client": {
"label": "Client Details",
"fields": {
"title": {
"type": "select",
"label": "Title",
"options": ["Mr", "Mrs", "Ms", "Dr"],
"required": false
},
"given_names": {
"type": "text",
"label": "Given Names",
"required": true
},
"surname": {
"type": "text",
"label": "Surname",
"required": true
},
"full_name": {
"type": "computed",
"label": "Full Name"
},
"street_address": {
"type": "text",
"label": "Street Address",
"required": true
},
"suburb": {
"type": "text",
"label": "Suburb",
"required": true
},
"state": {
"type": "select",
"label": "State",
"options": ["NSW", "VIC", "QLD", "SA", "WA", "TAS", "NT", "ACT"],
"required": true
},
"postcode": {
"type": "text",
"label": "Postcode",
"required": true
}
}
}

For dates, use the date type:

"settlement_date": {
"type": "date",
"label": "Settlement Date",
"required": true
}

In templates, you can format dates:

Settlement is scheduled for {{ matter.settlement_date | date("%-d %B %Y") }}

For money amounts:

"purchase_price": {
"type": "currency",
"label": "Purchase Price",
"required": true
}
  • Check that matter.json exists and is valid JSON
  • Ensure the file is named exactly matter.json
  • Try Preferences → Templates → Reload Templates
  • The field name in the document doesn’t match matter.json
  • Check for typos and case sensitivity
  • Ensure the field is defined in the correct block
  • Verify the field is in a blocks section
  • Check that the JSON syntax is correct (no missing commas or brackets)
  • Use a JSON validator to check for errors