Skip to main content

Generating Documents from Templates

Step-by-step instructions for generating a document from an active template — from employee selection to PDF preview and saving.

Written by Backoffice
Updated over a week ago

Prerequisites

Before generating a document, make sure that:

  • The template has Active status (drafts and archived templates are not shown in the generation list).

  • You have the documents:templates:read permission.

  • If the template uses employee variables — the employee's profile must have the required fields filled in.

Generation Steps

Step 1: Select a template

Go to Documents → Documents and click Generate Document. Select the desired template from the list — only active templates are shown.

Step 2: Select an employee

If the template requires employee selection or uses employee auto-fill fields, select an employee from the list. You can search by first or last name.

Note: If the template does not have the employee selection requirement set, this step can be skipped.

Step 3: Fill in the variables form

The system will display a form with all template variables:

  • Required fields are marked with an asterisk (*).

  • TEXT — enter text.

  • DATE — select a date from the calendar.

  • EMAIL — enter an email address (format is validated).

  • NUMBER — enter a numeric value.

  • SELECT — choose from a dropdown list.

  • BOOLEAN — toggle the Yes/No switch.

Step 4: Review auto-filled fields

Below the form, you will find a collapsible section Auto-filled Fields. This shows all variables that were populated from employee, organization, or document data.

These fields are read-only — they cannot be edited during generation. If a value is incorrect, correct it in the employee or organization profile.

Step 5: Set the document name (optional)

The system automatically generates a name based on the naming pattern configured in the template settings. If desired, you can override the name and enter your own.

Step 6: Preview the generated PDF

Click Preview to see the final PDF document. In the preview window, you can:

  • Zoom in and out of the document (scale controls).

  • Navigate between pages.

  • Verify that all variables have been correctly replaced with values.

Tip: If you see #{{variable}} instead of a value — go back and check whether the field is filled in and whether the variable key matches the one specified in the template.

Step 7: Save or discard

  • Save — the document is saved with Generated status and appears in the documents list.

  • Discard — the document is not saved and you return to the previous screen.

After Saving

The saved document appears in the documents list with Generated status (grey badge). From here you can:

  • View and download the PDF.

  • Send the document for e-signing.

  • Delete the document.

Common Issues

Issue

Possible Cause

Solution

A required field is not auto-filling

No employee selected, profile data not filled in, or auto-fill source not configured.

Check whether an employee is selected, whether the profile data exists, and whether the correct source is assigned to the variable.

Preview shows a placeholder instead of a value

The variable key in the template does not match the configured variable (case matters).

Verify that the key in the template exactly matches the configuration key.

Template not shown in the selection

The template is in Draft or Archived status.

Activate the template, or unarchive and then activate it.

Did this answer your question?