Skip to main content

Appendix D — Template variable reference

Five kinds of document are produced from templates that a workspace can copy and edit: HR letters, employment contracts, salary slips, tax certificates and bank payment files. To insert a value, wrap a variable in double curly braces, spelled exactly as in the tables below (capital letters and underscores matter: salary slips use employee.full_name, HR letters use employee.firstName). A variable the document does not supply prints as nothing rather than as an error. Letters, contracts, slips and certificates are HTML rendered with Handlebars, so they can also use the block tags and helpers listed at the end; bank payment files use a simpler one-line format with filters of their own.

Variables marked "list" hold several rows. Use them with an each block, and inside the block refer to a row's fields as this.name, this.amount and so on. Examples come from the preview sample data in the code; amounts are shown for a workspace that pays in US dollars.

HR letters, salary slips and tax certificates also receive a verification object (verification.verifyUrl, verification.qrDataUrl, verification.caption, verification.token). The system adds the QR verification block to these documents by itself, so a template does not need to use them; the object is empty when the platform address is not configured.

HR letters​

System values are filled in for every letter. Letter data values come from the Issue Letter form, which shows the fields for the chosen letter type and pre-fills some of them from the employee record, or from the module that issued the letter automatically. Any custom field added on the Issue Letter form becomes a variable named after the key typed for it; if that key matches a system value, the system value wins.

VariableMeaningExample
employee.firstNameEmployee's first name (system)Jordan
employee.lastNameEmployee's last name (system)Lee
employee.employeeCodeEmployee code (system)EMP-0042
company.nameWorkspace name (system)Example Company Ltd
company.logoWorkspace logo as an embedded image, for an image source; empty when no logo is uploaded (system)(image data)
company.sealCompany seal as an embedded image; empty when none is uploaded (system)(image data)
company.addressAddress line 1, city, state or province and country, comma-separated (system)100 Example Street, Example City
referenceNumberThe letter's reference number (system)LTR-2026-00001
dateIssue date, written in the letter's language (system)13 Apr 2026
issuedDateIssue date as a raw date value; print it through the formatDate helper (system)(date value)
letterTypeThe letter type key (system)experience_certificate
designationDesignation. Form: experience certificate, offer, appointment and confirmation letters; pre-filled from the employeeSenior Software Engineer
departmentDepartment. Same letter types as designation; pre-filled from the employeeSoftware Engineering
joiningDateJoining date. Experience certificate, offer, appointment and confirmation letters; pre-filled from the employee15 Jan 2023
lastDateLast day of employment. Experience certificate30 Mar 2026
remarksFree-text remarks. Experience certificateOutstanding performance and dedicated service throughout the tenure
currentSalaryCurrent salary. Salary certificate; pre-filled with the current gross salary$ 6,500
effectiveDateEffective date. Salary certificate, promotion, increment, decrement and transfer letters01 Apr 2026
purposePurpose of the letter. Salary certificate; pre-filled from the employee's letter requestBank Loan Application
proposedSalaryOffered salary. Offer letter$ 7,000
salarySalary. Appointment letter; pre-filled with the current gross salary$ 6,500
reportingToReporting manager. Appointment letter; pre-filled from the employeeDavid Kim (Director of Engineering)
confirmationDateDate of confirmation. Confirmation letter(no sample)
previousDesignationDesignation before the promotion. Promotion letter; pre-filled with the current designationSoftware Engineer
newDesignationDesignation after the promotion. Promotion letterSenior Software Engineer
newSalaryNew salary. Promotion, increment and decrement letters$ 7,000
previousSalarySalary before the change. Increment and decrement letters; pre-filled with the current gross salary$ 6,500
reasonReason. Increment, decrement, transfer, warning and termination lettersExcellent performance and significant contributions to the organization
fromBranchBranch before the transfer. Transfer letter; pre-filled from the employeeHead Office
toBranchBranch after the transfer. Transfer letterRegional Office
previousWarningsEarlier warnings. Warning letterVerbal warning issued on 15 Feb 2026
expectedImprovementWhat must improve. Warning letterRegular attendance, punctuality, and adherence to company policies
deadlineDeadline for the improvement. Warning letter30 Apr 2026
lastWorkingDateLast working date. Termination letter30 Apr 2026
settlementDetailsHow the final pay will be settled. Termination letterFinal pay, including salary through the last working day and any leave payable under company policy, will be processed with the next payroll
addressedToAddressee, added as a custom field when HR issues a letter from an employee's request that names one(no sample)

