Skip to content
Apolaris AI Docs

Generate HR documents from templates

pro

Build reusable HR document templates with built-in and custom merge-fields, set each custom field's scope, and generate a per-employee PDF with an in-place preview.

Stop hand-editing the same contract, offer letter, or warning notice for every employee. Build a template once — with merge-fields that fill themselves in — and Apolaris AI generates a finished PDF for any employee, reusing what it already knows about that person and only asking for the few details that are genuinely new each time.

This is the deeper companion to the documents section of the HR guide. Templates and generated documents live under HR → Documents → templates.

Document templates, the field configurator, and generation are manager tools, not employee self-service. This is about HR and admins producing paperwork about employees — employees do not generate their own documents here.

Who can use this

Capability Who can use it
Create / edit document templates Managers (is_manager) only
Open the field configurator and classify fields Managers only
Generate a document for an employee Managers only
Preview a generated PDF in place Managers only (scoped to their own sites)

Non-managers receive a 403 on every one of these screens.

Built-in vs. custom placeholders

A template body is plain text with placeholders wrapped in double braces. There are two kinds.

Built-in placeholders resolve automatically from the employee record and your organization settings — you never configure them:

{{employee}}, {{site}}, {{position}}, {{salary}}, {{hire_date}}, {{date}}, {{day}}, {{month}}, {{year}}, {{company}}, {{company_address}}, {{company_phone}}, {{company_email}}, {{company_tax_id}}, {{company_website}}, {{company_logo_url}}.

Custom placeholders are anything else you invent — {{contract_number}}, {{probation_months}}, {{nationality}}, {{reason}}. The moment you save a template, Apolaris scans the body and registers each new custom field automatically, so there is no separate "define the fields" step.

Give custom fields clear, descriptive names. Apolaris makes a first guess at each field's scope (below) from its name — for example a field starting with employee_ or emp_ is guessed as employee-scope, and one starting with company_ or employer_ as company-scope — so a good name starts you closer to the right setup. The guess is best-effort; you always confirm it.

Field scopes: employee, company, or per-document

Every custom field has a scope that decides where its value is stored and when you're asked for it. This is what makes generation feel effortless: you enter each fact once, at the right level.

Scope What it means Asked at generation?
Employee field Stored on that person and reused across every document you generate for them (e.g. nationality, employee ID). Only the first time — once it has a value, never again for that employee.
Company field One value shared by the whole organization (e.g. employer registration number). Never — you set it once, centrally.
Per-document field A one-off fact unique to a single document (e.g. the reason for a warning, a specific date). Every time — and saved only on that document as a record of what it said.

Apolaris detects new fields and guesses a scope from the field name — it does not "understand" what the field is. Treat the initial scope as a starting point and confirm it in the field configurator before you rely on a template.

The field configurator

Open HR → Documents → templates → field configurator to review every custom field your templates have introduced, grouped by scope. For each field you can set:

  • its label (the friendly name you'll see when prompted),
  • its scope (employee / company / per-document),
  • its data type (text or date), and
  • for company-scope fields, the shared value itself.

Changes here are remembered: re-saving a template never overwrites a scope you've already set by hand.

Generating a document

  1. Open a template and choose Generate, then pick the employee.
  2. Apolaris asks only for the fields it still needs: - per-document fields, always; - employee fields, only if that employee has no stored value yet; - company fields, never (they come from the configurator).
  3. It fills the body, renders a PDF, and attaches it to that employee as a document — so it also appears in their profile and in HR → Documents.
  4. A success panel shows an in-place preview of the finished PDF, plus links to open or download it.

The values you enter are saved by scope: an employee answer is stored on the employee and reused next time (so the next document for them won't ask again), while a per-document answer is kept only on that generated document as a record.

If a built-in field comes out blank — for example the employee has no salary set, or your company address is empty in Organization settings — generation still succeeds but shows a warning listing the empty fields and where to fill them. Update the source data and generate again.

AI drafting of a template body requires the AI copilot module to be enabled. With AI off, you can still paste a body yourself and use every other part of this feature; only the "draft it from a brief" shortcut falls back to a plain starter text.

When a template introduces new fields

Whenever a saved template adds custom fields that need setting up, Apolaris raises an in-app notification to managers — deep-linked to that template — so the new fields get a scope and a value before anyone generates from it. You can opt out of these alerts in your notification preferences; turning them off never blocks a template from saving.

Why this helps

  • Type each detail once. Employee and company facts are stored and reused, so a ten-employee contract run only asks for what's actually different.
  • A real audit trail. Per-document values are saved on the generated PDF, so you can always see exactly what a given document said.
  • No copy-paste drift. One template is the single source of truth; fix the wording once and every future document is correct.