TrustPager Docs

← Help Center

Communications

Template Tokens: Names, Dates, and CRM Variables

How to use {{contact.greeting}}, {{today}}, {{now}} and other template tokens, and how to show different wording by pipeline stage or tag, plus date maths like {{today + 6 months}} and wording for empty fields like {{key | wording}}.

Template tokens let you inject live CRM data into your messages automatically. Type a token inside double curly braces: {{contact.greeting}}, and TrustPager replaces it with the real value at send time.

Where Tokens Work

All tokens in this guide work across every template surface in TrustPager:

When you're inside a config field that supports tokens, a variable picker appears: click it to browse and insert the exact token path without having to type it manually.

Name Tokens

Three name tokens cover every scenario:

What about {{contact.full_name}}? The old token still works and falls back cleanly for first-name-only contacts: if there's no surname it renders just the first name instead of leaving a trailing space. That said, {{contact.display_name}} is recommended for new templates. The name makes the fallback behaviour explicit.

First-Name-Only Contacts

Some contacts only have a first name: think "Cher", or a lead who signed up with just their given name. When you create or edit a contact at https://app.trustpager.com/crm/contacts, leave the Last name field blank. TrustPager stores a null surname: no placeholder, no blank space. The name tokens above handle this cleanly. You can also clear a surname via the API: pass "last_name": null to update_contact.

Date and Time Tokens

Two tokens let you stamp the current date or timestamp at the moment the automation fires:

{{today}}

The current date in your workspace's configured timezone, formatted as YYYY-MM-DD: for example, 2026-04-22.

Use {{today}} for date-only fields such as relationship_started_at or actual_close_date. The value is a clean date string in the workspace timezone, so if you're in Australia/Sydney and it's 8am AEST, you get today's Australian date: not UTC's previous day.

Example: a stage automation on your "Lead Received" stage sets relationship_started_at to {{today}}, so every new lead gets an accurate relationship start date stamped automatically.

{{now}}

The current date and time as a UTC ISO 8601 timestamp: for example, 2026-04-22T08:15:30Z.

Use {{now}} for full timestamp fields (Postgres timestamptz columns). Postgres handles the timezone conversion automatically: the value is stored in UTC and displayed in local time wherever it appears. Do not use {{now}} for date-only fields; use {{today}} instead.

CRM Variable Tokens

Beyond name and date, you can reference almost any field on the contact, opportunity, or account. Common examples:

Custom Field Tokens

Custom fields are referenced via their field ID in the metadata object:

To find the exact field ID and token path, open any config field that supports tokens and use the variable picker: it lists every available token with the correct path already formatted.

Date Maths: Shift a Date Forward or Back

Add or take away days, weeks, months or years from a date token. The result is still a calendar date, so it drops straight into a date field.

Use a plus or minus sign, then a number (up to 4 digits), then a unit. Each unit can be written short or long: d, day, days, w, week, weeks, m, month, months, y, year, years.

Things to know:

The full walkthrough, including a recall reminder example, is at https://trustpager.com/help-center/set-crm-field-automation.

Wording for an Empty Field

If a field might be empty, put a bar and some wording after it: {{key | wording}}. When the field has a value, the value prints. When it is empty or missing, your wording prints instead.

Example: {{deal.metadata.renewal_date | to be agreed}} prints the renewal date when there is one, and "to be agreed" when there is not.

This works in automation text, in document templates (Document Builder), in the signing email subject and intro, and in signer fields. It also combines with date maths: {{deal.metadata.start_date + 1 year | to be agreed}}.

It matters most for documents. A document sent for signing will not send while any merge field is blank, so nobody signs a contract with a hole in it. Giving the field wording to print is the way to let it send. See https://trustpager.com/help-center/send-documents-esigning.

Show Different Wording by Pipeline Stage

You can make one message read differently depending on which pipeline stage the opportunity is in. You write it once, and TrustPager picks the right wording for each lead.

Where it works

The syntax

To show one piece of wording when the opportunity is in a stage, and something else for every other stage:

{{#if opportunity.stage == "Stage Name"}}text when the opportunity is in that stage{{else}}text for any other stage{{/if}}

To flip it around, use !=:

{{#if opportunity.stage != "Stage Name"}}text when it is in any other stage{{else}}text when it is in that stage{{/if}}

Example

{{#if opportunity.stage == "Intro Booked"}}Your intro call is booked.{{else}}Choose a time for your intro call.{{/if}}

A lead in the Intro Booked stage sees "Your intro call is booked." A lead in any other stage sees "Choose a time for your intro call."

The rules

Things to know

Show Different Wording by Tag

You can also switch wording based on the tags on an opportunity. This is handy when one message, or one Auto Sequence, has to serve a lead at different points in their journey and only the call to action changes.

The syntax

Use contains to check whether the opportunity has a tag:

{{#if opportunity.tags contains "Intro booked"}}Your intro call is booked.{{else}}Choose a time for your intro call.{{/if}}

Use !contains for the opposite, when the opportunity does not have the tag:

{{#if opportunity.tags !contains "Intro booked"}}Choose a time for your intro call.{{else}}Your intro call is booked.{{/if}}

The rules

Three endings in one message

Blocks can sit inside each other, so one message can end three different ways:

{{#if opportunity.tags contains "Signed up"}}Activate your plan{{else}}{{#if opportunity.tags contains "Booked"}}Start your free trial{{else}}Book a call{{/if}}{{/if}}

Someone tagged "Signed up" sees "Activate your plan". Someone tagged "Booked" sees "Start your free trial". Everyone else sees "Book a call".

A typical setup

  1. Build one Auto Sequence for the lead's whole journey at https://app.trustpager.com/auto/auto-queues, and write the call to action as a tag block like the one above.
  2. At https://app.trustpager.com/auto/automations, add an automation that uses the Apply Tags action on a real event, such as a booking being made, a form being completed or a quote being paid.
  3. From then on, every later email picks the ending that matches the tags the opportunity has at that moment.

Tag names are matched as typed, so if you rename a tag, update any block that uses the old name.

Tip: Birthday messages use a separate single-brace syntax ({first_name}) and are not affected by the tokens in this guide: they already handle null surnames cleanly via their own renderer.
← Back to Help Center Open on trustpager.com ↗