Letters issued automatically fill these values themselves: the appointment letter when a contract is activated (designation, department, salary, joiningDate, and reportingTo, the reporting manager's name); the confirmation letter when HR confirms an employee (joiningDate, confirmationDate, designation, department); the promotion letter (previousDesignation, newDesignation, effectiveDate, newSalary); the increment or decrement letter (previousSalary, newSalary, effectiveDate, reason); the transfer letter (fromBranch, toBranch, effectiveDate, reason); and the experience certificate at final settlement in Offboarding (joiningDate, lastDate, designation, department).

Employment contracts​

VariableMeaningExample
contractNumberContract number; a dash when the contract has noneCON-2026-00001
contractTypeContract type, worded in the document's languagePermanent
probationMonthsProbation length in months3
dateThe date the document is produced18 Apr 2026
startDateContract start date01 May 2026
endDateContract end date; empty when the contract has no end date, so if endDate shows it only when there is one(no end date in the sample)
jobDescriptionThe job description saved on the employee's designationDesign and implement complex software features (first of five sample duties)
preExistingIPThe contract's Pre-existing intellectual property declaration, each typed line kept on its own line; empty when nothing was declared, so if preExistingIP can print your own wording instead. The standard agreements print it in Schedule A, or "None disclosed"(empty in the sample)
employee.firstNameFirst nameJordan
employee.lastNameLast nameLee
employee.fatherNameFather's name; empty unless recorded (the field is collected only in countries whose records carry it)(empty for a US workspace)
employee.employeeCodeEmployee codeEMP-0042
employee.cnicNational ID number, the document named by legal.nationalIdLabel; a dash when not recorded123-45-6789
employee.nationalityNationality as recorded; empty when not recordedAmerican
employee.designationDesignationSenior Software Engineer
employee.departmentDepartmentSoftware Engineering
employee.reportingToReporting manager's name with designation; "Management" when there is noneDavid Kim (Director of Engineering)
employee.childRelation"son of", "daughter of" or "son/daughter of", from the recorded genderson of
company.nameWorkspace nameExample Company Ltd
company.logoLogo as an embedded image(image data)
company.sealSeal as an embedded image(image data)
company.addressAddress line 1, city, state or province and country100 Example Street, Example City
company.emailCompany email(not in the preview sample)
company.phoneCompany phone(not in the preview sample)
company.payDayDay of the month salary is paid, from payroll settings; 7 when not set7
workingHours.perDayWorking hours per day8
workingHours.daysWorking days in words, from the employee's shift (or attendance settings when there is no shift)Monday to Friday
workingHours.startShift start time; 09:00 when there is no shift09:00
workingHours.endShift end time; 18:00 when there is no shift18:00
workingHours.shiftNameShift name; empty when there is no shift(empty in the sample)
workingHours.breakMinutesBreak length in minutes; 60 when there is no shift60
overtime.multiplierOvertime rate multiplier from attendance settings1.5
overtime.minMinutesMinimum minutes that count as overtime30
attendanceRules.graceLate grace period in minutes; the shift's own grace period wins over the company's15
attendanceRules.latesPerMonthForAbsentLates in a month that count as one absence3
attendanceRules.ladderList of late-arrival steps; each row has this.minutes and this.action30 / logged as a warning
salary.grossGross monthly salary on the contract, digits grouped, no currency6,500
salary.currencyWorkspace currency codeUSD
salary.basicThe basic payroll pays: what the salary structure's BASIC component gives on the gross of the salary assignment in force, formatted like the gross; empty when the structure has no BASIC component, or when the assignment's gross differs from the contract's4,550.00
salary.allowancesThe rest of the gross after the basic, formatted like the gross; empty under the same conditions, or when it is zero1,950.00
leavePoliciesList of the employee's paid, active leave types (types limited to the other gender are left out); each row has name, quota, eligibility, carryForward, payRate(the workspace's own leave types)
name (in leavePolicies)Leave type name(workspace data)
quota (in leavePolicies)Days per year(workspace data)
eligibility (in leavePolicies)"From day 1", or "After N months"From day 1
carryForward (in leavePolicies)"None", or "Up to N days"None
payRate (in leavePolicies)"Paid", in the document's language, for a type that pays a full day; for a type paid at a reduced rate, its pay share as a percentage written the document's wayPaid (50% for a half-pay type)
leaveRules.sandwichTrue when any listed leave policy applies the sandwich rule (weekends or holidays between two leave days count as leave)(true or false)
leaveRules.adjacentTrue when any listed leave policy applies the adjacent-day rule (leave next to a weekend or holiday may be counted together with it)(true or false)
legal.jurisdictionGoverning-law jurisdiction for the workspace's country, including any leading article; empty for a country without onethe United States of America and the State in which the Employee is primarily employed
legal.probationNoticeWeeksNotice during probation, in weeks1
legal.probationNoticeDaysNotice during probation, in days7
legal.maxProbationMonthsLongest probation allowed, in months6
legal.postProbationNoticeMonthsNotice after confirmation, in months1
legal.noticeMinDaysLower end of the notice band after confirmation, in days30
legal.noticeMaxDaysUpper end of the notice band, in days90
legal.nonCompeteMonthsLongest post-employment restraint, in months12
legal.finalSettlementDaysDays within which final dues are settled30
legal.statutesList of statutes named in the governing-law clause; empty where none are modelled(empty for the US)
legal.nationalIdLabelName of the national ID documentSocial Security Number
legal.incomeTaxStatuteIncome-tax statute cited in the pay clause; empty where nonethe Internal Revenue Code
legal.payrollContributionsStatutory payroll contributions named next to tax; empty where noneSocial Security and Medicare contributions under the Federal Insurance Contributions Act (FICA)
legal.leaveStatutesList of statutes behind the leave entitlements; empty where none(empty for the US)
legal.restraintStatuteProvision that makes post-employment restraints enforceable; empty where none(empty for the US)
legal.eSignatureStatuteStatute that makes electronic acceptance binding; empty where nonethe Electronic Signatures in Global and National Commerce Act (E-SIGN) and the Uniform Electronic Transactions Act (UETA) as enacted in the State of employment
legal.leaveYearLabelHow the leave year runs, from the country's fiscal-year startJanuary to December
legal.usesJudicialStampPaperTrue where contracts are conventionally executed on judicial stamp paperfalse
legal.sampleDemonymA nationality used only as preview sample dataAmerican
witness1.nameFirst witness's name, entered on the contract(no sample)
witness1.cnicFirst witness's ID number(no sample)
witness1.designationFirst witness's designation(no sample)
witness2.nameSecond witness's name(no sample)
witness2.cnicSecond witness's ID number(no sample)
witness2.designationSecond witness's designation(no sample)
hasWitnessesTrue when either witness has a namefalse
electronicAcceptancePresent only when the employee accepted the contract electronically; empty otherwise(empty in the sample)
electronicAcceptance.acceptedAtDate of electronic acceptance(no sample)
electronicAcceptance.ipIP address the acceptance came from(no sample)
electronicAcceptance.userAgentBrowser identification, first 100 characters(no sample)
variant.keyPDF variant chosen at download: digital (full letterhead), stamp_overlay (blank top area for stamp paper) or plain (no letterhead)digital
variant.digitalTrue for the digital varianttrue
variant.stampOverlayTrue for the stamp-overlay variantfalse
variant.plainTrue for the plain variantfalse

