Skip to content

Merge fields and formats

Merge fields pull real data from a record into your document: a customer name, an amount, today’s date. In the editor each merge field appears as a coloured chip, which you cannot break by accident while typing around it.

  1. Click into a Text, Heading or table cell block.
  2. Open the Merge fields panel on the left, or type {{ to see suggestions as you type.
  3. Search by label or field name, then click the field to insert it.

Typing {{ suggests the built-in values (such as Today and Now) and the fields of the current object. Inside a repeat, that means the fields of each row. For a field on a related parent record, such as Account.Owner.Email, use the Merge fields panel and click through to the parent.

The Merge fields panel, showing recent fields, the record's own fields, and parent records you can click into

The panel lists the record’s own fields first (Record Fields), then its parent records (Parent lookups). It also has sections for Related lists, Built-ins, Running User and Company.

  • Reach a parent’s fields: click a lookup to open that parent’s fields. You can keep going up to five levels. A trail at the top shows where you are.
  • Search: search covers the current object’s fields and the other sections. To find a field on a parent, click into the parent first.
  • Recent: your last few inserted fields stay at the top, limited to the ones you can use where your cursor is. Each shows a small badge for its field type.

If you click a field without first clicking into a block, the editor tells you so.

The + buttons on the right-hand side open the same field list in a small pop-up, so they can reach parent fields too. You will find them next to the file name, a Show if condition, a signer label, and the e-signature recipient Name and Email. Press Escape to close the pop-up.

  • Fields on the record itself, on the template’s base object.
  • Fields on parent records, up to five levels up, for example Account.Owner.Profile.UserType.Name. This works anywhere, including inside a repeat.
  • Related lists (child records), shown with a Repeat for each block: each opportunity and its line items, each case and its comments. Repeats can sit inside repeats as deep as you need, and can run across junction objects. Inside a repeat, the field list only offers fields that work at that level. A repeat can also sort, limit and group its rows. Activity History and Open Activities can’t be listed. See Repeats and conditional content.
  • Totals over related lists: SUM, COUNT, AVG, MIN and MAX, with an optional format. They give the same result in PDF and Word. Inside a grouped repeat, a total is the group’s subtotal.
  • The person generating the document, through {{RunningUser.*}}: name, title, email, phone and manager. A “Prepared by” line always shows whoever made the document, whether from a record page, a Flow or a batch.
  • Today’s date and the current time: {{Today}} and {{Now}}, in the running user’s time zone, with optional formatting.
  • Approval history: a Repeat for each block can list a record’s Salesforce approval history (approver, comments and date), handy for contract cover sheets and sign-off summaries.
  • Rich text: Long Text Area fields that hold formatted text keep their formatting, in the PDF and in the canvas preview.
  • Images: a Salesforce image or URL field can be shown as a picture, inside a line of text or as its own block. See below.
  • Link addresses: merge fields can go inside a web address, for example https://salesforce.com/{{Account.Id}}.
  • Barcodes and QR codes: blocks that turn any merge field’s value into a code. See Barcodes and QR codes.

Click a merge field chip to open its settings. The Format list changes how the value prints, for example as a currency, a currency with decimals only when needed ($100, $50.25), or a short date. The format uses the locale of the person generating the document. For every format, with examples, see Merge field formats.

In the same chip settings, Fallback text is printed when the field is empty. For example, give Account.Phone a fallback of (no phone on file).

A merge field's settings, with a format chosen and fallback text for when the field is empty

To show a picture from a field inside a line of text:

  1. Insert the merge field as usual.
  2. Click the chip to open its settings.
  3. Turn on Render as image. Width and height boxes appear.

When the document is made, the chip is replaced by the field’s image. Inside a repeat, each row shows its own image.

For a letterhead, signatory logo or large image that changes per record and sits on its own line, use an Image block and set its Source to Merge field instead. See Layout blocks.

Use a Text field (Text(18) is enough) that holds the ContentDocumentId of the Salesforce File, the ID that starts with 069. The document always prints the newest version of that file, so when someone uploads a new logo, the next document uses it with no change to the record. A Flow that runs when the file is uploaded can copy the ID into the field.

The field can be a Text, Text Area, URL or text formula field. It can hold any of these:

Value in the fieldWhat prints
A ContentDocumentId (069...)The newest version of the file. Recommended.
A ContentVersionId (068...)That exact version, even after a newer one is uploaded.
A Salesforce file link, such as /sfc/servlet.shepherd/version/download/068... or /sfc/servlet.shepherd/document/download/069..., with or without your org’s address in frontThe file it points to.
A public web address starting with https://The image, with premium high-volume rendering only. Otherwise the document shows a short note in its place.

Anything else, such as an http:// address or a file path from a computer, prints nothing, and the generation history says the field does not hold an image file. A blank field prints nothing, or the field’s fallback text if you set one.

The person generating the document must have access to the file. If they do not, the image is left out and the generation history says so.

The Image and Barcode blocks list one record’s fields at a time. If the object has lookups, use Fields from above the list to switch between This record and a parent, such as Owner (User).

Sliick Docs always respects your Salesforce permissions. When you browse merge fields, you only see fields you can read, so two admins may see different lists. If a field you expect is missing, ask your Salesforce admin to check your profile or permission sets.