Request a demo
Docs

Templates & merge fields

How a template becomes a letter, and every field you can merge.

The format

A template is Markdown (with tables, lists and bold) and merge fields in double braces. Text in [square brackets] in the built-ins is guidance for whoever adapts the template; remove it from your copy.

The start of the US offer template
# Offer of employment

{{today}}

Dear {{person.first_name}},

We are delighted to offer you the position of **{{person.title}}** at **{{entity.legal_name}}**,
reporting to {{manager.full_name}}. Your anticipated start date is **{{person.start_date}}**.

Please sign below by **{{values.respond_by}}** to accept.

Merge fields

FieldFrom
person.full_name, person.first_name, person.last_nameThe person (first name uses the preferred name when set)
person.title, person.department, person.work_location, person.email, person.kindThe person
person.start_date, person.end_dateThe person, in the date format from Settings
manager.full_name, manager.titleThe person’s manager
entity.legal_name, entity.name, entity.address, entity.countryThe person’s legal entity (or the country’s default)
entity.signatory_name, entity.signatory_titleThe entity’s signatory
comp.amount, comp.currency, comp.periodThe person’s pay: amount with thousands separators, currency, and year, month or hour
todayThe date the letter is made
values.<key>An extra field the template asks HR to fill in when making the letter

Extra fields

Each template lists the extra inputs it needs as JSON: a key, a label, a type (text, textarea, number, date or select with options), whether it is required, and help text. Required fields must be filled before a draft can be created; an optional field left empty simply disappears from the letter. Dates typed as YYYY-MM-DD are written in the Settings date format.

Some of the Canada offer’s extra fields
[
  {"key": "province", "label": "Province", "type": "text", "required": true, "help": "e.g. Ontario"},
  {"key": "vacation_days", "label": "Vacation days", "type": "number", "required": true},
  {"key": "respond_by", "label": "Respond by", "type": "date", "required": true}
]

Gaps are visible

A field with no value (a person without an end date, an entity without a signatory) is left in the letter as [person.end_date], highlighted, and listed as missing in the preview and the New document dialog. Values are HTML-escaped before Markdown runs, so a name cannot inject markup.

app.insightpeoplehq.com/people/aditya-rao · New documentDemo data
New document dialog for Aditya Rao: Confidentiality and IP assignment (India) selected, the Courts at field empty and an info box listing values.jurisdiction as still empty in the letter; the preview shows the Northwind Labs India letterhead.
Required fields are named before anything is made; a gap in the letter is listed, not hidden.

Versions

Your organization has its own copy of every template. Saving new text, once documents have been made from a template, raises its version; documents keep the version they were made from. A template can be active, draft or retired, and marked as needing a signature or not (certificates and most letters are issued, not signed). New templates of your own are created in the console (blank or as a copy) or through the API (POST /api/templates).

app.insightpeoplehq.com/templates/us.offer_employeeDemo data
Template editor for Offer letter: employee (US) with the counsel note about state-specific terms, the at-will offer text with merge fields, and a preview for Jordan Blake on the Northwind Labs, Inc. letterhead.
The US offer: at-will, the I-9 condition and the confidentiality agreement. State-specific terms are left for counsel to add.

The library

The 22 built-ins are listed with their notes for counsel on Letters & templates. When the library grows, new templates are added to your workspace; your edited copies are never overwritten.

Want a hand setting it up?

Tell us your countries, entities and the letters you send; we will set up the templates and checklists with you.

Talk to us