Salary slips​

VariableMeaningExample
company.nameWorkspace nameExample Company Ltd
company.logoLogo as an embedded image(image data)
company.sealSeal as an embedded image(image data)
company.addressStreet, city, state or province and country, skipping empty parts100 Example Street, Example City
company.emailCompany email[email protected]
company.phoneCompany phone+1 555 0100
employee.full_nameFirst and last nameJordan Lee
employee.codeEmployee codeEMP-0042
employee.departmentDepartmentSoftware Engineering
employee.designationDesignationSenior Software Engineer
employee.cnicNational ID number123-45-6789
employee.bank_nameEmployee's first bank account: bank nameExample Bank
employee.bank_titleAccount titleJordan Lee
employee.bank_accountFull account number1234-5678901234
employee.bank_displayBank with the account masked to its last four digitsExample Bank (***1234)
payment.from_bank_nameBank the salary was paid fromExample Bank
payment.from_bank_account_titlePaying account's titleExample Company Ltd
payment.from_bank_account_numberPaying account's number0001-1234567890
payment.from_bank_branchPaying account's branchMain Branch
payment.from_displayPaying bank with the account masked to its last four digitsExample Bank (***7890)
payment.methodPayment method keybank_transfer
payment.method_labelPayment method in wordsBank Transfer
payment.referencePayment referenceTRX-2026040712345
payment.is_paidTrue once the entry is marked paidtrue
acknowledgment.is_acknowledgedTrue once the employee has confirmed receipttrue
acknowledgment.timestampWhen they confirmed, in the workspace's time08 Apr 2026, 09:14
acknowledgment.ipIP address of the confirmation203.0.113.42
acknowledgment.signer_nameName stamped as the typed signatureJordan Lee
payroll.month_yearPay periodMarch 2026
payroll.pay_datePayment date, or the date the slip is generated when the entry is unpaid07 Apr 2026
payroll.working_daysWorking days in the period26
payroll.present_daysPresent days23
payroll.absent_daysAbsent days1
payroll.leave_daysLeave days1
payroll.late_countLate arrivals2
payroll.early_leave_countEarly departures; the standard slip shows them only when there are some1
payroll.half_daysHalf days; the standard slip shows them only when there are some1
payroll.unpaid_leave_daysUnpaid leave days; on a processed run this includes the days of pay withheld by leave at reduced pay (four days at 50% count as 2); the standard slip shows them only when there are some1
payroll.overtime_hoursOvertime hours0
payroll.holidaysHolidays in the period0
payroll.exempt_daysDays on a shift that does not require punches(not in the preview sample)
payroll.is_exemptTrue when most present days were punch-exempt days(not in the preview sample)
payroll.gross_salaryAssigned monthly gross; stays the same whatever the attendance6,500
payroll.total_earningsSum of the earning lines, after attendance proration(not in the preview sample)
payroll.total_deductionsTotal deductions1,170
payroll.net_salaryNet pay5,330
payroll.net_salary_wordsNet pay in words, without the currency nounFive Thousand Three Hundred and Thirty
payroll.tax_amountTax deducted this month845
payroll.taxable_incomeTaxable income this month6,500
payroll.pf_taxable_excessEmployer provident-fund contribution above the tax-free limit50
payroll.has_pf_taxable_excessTrue when that excess appliestrue
payroll.has_absence_tax_noteTrue when absences or unpaid leave reduced the taxed earningstrue
payroll.fy_labelFiscal year labelFY 2026
payroll.has_tax_boxTrue when there is taxable income or tax this monthtrue
payroll.projected_annual_taxableThis month's taxable income times 1278,000
payroll.projected_annual_taxThis month's tax times 1210,140
payroll.pf_month_employeeEmployee provident-fund contribution this month195
payroll.pf_month_employerEmployer provident-fund contribution this month195
payroll.pf_ytd_employeeEmployee contributions so far this fiscal year585
payroll.pf_ytd_employerEmployer contributions so far this fiscal year585
payroll.pf_ytd_totalBoth, so far this fiscal year1,170
payroll.pf_balanceFund balance through the slip's month9,240
payroll.has_pf_summaryTrue when there is any fund activity or balancetrue
payroll.history_monthsList: the last 12 months, each with this.label, this.gross, this.deductions, this.tax, this.net, this.bar_pctMar 2026 / 6,500 / 1,170 / 845 / 5,330 / 100
payroll.history_grossGross total of those months76,500
payroll.history_deductionsDeductions total13,740
payroll.history_taxTax total9,885
payroll.history_netNet total62,760
payroll.months_paidPayroll months on record through this slip24
payroll.lifetime_grossGross paid over the whole employment148,500
payroll.lifetime_taxTax over the whole employment19,005
payroll.lifetime_netNet over the whole employment121,920
payroll.has_lifetime_taxTrue when any tax has been deductedtrue
payroll.employer_contributions_totalTotal employer contributions this month580
payroll.ctcEarned pay after attendance deductions plus employer contributions7,080
payroll.ytd_monthsList: fiscal-year months so far, each with this.label, this.gross, this.deductions, this.tax, this.net (kept for older slip designs)Jan 2026 / 6,500 / 1,170 / 845 / 5,330
payroll.ytd_grossGross so far this fiscal year19,500
payroll.ytd_deductionsDeductions so far this fiscal year3,510
payroll.ytd_taxTax so far this fiscal year2,535
payroll.ytd_netNet so far this fiscal year15,990
payroll.is_importedTrue when the slip comes from an imported salary historyfalse
payroll.source"imported" or "processed"processed
payroll.adjustment_notesNotes on the entry, with the import note removed(empty in the sample)
payroll.has_adjustment_notesTrue when there are notes to showfalse
earningsList of earning lines, each with this.name and this.amountBasic Salary / 3,900
deductionsList of deduction lines, each with this.name and this.amountIncome Tax / 845
employer_contributionsList of employer contribution lines, each with this.name and this.amount(not in the preview sample)
has_employer_contributionsTrue when there is at least one employer contribution(not in the preview sample)

