What Are Variables?
Variables are placeholders in a .docx template that are automatically replaced with real data when generating a document. For example, #{{employeeName}} becomes Jonas Petraitis, and #{{hireDate}} becomes 2024-03-15.
Variables in the template are marked with double curly braces: #{{variableKey}}.
Automatic Variable Detection
When you upload a .docx file, the system automatically scans all #{{...}} format variables and creates a list of them. Each detected variable appears in the configuration section, where you can specify its type, label, and other parameters.
Re-scanning
If you update the template (upload a new version or edit in the built-in editor), the system automatically re-scans the variables. New variables are added, and removed ones are marked as unused.
Variable Types
Type | Name | Description |
TEXT | Text | A free-form text field. |
DATE | Date | A date picker (calendar). |
An email address with format validation. | ||
NUMBER | Number | A numeric value. |
SELECT | Selection | A dropdown list with predefined values. |
BOOLEAN | Yes/No | A Yes or No toggle. |
Configuring Variables
For each variable, you can set the following parameters:
Parameter | Description |
Display Label | The label the user sees when filling out the form (e.g., "Employee Name"). |
Required | Whether the field must be filled in before generating the document. |
Default Value | A value that will be pre-filled automatically unless the user changes it. |
Description | Helper text explaining what to enter in the field. |
Sort Order | A number indicating the field's position in the form (lower number = higher position). |
Setting Up SELECT Options
If the variable type is SELECT (Selection), you need to specify the available values:
Select the variable in the configuration list.
In the Options section, add values one by one.
You can reorder by dragging elements.
Remove unwanted values by clicking the delete icon.
Note: The maximum number of options is 50.
Auto-Fill Sources
Variables can be linked to auto-fill sources — when generating a document, the system automatically fills in the value from employee, organization, or document data.
Employee Fields
Source Key | Description |
| Employee's first name |
| Employee's last name |
| Full name (first and last) |
| Email address |
| Phone number |
| Job title |
| Department |
| Employee number |
| Hire date |
| Date of birth |
| Residential address |
| Personal identification code |
Organization Fields
Source Key | Description |
| Organization name |
| Company registration code |
| Organization address |
| Organization phone number |
| Organization email |
Document Fields
Source Key | Description |
| Document generation date |
| Template name |
| Document number (if numbering is enabled) |
Best Practices for Variable Naming
Use camelCase format — e.g.,
employeeName, notemployee_nameorEmployee Name.Be specific —
contractStartDateis better thandate1.Group with prefixes —
employeeFirstName,employeeLastName,companyName,companyAddress.Avoid spaces and special characters — use only letters, numbers, and camelCase.
Use English for keys — this makes auto-fill mapping easier.
Tip: Before creating a template, plan your variable list — this helps avoid repeated editing and variable mismatches.
