Letter Template & Merge Fields
This section is for identifying and understanding how to use Letter Generation and specifically, Letter Template. Letter Template is the object used to create templates for use as receipt letters, award letters or other communication connected to a record. It works in conjunction with Letter Template Merge Fields and Letter Output.
Content
Custom Fields
Some of these fields are Picklist and need to have values assigned and others are populated by users. Work with your teams to determine which fields you plan to use. Make sure these are included on the Fund Page Layout and Lightning Page.
Letter Template Object:
Letter Template Merge Fields Object:
Field Set
An example field set is included with several objects where tables can be used in a Letter Template. Add and rearrange fields as needed.
Payment: Letter Template Merge Fields
GAU Allocation: Letter Template Merge Fields
GAU Expenditure: Letter Template Merge Fields
Permission Set
Apex
TDTM_LetterTemplate
LetterTemplate_TDTM
Action
Flow
Letter_Template_Generate_Template
Letter_Template_Clone_with_Merge_Fields
Example_Determine_Letter_Template_for_Funding_Request_to_be_used_and_call_Genera
use this template flow to get the assigned Letter Template on the Funding Request object. This flow will then call the Letter Template - Generate Template flow which generates the Letter Output.
Create a button on the Funding Request Object to open this screenflow
Example_Determine_Letter_Template_to_be_used_and_call_Generate_Letter_Template_s
use this template flow to get the assigned Letter Template on the Opportunity object. This flow will then call the Letter Template - Generate Template flow which generates the Letter Output.
Create a button on the Opportunity Object to open this screenflow
Letter Template record
For the best results, if copying and pasting text from a Word document, paste it to Notepad first to remove formatting, then copy again from Notepad and paste into the Template Body field.
From the Letter Template object, select New button then
Letter Template Merge Field records
Merge fields to Template Body
A completed Letter Template will look something like the screenshot below
Tables within Letter Template record
Letter Generation allows for creating tables with record data merged into a letter template.
To Create a table in the Template Body, Select Table for the Multi-Table Output Type field, then choose the object to use as the table in either the Merge Object-Disbursement Multi-Table or Merge Object-Opportunity Multi-Table
Set the Font size for the Table
Additional setup is required as noted in the Multi-Table Field Required Setup Needed field. Once completed, move on to the next step
Use the Merge Value to Paste field as the merge field pasted to the Template Body where the table should appear
The screenshot below shows the required setup for merging a table into a letter template