The mail merge is a process of creating form letters and Microsoft word documents which are tailored based on the recipient’s need. we can keep variables in mail merge document and those are called as merge fields. These merge fields get values form each of the specific records. For example: if we use contact’s name field, then it gets the value from the name field of the record. The content of every document is predefined in mail merge template.
Types of mail merge:
There are two types of mail merge:
Mass Mail Merge.
Single Mail Merge.
Generating Mail Merge Documents:
Mass Mail Merge:
Click the object tab and there is section called tools. There, we can see the Mass Mail Merge link. Using this link, we can send email to one or more records. In this scenario, if the same email id is repeated in two records mean they receive one mail along with two attachments.
Single Mail Merge:
To generate a Microsoft Word document for an individual record, open the record’s detail page and click Mail Merge on the Activity History related list. Here, we can send mail merge template to a single record.
What permission we need to upload Mail Merge Template?
Administrators and users with the “Manage Public Templates” permission must upload completed Microsoft Word mail merge templates to Salesforce to make them available for use.
Considerations for creating Mail Merge template document:
1.The mail merge document you use as a template should be a Microsoft Word document (.doc or .docx) and it should not refer to an outside data source.
2.Although Salesforce works with templates that do not have any merge fields, make sure the template contains at least one valid mail merge field.
3.The mail merge fields can contain only letters, numbers, and the underscore (_) character.
4.The mail merge field name cannot be blank.
5.The mail merge field name should not exceed 40 characters.
How to create mail merger variables?
When creating mail merge fields in the template, prefix the field label with object name.
Account_MarketCap for an account field named MarketCap. Convert all spaces to underscores.
Considerations before requesting Mail Merge:
- Mail Merge Documents give you access only to the fields that are accessible to you via your page layout and field-level security settings.
- To support for standard Mail Merge, the Salesforce must have TLS 1.1.
- Standard and Extended Mail Merge don’t support formatting from rich text area fields.
- Mail Merge (Standard or Extended) is not supported in Lightning Experience.
Uploading Mail Merge Templates to Salesforce:
- In Salesforce, from Setup, enter Mail Merge Templates in the Quick Find box, then select Mail Merge Templates.
- Click New Template.
- Enter a name and description for the template. This will help users correctly choose a template when generating mail merge documents.
If your organization uses Extended Mail Merge, choose the appropriate document type: Document, Label, or Envelope.
- Click Browse to select your Word mail merge template.
- Click Save to finish.