Building a Template
A template is content with fields merged into it. Most of the work is in the edge cases.
Where to find it
Architect Panel → Layout & Pages:
- Document Templates — the templates themselves
- Document Designer — page size, margins, header and footer
Start from a real document
The letter you send today, in whatever form it exists. Turning an existing document into a template is much faster than writing one, and it starts from wording somebody has already approved.
Identify the merged parts
Work through the document marking everything that varies: the name, the reference, the dates, the amounts, the specific details. Everything else is fixed text.
Anything that varies and is not merged is something somebody will have to edit by hand every time, which defeats the point.
Plan for every merged field being empty
The most important habit. For each one, decide:
- Is it always present? Then make it required on the record.
- Can it be absent? Then the surrounding text has to still read correctly.
"Your reference is ." is the sentence customers notice.
Watch the addresses
Address blocks are where blank lines appear. An address with no second line should not produce a gap, and a letter with a gap in the address is a letter that looks automated and careless.
Format dates and amounts explicitly
A date appearing in the database’s format rather than a readable one, or an amount without its currency, is the second most common template fault.
Keep it short
The document is read by somebody who has a question. Long templates accumulate paragraphs added over years for cases that occurred once, and each one makes the important part harder to find.
Test with awkward records
Not the tidy one. A record with a very long name, one with missing optional fields, one with a note that runs to several paragraphs, one with an unusual character in the name.
Those four find nearly every template problem.
Print it
If it will ever be printed. Margins, page breaks and footer position behave differently on paper, and a document that breaks mid-address on page two is only visible when printed.
Get it approved before it is live
The template is what your organisation says to somebody. Whoever owns that wording should see the output, not the template.
Worked example
A template was built from the existing letter, with every varying part merged and each optional field checked for the empty case. Testing with four deliberately awkward records found an address gap and a date in the wrong format, both fixed before the first real letter.
Recommendations
- Start from the letter you already send.
- Check every merged field for the empty case.
- Test with four awkward records, not one tidy one.
- Print it if it will ever be printed.