The fiscal-year sample figures above are for a workspace whose fiscal year starts in January; the preview recalculates them for the workspace's own fiscal year.

Tax certificates​

VariableMeaningExample
company.nameWorkspace name; also the signatoryExample Company Ltd
company.legalNameLegal name; empty when it is the same as the workspace name(empty when identical)
company.ntnCompany national tax number field, shown in company settings only in countries that use it; empty otherwise(empty for a US workspace)
company.strnCompany sales-tax registration field, same rule as above(empty for a US workspace)
company.addressAddress lines 1 and 2, city, state or province and country100 Example Street, Example City
company.emailCompany email[email protected]
company.phoneCompany phone+1 555 0100
company.websiteCompany websitewww.example.com
company.logoLogo as an embedded image(image data)
company.sealSeal as an embedded image(image data)
employee.full_nameFirst and last nameJordan Lee
employee.codeEmployee codeEMP-0042
employee.cnicNational ID number123-45-6789
employee.ntnEmployee's personal tax number, where the country records one; empty otherwise(empty for a US workspace)
employee.designationDesignationSenior Software Engineer
employee.departmentDepartmentSoftware Engineering
employee.joining_dateJoining date15 Jan 2022
fiscalYearFiscal year nameFY 2025
fiscalYearRangeFirst and last day of the fiscal year01 Jan 2025 – 31 Dec 2025
certificateNumberCertificate number, built from the fiscal year and employee codeTC-FY2025-EMP-0042
issuedDateDate the certificate is produced15 Jan 2026
monthsList: one row per payroll month in the year, each with this.monthName, this.grossSalary, this.taxableIncome, this.taxDeductedJanuary 2025 / 6,000.00 / 5,500.00 / 760.00
totals.grossSalaryGross for the year75,000.00
totals.taxableIncomeTaxable income for the year69,000.00
totals.taxDeductedTax deducted for the year, including tax adjustments9,630.00
totals.taxAdjustmentsNet tax adjustments; empty when there are none(empty in the sample)
amountInWordsTotal tax deducted in words, with the currency nounNine Thousand Six Hundred and Thirty Dollars Only
signatory.nameSignatory: the workspace nameExample Company Ltd
signatory.designationSignatory title, in the certificate's languageAuthorized Signatory

