Skip to content

Merge field formats

A format controls how a value prints: as money, a plain number, a percentage or a date. It only changes how the value looks in the document. The data in Salesforce is not touched.

In the template editor, click a merge field and pick from Format. For currency, number, percent and date formats, a second list then lets you fine-tune it, for example No decimals, Decimals only when needed or Long. See Merge fields and formats.

The merge field popover with Format set to Currency and a second list offering Currency, No decimals and Always 2 decimals

In a Word-file template, type the keyword after a colon, for example {{Opportunity.Amount:currency}}.

Default (no keyword) prints the value in the template’s own date, time and number style (its Dates and numbers setting), with numbers at the field’s own number of decimals.

Examples use Amount = 12345.6 in Australian English.

On screenKeywordWhat it printsExample
CurrencycurrencyMoney, with the currency symbol and the currency’s usual decimals (two for most, none for currencies such as JPY).$12,345.60
Currency > No decimalscurrency0Money, rounded to a whole amount.$12,346
Currency > Always 2 decimalscurrency2Money, always with two decimals.$12,345.60
Currency > Decimals only when neededcurrency-trimMoney, with decimals only when the amount is not whole: $100 and $50.25, never $50.2. Currencies with no decimals, such as JPY, never print any. New in 3.4.$12,345.60
NumbernumberA number with thousands separators, at the field’s own decimals.12,345.6
Number > No decimalsintegerA whole number. Handy for quantities and counts, so Quantity = 120.00 prints 120.12,346
Number > Always 2 decimalsnumber2A number, always with two decimals.12,345.60
PercentpercentA percentage with two decimals.see below
Percent > No decimalspercent0A percentage, rounded to a whole number.see below

Percentages: a Salesforce Percent field already holds the percentage, so 12.5 prints as 12.50% (or 13% with No decimals). A plain number or a total holds a fraction, so 0.125 also prints as 12.50%.

Rounding goes to the nearest value, with halves rounded up. Decimals only when needed rounds first, so 99.995 prints $100. It works on totals too, and prints the same in designed and Word-file templates, in PDF and in Word.

Examples use 5 September 2026 at 2:32 pm in Australian English.

On screenKeywordExample
Date > Shortdate5/9/2026
Date > Mediummedium5 Sep 2026
Date > Longlong5 September 2026
Date > FullfullSaturday, 5 September 2026
Date > ISOiso2026-09-05
Date & time > Shortdatetime5/9/2026, 2:32 pm
Date & time > Medium, Long, Full, ISOdatetime-medium, datetime-long, datetime-full, datetime-isoThe date styles above, with the time added. ISO prints 2026-09-05T14:32:00.

The order of day, month and year, and the separators, follow the language and region the template uses.

Word-file tags accept a few extras. The Tag cheat sheet has the full list.

  • A specific language and region: add it after the format, for example {{Amount:currency:de_DE}} or {{CloseDate:date:fr_FR}}.
  • Your own date pattern: for example {{CloseDate:d MMMM yyyy}} or {{CreatedDate:dd/MM/yyyy HH:mm}}.
  • Fallback text for a blank value: add it after a |, for example {{Amount:currency|N/A}}.

See Word-file templates.

  • Fallback text prints in place of a blank value. In the editor, set it in the same place as the format. See Merge fields and formats.
  • Totals (SUM, COUNT, AVG, MIN, MAX) take a format from the number list above. MIN and MAX of a date can also take a date style. Totals print the same in PDF and Word.