Template Variables
Template variables are dynamic placeholders used inside letter templates. When you generate a letter for a specific employee, PMSuite replaces each variable with the corresponding value from the employee's profile or your company settings, producing a personalized document without manual editing.
Who can use it: Company Admin, HR Manager
Prerequisites
- At least one letter template must exist, or you need to create one.
- Employee profiles should be filled in before generating letters. Any profile field that is empty will produce a blank value where the variable appears.
How to Access
Template variables are inserted while creating or editing a letter template.
Navigation: Sidebar → Letter → Template (/account/letter/template) → create or edit a template. The rich-text editor is where you type variables into the letter body.
How Variables Work
- Insert a variable — In the template editor, type the variable placeholder (enclosed in curly braces) at the position where the data should appear. For example, typing a variable for the employee's name in a sentence like "This is to certify that
{employee_name}is employed..." will output the actual name when the letter is generated. - Generate the letter — When you generate a letter and select an employee, PMSuite replaces every variable with real data drawn from that employee's profile and your company settings.
- Preview before finalizing — The editor provides a live preview so you can verify that variables resolve correctly before downloading or printing.
Variable Categories
PMSuite's letter variables fall into three groups:
Employee Variables
These pull data from the selected employee's profile record. The available variables correspond to the fields on the employee profile, which include personal information (name, email, phone, date of birth, gender, address), employment details (employee ID, designation, department, joining date, reporting manager), and compensation details (salary, bank information).
The exact set of employee variables available in the template editor matches the fields present on the employee profile. See Employee Profiles for the full list of profile fields.
Company Variables
These pull data from your organization's company settings (company name, address, phone, email, website). Company variable values are the same regardless of which employee is selected.
System Variables
These are generated by PMSuite at the time the letter is created — for example, the current date. They do not come from employee or company profiles.
Inserting Variables
When creating or editing a letter template:
- Position your cursor in the content area where the value should appear.
- Type the variable name exactly as it appears in the template editor, including curly braces.
- Variable names are case-sensitive. Use the exact spelling shown in the editor.
- Do not add spaces inside the braces.
- You can use the same variable multiple times in a single template.
- Variables can be placed anywhere in the template — headings, body text, tables, or footers.
Handling Missing Data
When a variable references an employee profile field that has not been filled in:
- The variable is replaced with a blank value, leaving a gap in the generated letter.
Workaround: Ensure the relevant employee profile fields are populated before generating the letter. Use the live preview to catch blank spots, fill in the missing profile data, and regenerate.
Effect on Other Features
- Letter generation — Variables are resolved only during letter generation. Editing a template's variables after a letter has already been generated does not change the previously generated letter.
- Letter PDF — The resolved variable values carry through to the downloaded or printed PDF.
- Margin settings — Template variables are unaffected by the configurable margin settings (pixels); margins control layout, not content.
Limitations
| Limitation | Workaround |
|---|---|
| Variables only resolve for employees in PMSuite's directory. You cannot generate a letter for someone who is not an employee record. | Create the employee record first, then generate the letter. |
| If a profile field is empty, the variable resolves to a blank — there is no fallback text. | Review and complete employee profiles before generating letters. Preview the letter to catch blanks. |
| Template variables are limited to the fields available on employee profiles and company settings. Custom free-text fields are not available as variables. | For data not covered by a variable, type the value directly into the generated letter before downloading. |
Troubleshooting
Variable Appears as Literal Text
Problem: The generated letter shows the variable placeholder (e.g., the curly-brace text) instead of the employee's actual data.
Cause: The variable may be misspelled, or the rich-text editor may have inserted hidden formatting characters inside the braces when content was pasted from an external source.
Solution: Delete the variable text and retype it manually inside the template editor. Verify the spelling matches exactly. If you pasted from another application, clear formatting on the variable text first.
Variable Resolves to Blank
Problem: A variable produces an empty value in the generated letter.
Cause: The corresponding field on the employee's profile is empty.
Solution: Open the employee's profile, fill in the missing field, and regenerate the letter.
Related Articles
- Letter Templates — create and manage reusable letter formats.
- Generating Letters — select an employee and template to produce a personalized letter.
- Letter PDF — download or print the final letter.