For the complete documentation index, see llms.txt. This page is also available as Markdown.

Merge Field Variables

How to insert dynamic merge field data in the enhanced editor experience.

This article outlines how to simplify and automate processes by inserting standard, custom, and runtime, or special, merge field variables into your document templates. Adding these fields ensures your documents dynamically pull accurate data directly from your Salesforce records. You can insert fields using either the Variables panel or direct keyboard inputs.

Variables Panel Overview

The Variables panel provides a visual, searchable list of all available fields for your template.

Access the panel

To open the panel, click the Variables icon located in the left-hand drawer menu to the left of the document editing interface.

The panel automatically displays fields based on the base record type assigned to your template. For example, if you are building a template for an Opportunity Record, the editor will automatically populate relevant opportunity fields from your organization.

Panel features and navigation

  • Search field: quickly find a specific field by searching for its label name in the Search bar at the top of the panel.

  • Data type filtering: click the icons to sort and view fields by specific data types, including text , numbers , booleans (checkbox) , and dates .

  • Record type variables: All Standard and Custom fields configured for the record type in the Salesforce org.

  • Lookup variables: Indicated by a right-facing arrow . Clicking these allows you to drill down up to five layers deep into applicable lookup records.

  • Runtime variables: Special system information fields that populate at runtime/generation.

  • *Advanced Data Configurations : Add in-depth data source options such as SOQL, Apex, User Inputs, and Component templates to the Variables menu.

Insert Fields from the Variables Panel

  1. Place your cursor at the exact position in the template where you want to insert the field.

  2. Click the desired field tile within the Variables list. The merge field will instantly appear at your cursor location.

Insert Fields from the @ Keyboard Command

For a faster workflow, you can insert merge fields directly from your keyboard without using your mouse.

  1. Within the document editor, type "@" (Shift + 2) where you want to place the field. This action activates an inline dropdown menu.

  2. The dropdown menu mirrors the fields and data available in the Variables panel.

  3. Use your keyboard arrow keys or the search feature to navigate through the list.

  4. Press the Enter key to insert the selected field directly at your cursor position.

Optional Advanced Data

For advanced technical use cases, you can utilize external or programmatic data sources within your template:

  • Components: Configured component templates for the parent record type.

  • User Inputs: Create user input variables that allow generating users the ability to provide real-time data inputs at run-time.

  • SOQL queries: Determine data sources across one-to-one or one-to-many relationships.

  • Apex: Call custom data into your template using a callable Apex architecture.

Advanced Data sources are optional and only appear in the variables panel when configured.

Last updated

Was this helpful?