Bank payment files​

A payment file format has a header line, a row line repeated once per payment, and a trailer line. Row variables work only in the row line; global variables work in all three. Add a filter after a vertical bar, for example debitAccount|pad:13:0 or beneName|trunc:35|upper. Filters: pad:length:character pads on the left (zero by default), padEnd:length:character pads on the right (space by default), trunc:length cuts to a maximum length, upper and lower change case. An unknown variable prints nothing and an unknown filter is ignored. Commas and line breaks in names are replaced with spaces.

VariableMeaningExample
beneNameRow. Beneficiary name: the account title, else the employee's nameJORDAN LEE
employeeNameRow. Employee's full name (for a contribution-fund transfer row, the fund's name)Jordan Lee
employeeCodeRow. Employee code (for a fund row, the fund's code)E-1002
accountTitleRow. Beneficiary account titleJORDAN LEE
accountNumberRow. Beneficiary local account number9876543210
ibanRow. Beneficiary IBAN, spaces removed, upper caseGB33BUKB20201555555555
bankNameRow. Beneficiary bank nameSample Bank
bankShortNameRow. Beneficiary bank's short labelSMPL
bankCodeRow. Routing code: the paying bank's SWIFT code when both accounts are at the same bank, otherwise the beneficiary bank's routing codeSMPLUS44XXX
swiftRow. Beneficiary bank's SWIFT/BICSMPLUS44XXX
amountRow. Net pay, rounded to a whole unit and written with the format's number of decimals4250.00
amountMinorRow. The same amount with the decimal point removed425000
isOwnBankRow. "1" when the beneficiary banks with the paying bank, else "0"0
countGlobal. Number of payments in the file2
totalGlobal. Sum of the amounts9580.00
totalMinorGlobal. The sum with the decimal point removed958000
valueDateGlobal. Payment date chosen when the file is generated, written with the format's date pattern (YYYY, MM and DD)25/07/2026
companyNameGlobal. Paying company's nameExample Company Ltd
debitAccountGlobal. Paying (debit) account number(the paying account)
debitTitleGlobal. Paying account title(the paying account)
debitIbanGlobal. Paying account IBAN(the paying account)
debitSwiftGlobal. Paying bank's SWIFT/BIC(the paying account)
debitCityGlobal. City code typed when the file is generated, upper case; required when the format uses itNYC
nameFile name pattern only. The format's name, with unsafe characters replaced by dashesExample-Bank-payment-file
yearFile name pattern only. Payroll year2026
monthFile name pattern only. Payroll month, two digits07

Only employees paid by bank transfer, with a positive net pay, a bank account with an IBAN and a selected bank, and a routing code, get a row; everyone else is listed as skipped. Contribution-fund transfers that go out in the payment file get rows of their own.

Handlebars helpers​

These helpers are available in HR letters, employment contracts, salary slips and tax certificates (and in email templates, which use the same engine). They are not available in bank payment files.

HelperWhat it doesExample use
formatCurrencyFormats a plain number as money in the document's currency, with grouping and two decimals. Also reads the amounts in the tables above, which arrive already formatted in the document's languageformatCurrency 5330 gives $ 5,330.00 on a slip
formatDateWrites a date as day, short month and year, in the document's languageformatDate issuedDate gives 13 Apr 2026
uppercaseUpper-cases text (prints nothing for a non-text value)uppercase employee.full_name
lowercaseLower-cases textlowercase employee.code
eqTrue when two values are exactly equal; use it inside if or unlessif (eq payment.method "bank_transfer")
addAdds two numbersadd payroll.present_days payroll.leave_days
subtractSubtracts the second number from the firstsubtract payroll.working_days payroll.present_days
incAdds one, for 1-based row numbersinc @index inside an each block
monthNameMonth name for a month number 1 to 12, in the document's languagemonthName 4 gives April
txPrints a platform message by its key, translated into the document's languagetx 'payroll.tax.certificateText.authorizedSignatory'
numberToWordsA plain number in words, with the currency noun and "Only". Reads formatted amounts like formatCurrencynumberToWords 5330 gives Five Thousand Three Hundred and Thirty Dollars Only on a slip
currencyWordThe currency's noun on its ownDollars
currencySymbolThe currency's symbol on its own$

Handlebars' own block tags also work: if with else, unless, each (with @index, @first and @last inside the block), with and lookup. Letters, contracts, salary slips and tax certificates all carry their currency and language, so the currency and language-aware helpers work in each of them.