For admins and template authors: build a Generate Letter button on Account that creates a PDF letter on your letterhead, addressed to the account, listing the contacts you hold for it and asking the customer to confirm them. It takes about 15 minutes with the sample template on this page.
What you'll build
For the sample account Burlington Textiles Corp of America, generated on November 20, 2026, the letter reads:
[Your logo]
November 20, 2026
Burlington Textiles Corp of America 525 S. Lexington Ave Burlington, NC 27215
Please confirm your contacts on file
Dear Burlington Textiles Corp of America team,
We hold the following 1 contact(s) for your account. Please check that the details are correct.
| # | Name | Title | Phone | |
|---|---|---|---|---|
| 1 | Jack Rogers | VP, Facilities | jrogers@burlington.com | (336) 222-7000 |
If anything has changed, call us or reply to this letter. Please quote your account phone number, (336) 222-7000, so we can find your record.
Sincerely, Account owner's name
The file is named Contact confirmation - Burlington Textiles Corp of America.pdf.
It uses these features:
- Static resource images and the Image tag for the logo
- Today for the letter date
- TableStart and TableEnd, RowNumber and RowCount for the contacts table
- Convert to PDF? and Filename (ofn) for a named PDF
- SC to tick Files on the Composer page, so users review the letter before they save it
Before you begin
- Docs Made Easy is installed and you have a license and the permission set. See Assign licenses and permission sets.
- You can open Document Setup, edit the Account page layout and create static resources.
- You have an account with a billing address, a phone number and at least one contact, to test with.
- Your logo is uploaded as a static resource named
CompanyLogo. In Salesforce Setup, search forStatic Resources, click New, enterCompanyLogoas the Name, choose your logo file and click Save. You can size the logo in the template withHandW, or resize the image file before you upload it. See Create a static resource.
You don't need custom fields. The letter uses standard Account and Contact fields.
1. Build the template
Download the sample template (.docx), ready to upload, or create a Word document with the content below. Replace anything in [square brackets] with your own details.
[Header]
{{Image:StaticResource.CompanyLogo}}
[Body]
{{Today \@ MMMM dd, yyyy}}
{{Account.Name}}
{{Account.BillingStreet}}
{{Account.BillingCity}}, {{Account.BillingState}} {{Account.BillingPostalCode}}
Please confirm your contacts on file
Dear {{Account.Name}} team,
We hold the following {{RowCount:Account.r.Contacts}} contact(s) for your account. Please check that the details are correct.
[Word table: 5 columns, 2 rows. Row 1 is the header. Row 2 repeats once per contact.]
| # | Name | Title | Email | Phone |
| {{TableStart:Account.r.Contacts}}{{RowNumber}} | {{Name}} | {{Title}} | {{Email}} | {{Phone}}{{TableEnd:Account.r.Contacts}} |
If anything has changed, call us or reply to this letter. Please quote your account phone number, {{Account.Phone}}, so we can find your record.
Sincerely,
{{Account.Owner.Name}}
To turn this into a Word template:
- Paste the text into a new Word document. Put the logo tag in the page header, and replace the
[Word table …]block with a real Word table that has the same rows and cells. - Keep each tag exactly as written, in one piece.
TableStartgoes in the first cell andTableEndin the last cell of the same row, so that row repeats for each contact. - Replace
CompanyLogowith your static resource's name. The tag works in a Word header. To set its size, addHandWin pixels, for example{{Image:StaticResource.CompanyLogo:H=60:W=180}}. If the logo is the same on every letter, you can paste the image straight into the header instead. - When you upload the template in step 2, open the Merge Field Helper and copy any field whose name differs in your org. See Where to get merge fields.
2. Create the solution
- In Docs Made Easy, open Document Setup and click Launch Wizard.
- On Add Details, enter
Generate Letteras the Button Name, select Account and click Create. The Gather Data page opens. - Click Next. The contacts table reads the account's contacts through the
Account.r.Contactsrelationship in the template, so you don't add anything here. To show only some contacts, for example only those with an email address, add Contacts as a child with a filter instead; see Set up object relationships in Gather Data. - Click Add templates and choose Upload a document (before v1.25: Create New Document Template). To check the table tags, click Merge Field Helper > Insert Related List and select Contacts.
- Enter
Contact confirmation letteras the Template Name, upload your Word file and click Save. Click Next. The Assign Behaviors page opens.
Each wizard screen is described in Create a template with the Document Automation Wizard.
3. Set the behaviors
On the Assign Behaviors page, set the following. Click Save in each section, then click Next. Leave background mode off, so the Composer page opens and users can review the letter first.
| Section | Setting | Value | Why |
|---|---|---|---|
| Generated File | Convert to PDF? | On | Letters go out as PDF, ready to print or email. |
| Generated File | Filename | Contact confirmation - {!Account.Name} | Each file is named after the account, so it's easy to find. |
| Other Parameter | SC | file | The Files checkbox is already ticked on the Composer page, so a copy is kept on the account. |
On the Composer page, Download (Template) downloads the letter and also saves it to the ticked locations, here Files. There's no separate save step. The file name keeps its spaces, and .pdf is added automatically.
4. Add the button
- On the last wizard page, click Go to Page Layouts and open Account Layout.
- From Mobile & Lightning Actions, drag Generate Letter into Salesforce Mobile and Lightning Experience Actions.
- Click Save.
If users don't see the button, see Users can't see or use the button.
5. Generate and check
Open an account with contacts and click Generate Letter. The Composer page opens, with Files ticked.

Click Download (Template) and open the PDF.
Check the letter against the account:
- Your logo is in the header and the date is today.
- The name and billing address match the account.
- There is one numbered row per contact, and the count in the sentence matches the number of rows.
- The account owner's name is under Sincerely.
On the account's Related tab, open Files.
Contact confirmation - Burlington Textiles Corp of America.pdf(with your account name) is listed.
Troubleshooting
| What you see | Fix |
|---|---|
A tag such as {{Account.Owner.Name}} shows as text, or the address is blank | The API name is wrong, the field is empty or you can't see it. Copy the tag from the Merge Field Helper. See Merge fields are blank or show as text and DME-SF-002. |
| The contacts table is empty, shows one row or repeats | Put TableStart and TableEnd in the same row with Account.r.Contacts in both, and check that the account has contacts. See Tables are empty, show one row or repeat. |
| The logo is missing or broken | The static resource name in the tag doesn't match, or the tag is missing Image:. See Images are missing or broken. |
| The date is in the wrong format | Check the letter case in the pattern: MM is the month, mm is minutes. See Wrong date, number or currency format. |
| The PDF layout differs from the Word file | Fonts or floating objects, such as a logo in the header, change in conversion. See The PDF looks different from my Word template. |
Take it further
- Save without the Composer page: turn on background mode with File (bgm=1). See Where generated documents are saved.
- Email the letter: add an email template to the solution and set recipients under Assign Behaviors > Email. See Create a template with the Document Automation Wizard.
- Ask the customer to sign the confirmation (Pro): add signature tags to the template before you upload it, or in the Template Editor. See Generate and send documents for eSignature.
- Send the letter every year automatically (Pro): Automate document generation with Flow.
- Send it to many accounts at once (Pro): Generate documents in bulk.
- Show different paragraphs for different customers: IF conditions.