Dynamic Fields Reference
Dynamic Fields Reference
Letter templates use {{fieldCode}} syntax to pull live data from your ChartHop organization into generated documents. When a PDF is generated for a specific employee on a specific date, each field expression is replaced with that person's actual data.
Packages: Basic | Standard | Premium Roles: Owner | Technical Owner
How field expressions work
Field expressions follow the pattern {{fieldCode}}. When you generate a document:
- ChartHop evaluates each expression against the selected employee and effective date.
- The expression is replaced with the resolved value in the rendered PDF.
- If the field has no value for that employee, the expression resolves to empty (see the empty field behavior section below).
Built-in field codes
These fields are available in every ChartHop organization:
Person fields
Field code | What it returns |
|---|---|
{{name.first}} | The person's first name |
{{name.last}} | The person's last name |
{{name.full}} | The person's full name (first and last) |
{{name.preferred}} | The person's preferred first name, if set |
{{birthDate}} | The person's date of birth |
{{pronouns}} | The person's pronouns |
{{contact.workEmail}} | Work email address |
{{contact.homeEmail}} | Home email address |
{{contact.workPhone}} | Work phone number |
{{contact.mobilePhone}} | Mobile phone number |
{{address}} | Full home address |
{{startDateOrg}} | The date the person started at the organization |
{{endDateOrg}} | The date the person left the organization (if applicable) |
Job fields
Field code | What it returns |
|---|---|
{{title}} | Job title |
{{department.name}} | Department name |
{{location.name}} | Office or remote location |
{{employment}} | Employment status (Full Time, Part Time, Contract, etc.) |
{{manager.name.full}} | Direct manager's full name |
{{manager.title}} | Direct manager's job title |
{{manager.contact.workEmail}} | Direct manager's work email |
{{startDate}} | Start date in the current job |
{{startDateOrg}} | Start date at the organization |
{{levelCode}} | Career level code |
Compensation fields
Field code | What it returns |
|---|---|
{{baseComp.pay}} | Base pay amount in local currency |
{{baseComp.annualized}} | Annualized base pay |
{{baseComp.interval}} | Pay interval (yearly, hourly, etc.) |
{{baseComp.currency}} | Currency of the base pay |
{{variableTarget.pay}} | Target variable pay amount |
{{cashComp}} | Total annual cash compensation (base + variable) |
Organization fields
Field code | What it returns |
|---|---|
{{org.name}} | Your organization's name |
{{org.image}} | Your organization's logo image URL |
Custom field codes
If your organization has custom fields, you can use them in letter templates too.
To find the field code for a custom field:
- Go to Settings > Fields.
- Find the field you want to use.
- The field code is the internal name shown in the field's details. It is typically a camelCase version of the field label (for example, a field labeled "Bonus Target" might have the code bonusTarget).
Use custom fields in the same {{fieldCode}} syntax:
{{bonusTarget}}
{{offerTradedBase}}
{{employeeNumber}}Formatting values
Field values are returned as stored in ChartHop. Some tips for common formatting needs:
Dates. Dates are returned in ISO format (YYYY-MM-DD) by default. If you need a different format (e.g., January 1, 2025), ask your AI tool to wrap the field expression in a formatting function, or handle formatting in your template.
Currency. Compensation fields return the raw number and currency code. If you need a formatted amount like $85,000, confirm how the value is stored in your org and adjust the template accordingly.
Names. Use {{name.preferred}} if you want to address employees by their preferred name rather than their legal first name.
Empty field behavior
If a field has no value for a particular employee, the {{fieldCode}} expression resolves to an empty string. The surrounding text remains, which can produce awkward output — for example, Your manager is . if the manager field is empty.
To handle this gracefully:
- For fields that may be empty, consider adding a note in your template such as {{manager.name.full}} (if applicable) and reviewing generated documents before distributing.
- When generating in bulk, preview a few employees with and without the field populated before generating for everyone.
Using field codes in context
Here are examples of field expressions used in a typical offer letter:
<p>Dear {{name.preferred}},</p>
<p>We are pleased to offer you the position of <strong>{{title}}</strong> in the
<strong>{{department.name}}</strong> department, reporting to <strong>{{manager.name.full}}</strong>.</p>
<p>Your start date will be <strong>{{startDate}}</strong>.</p>
<p>Your base salary will be <strong>{{baseComp.pay}}</strong> per {{baseComp.interval}}.</p>
<p>Sincerely,<br>
{{org.name}}</p>