A merge field is a field you can put in an email
template, mail merge template, custom link, or formula to incorporate values from a
record. For example, you can place a merge field in an email template so that the
greeting includes the recipient's name rather than a generic
“Hello!”.
Required Editions
Available in: both Salesforce Classic and Lightning
Experience
The available merge fields vary according to which Salesforce edition
you have.
You can use merge fields within custom formula
fields, s-controls, custom links, custom buttons, Visualforce pages, and when you create
email or mail merge templates.
Merge field names are determined when you create a custom field or object. Field Name
is automatically populated based on what you type into Field Label. You can
customize this field if you want, but keep in mind that the name must:
Only use underscores and alphanumeric characters
Begin with a letter and end with a letter
Not include spaces
Not contain two consecutive underscores
Important
Ensure that the custom field name and label are unique for that object.
If a standard and custom field have identical names or labels, the merge
field displays the custom field value.
If two custom fields have identical names or labels, the merge field can
display an unexpected value.
If you create a field label called Email and a standard
field labeled Email exists, the merge field is unable
to distinguish between the fields. Adding a character to the custom field name makes
it unique. For example, Email2.
To find the merge field name for an object or field in Salesforce, visit the object or
field’s detail page and refer to Field Name.
To incorporate merge fields, use the editor in the respective feature. Salesforce
provides valid merge fields in each editor for all related standard and custom
objects. If you’re using the Connect for Office Word add-in to create mail merge
templates, you see a complete list of valid merge fields to insert.
Merge Field Syntax A merge field’s syntax can vary depending on where you use the field. To make sure that you use the correct syntax, select merge fields from the dropdown list in the editor where you use the merge field.
Merge Fields for Validation Rules A merge field is a field you can put in an email template, mail merge template, custom link, or formula to incorporate values from a record.
Merge Fields for Formulas A merge field is a field you can put in an email template, mail merge template, custom link, or formula to incorporate values from a record.
Merge Field Tips Here are a few pointers for getting the most out of merge fields.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.