flowchart TD
A["Employee list —
click the Generate COE
icon on a row"] --> B["Pick months of
pay history +
a template (if more
than one exists)"]
B --> C["Document Editor opens,
pre-merged with this
employee's current data
+ payroll table"]
C --> D["Edit freely —
changes here only
affect this one output"]
D --> E{"What next?"}
E -- "Preview" --> F["Opens the real
PDF in a new tab"]
E -- "Download" --> G["Saves the PDF
to your computer"]
E -- "Send to Email" --> H["Emails the PDF to
the employee, and logs
it to Document History"]
E -- "Cancel" --> I["Discards everything,
back to Documents —
nothing was ever saved"]
A Certificate of Employment (COE) confirms an employee's role, tenure, and pay to a bank, embassy, landlord, or another employer. Some COEs also need to show that employee's recent pay history — a table of the last few pay periods and what was actually paid out. Before this feature, that table had to be typed in by hand from old payroll records. Now it's built automatically from the same figures already sitting in the system, every time a COE is generated.
The feature lives in two places that work together:
Available to Super Admin, HR, HR Admin, and Accounting roles — the same access as the Employees list and Documents sections themselves.
On the Employees list, find the employee and click the document-shaped Generate COE icon in their row's action buttons (next to Edit and Reuse Employee). A modal opens asking for Months of pay history to include — 3 by default, adjustable from 1 to 12.
Either way, you land on the Document Editor, already merged with this employee's current name, role, client, hire date, pay rate, and a payroll history table covering the number of months you asked for.
This is the same editor used for every other document template in the system, in a special "Generate COE" mode: the sidebar shows this document's Title, Department, and Category, plus a Requires signature toggle (normally left off for a COE — it's meant to go out signed by the company, not to be signed by the employee). The main panel is the merged letter itself, fully editable.
Toolbar highlights beyond the usual text formatting:
| Button | What it does |
|---|---|
| Import .docx | Pull in content from a Word file instead of typing from scratch. |
| Columns | Insert a multi-column layout block. |
| Row | Place your cursor inside any table (like the payroll table) and use Insert Row Above or Insert Row Below to add a row at that position. |
| Insert Variable | Drops a {{ $token }} placeholder at the cursor — see The Payroll History Table for the one that matters most here. |
Wherever the template places the {{ $payroll_table }} token, the system
substitutes a real table pulled straight from that employee's actual payroll results — no manual entry, no
copy-pasting from old spreadsheets.
| Column | What it shows |
|---|---|
| Pay Period Year / Month | The calendar year and full month name the pay period falls in. |
| Pay Period | 1st to 15th or 16th to month end. |
| Net Pay Rate | The employee's pay rate at the time, shown in whatever currency their payroll was actually run in. |
| Net Pay | What was actually paid out for that specific period. |
Rows are ordered most-recent period first. Since every month normally has two pay periods, asking for 3 months of history produces 6 rows — the modal's "months" number doubles into a row count automatically.
An employee with less payroll history than the number of months requested simply gets fewer rows — the table isn't padded with blanks. A brand-new employee with no finalized payroll yet will get an empty table.
Four buttons sit top-right of the editor, all working off whatever is currently in the content panel:
| Button | What it does |
|---|---|
| Print Preview | Renders the current content to a real PDF and opens it in a new browser tab — nothing is saved or sent. |
| Download PDF | Renders the same PDF and saves it straight to your computer. |
| Send to Email | Renders the PDF, emails it to the employee's address on file, and logs the send as a record in that employee's Document History — this is the only one of the three that creates a lasting record. |
| Cancel | Returns to the Documents list. Since nothing about a COE generation is auto-saved (see below), this simply discards the merged content you were looking at. |
Any edits you make in the editor before clicking one of these three buttons are included in that button's output — you can correct a typo, tweak wording, or add a paragraph for one specific employee without touching the shared template everyone else's COE is built from.
Send to Email won't silently send a second COE in the same month. If that employee already has a COE emailed to them this calendar month, you'll get a confirmation prompt before it sends again — a safeguard against accidentally re-sending the same letter. Confirm to proceed anyway, or Cancel if that wasn't intended.
A COE is a living document — it should always reflect the employee's current information, not whatever happened to be true the last time someone generated one. Because of that, this editor has no Save button, and there's no draft to reopen:
{{ $variable }}
tokens in it) is a separate thing, only changed from the Documents section — see
Managing COE Templates. Nothing you do in a per-employee Generate COE session ever
overwrites it.If you need a wording change to show up on every future COE, make it in the shared template under Documents, not by editing one employee's generated copy — a per-employee edit only ever affects that one PDF.
Open Documents in the sidebar to create or edit the reusable template(s) the Generate COE flow offers. A template only shows up in the Generate COE picker when its Category is set to Certificate of Employment (COE) — set that from the same Category dropdown used for Department.
{{ $variable }} tokens
(name, role, client, dates, rate, and so on — see the Insert Variable dropdown for the full
list) and, if the letter should show a pay history table, place
{{ $payroll_table }} wherever it should appear.| Situation | What's going on |
|---|---|
| Generate COE modal says "No COE template found" | No document has its Category set to Certificate of Employment (COE) yet. Create or update one under Documents first — see Managing COE Templates. |
| Payroll history table is empty or shorter than expected | Expected if the employee has less finalized payroll history than the number of months requested, or none at all yet (new hires). The table isn't padded with blank rows. |
| I edited the letter, generated another COE later, and my edit is gone | Expected — see Why the Content Always Starts Fresh. Per-employee edits are one-time; only a template edit under Documents persists. |
| Send to Email didn't seem to do anything | Check the employee's email address on file is correct, and check that employee's Document History for a logged send — the button shows an error alert if the request actually failed rather than failing silently. |
| Send to Email asks me to confirm before sending | Expected — this employee already got a COE emailed to them earlier this calendar month. Confirm to send another one anyway, or Cancel if that wasn't intended. |