System Variables
Built-in merge tokens like {today}, {now}, and org/user variables that need no data source — plus how to format them.
System variables are ready-made merge tokens for values that do not come from the record — today's date, the current time, and details about the running user and org. They need no data source configured.
System variables use single curly braces { }, which distinguishes them from data merge fields that use double braces {{ }}:
{today} ← system variable (single brace)
{{Account.Name}} ← data merge field (double brace)
You can type a system variable into any text field, exactly like a data merge field.
Date and time variables
| Token | Resolves to |
|---|---|
{today} | The current date |
{tomorrow} | Tomorrow's date |
{yesterday} | Yesterday's date |
{now} | The current date and time |
By default these render using the running user's locale (and, for {now}, the user's time zone). You can override the format inline — see Formatting below.
Use case: Document date and validity line
Para: Generated on {today}
Para: This quote is valid until {tomorrow}
Org and user variables
| Token | Resolves to |
|---|---|
{org_name} | Your Salesforce organization's name |
{user_name} | Full name of the user generating the document |
{user_first_name} | The user's first name |
{user_last_name} | The user's last name |
{user_email} | The user's email address |
Use case: Signature block
Para: Prepared by {user_name}
Para: {org_name}
Para: {user_email}
Page number variables
| Token | Resolves to |
|---|---|
{page_number} | The current page number |
{total_pages} | The number of pages in the document |
They work in any text, including next to a logo in a header or footer, and in a Link block's label, a table cell and a caption, in body content as well as in a header or footer.
Para: Page {page_number} of {total_pages}
- A link's URL is left as written.
- A format after
|on a page counter is rejected at save. - Behavior change in 1.11.0:
{page_number}or{total_pages}already saved in a body table cell, caption or link label used to print as written. They now print the page number or count in the PDF. Showing the literal text is not supported, and\{page_number\}does not keep it literal.
Autocomplete
Type { and the start of a name, such as {to, in a heading, paragraph, text, link, list item or table cell to list the matching system variables. Click one, or use the arrow keys and Enter, to insert it as {name} with its closing brace. A lone {, an escaped \{ and a variable that is already closed open nothing, and Enter and Tab alone do not choose one. Merge field suggestions after {{ are unchanged.
Formatting system variables
The date and time variables accept the same format spec as data merge fields, using a space-pipe-space (|) separator:
{today | dd MMM yyyy} → 21 Jul 2026
{today | MMMM d, yyyy} → July 21, 2026
{now | h:mm a} → 2:45 PM
{now | dd/MM/yyyy HH:mm} → 21/07/2026 14:45
See Formatting Merge Fields for the full pattern reference.
Unknown variables are rejected on save
If you type a system variable name that does not exist (for example, a typo like {todya}), saving the template fails with an error that quotes the text and lists the valid variable names. A half-typed {toda with no closing brace is rejected too. The mistake is caught in the builder instead of reaching a generated document.
To print something like {today} as plain text, escape the braces: \{today\}. See Merge Field Syntax.
See also
- Merge Field Syntax — data tokens and relationships
- Formatting Merge Fields — dates, numbers, currency, and percentages