Creating Templates
This guide walks you through creating a new template type from scratch.
Before You Start
Section titled “Before You Start”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)
Step 1: Create the Folder Structure
Section titled “Step 1: Create the Folder Structure”- Open your Templates folder in Finder
- Create a new folder with your template name (e.g., “Family Law”)
- Inside it, create a Precedents folder for documents
DirectoryTemplates/
DirectoryFamily Law/
DirectoryPrecedents/
- …
Step 2: Create matter.json
Section titled “Step 2: Create matter.json”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", "workflow_stages": ["Intake", "Drafting", "Settlement"], "blocks": [ { "name": "Client Details", "workflow_stage": "Intake", "fields": [ { "key": "client.full_name", "label": "Full Name", "type": "text", "required": true }, { "key": "client.address", "label": "Address", "type": "textarea", "required": true }, { "key": "client.phone", "label": "Phone Number", "type": "phone" } ] }, { "name": "Matter Details", "workflow_stage": "Intake", "fields": [ { "key": "matter.file_reference", "label": "File Reference", "type": "text" }, { "key": "matter.re_line", "label": "Re: Line", "type": "text", "required": true, "help_text": "Brief description for folder naming" } ] } ]}Step 3: Define Default Folders
Section titled “Step 3: Define Default Folders”Add a folders section to create subfolders when a matter is created. If folders is omitted, the user’s configured default folder list (set in Preferences) is used.
{ "version": "2.0", "name": "Family Law", "folders": [ "Correspondence/Incoming", "Correspondence/Outgoing", "Documents", "Court Documents", "Financial" ], "blocks": [ ... ]}Step 4: Create Document Templates
Section titled “Step 4: Create Document Templates”Now create Word documents with placeholders.
Placeholder Syntax
Section titled “Placeholder Syntax”Use double curly braces with the block and field name:
{{ client.full_name }}{{ client.address }}{{ matter.file_reference }}Example Letter Template
Section titled “Example Letter Template”[Your Firm Letterhead]
{{ client.full_name }}{{ client.address }}
Dear {{ client.full_name }},
Re: {{ matter.re_line }}
...
Yours faithfully,Save Documents
Section titled “Save Documents”Save your Word documents in the Precedents folder:
DirectoryFamily Law/
- matter.json
DirectoryPrecedents/
DirectoryLetters/
- Initial Client Letter.docx
- Costs Agreement.docx
DirectoryCourt/
- Application.docx
Step 5: Test Your Template
Section titled “Step 5: Test Your Template”- Open Certum Draft and ensure your Templates folder is set in Settings → Templates
- Create a new matter from the New Matter wizard and pick your template — confirm the fields and workflow stages appear correctly
- Fill the required fields and generate a test document to check placeholders resolve
- If the template doesn’t appear, restart Certum Draft to force a fresh template scan
Common Patterns
Section titled “Common Patterns”Standard Client Block
Section titled “Standard Client Block”Most templates use similar client fields:
{ "name": "Client Details", "workflow_stage": "Intake", "fields": [ { "key": "client.title", "label": "Title", "type": "select", "options": ["Mr", "Mrs", "Ms", "Dr"] }, { "key": "client.given_names", "label": "Given Names", "type": "text", "required": true }, { "key": "client.surname", "label": "Surname", "type": "text", "required": true }, { "key": "client.full_name", "label": "Full Name", "type": "text", "computed_from": "{client.title} {client.given_names} {client.surname}" }, { "key": "client.street_address", "label": "Street Address", "type": "text", "required": true }, { "key": "client.suburb", "label": "Suburb", "type": "text", "required": true }, { "key": "client.state", "label": "State", "type": "select", "options": ["NSW", "VIC", "QLD", "SA", "WA", "TAS", "NT", "ACT"], "required": true, "default_value": "NSW" }, { "key": "client.postcode", "label": "Postcode", "type": "text", "required": true } ]}Date Fields
Section titled “Date Fields”For dates, use the date type:
{ "key": "matter.settlement_date", "label": "Settlement Date", "type": "date", "required": true}In documents, you can format dates with the date filter:
Settlement is scheduled for {{ matter.settlement_date | date("%-d %B %Y") }}Currency Fields
Section titled “Currency Fields”For money amounts:
{ "key": "matter.purchase_price", "label": "Purchase Price", "type": "currency", "required": true}Troubleshooting
Section titled “Troubleshooting”Template doesn’t appear in the list
Section titled “Template doesn’t appear in the list”- Check that
matter.jsonexists and is valid JSON - Ensure the file is named exactly
matter.json - Try Preferences → Templates → Reload Templates
Placeholder shows [MISSING: field_name]
Section titled “Placeholder shows [MISSING: field_name]”- 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
Fields don’t show in the form
Section titled “Fields don’t show in the form”- Verify the field is in a
blockssection - Check that the JSON syntax is correct (no missing commas or brackets)
- Use a JSON validator to check for errors
What’s Next?
Section titled “What’s Next?”Beyond the minimal example, matter.json supports:
overview— custom cards for the Matter Workspace Overview tab (each card hastitle,icon(SF Symbol), andfieldswithlabel/key/copyable).hidden_fields— computed/helper fields not shown in the form but available in document templates.scales— named fee schedules used bycomputed_from: "scale(field, scale_name)"for tiered calculations (e.g. NSW transfer duty).calendar— critical-dates rules with anchor and derived dates plus notification schedules.visible_whenon blocks and fields — conditional visibility based on form data.quick_entryon fields — surface the essential fields in Quick Entry mode for fast data capture.
See:
- Template Fields — All field types and options
- Conditionals —
visible_whenand document-side{%p if %} - Matter Configuration — Complete matter.json reference