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.

#NameTitleEmailPhone
1Jack RogersVP, Facilitiesjrogers@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:

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 for Static Resources, click New, enter CompanyLogo as the Name, choose your logo file and click Save. You can size the logo in the template with H and W, 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:

  1. 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.
  2. Keep each tag exactly as written, in one piece. TableStart goes in the first cell and TableEnd in the last cell of the same row, so that row repeats for each contact.
  3. Replace CompanyLogo with your static resource's name. The tag works in a Word header. To set its size, add H and W in 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.
  4. 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

  1. In Docs Made Easy, open Document Setup and click Launch Wizard.
  2. On Add Details, enter Generate Letter as the Button Name, select Account and click Create. The Gather Data page opens.
  3. Click Next. The contacts table reads the account's contacts through the Account.r.Contacts relationship 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.
  4. 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.
  5. Enter Contact confirmation letter as 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.

SectionSettingValueWhy
Generated FileConvert to PDF?OnLetters go out as PDF, ready to print or email.
Generated FileFilenameContact confirmation - {!Account.Name}Each file is named after the account, so it's easy to find.
Other ParameterSCfileThe 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

  1. On the last wizard page, click Go to Page Layouts and open Account Layout.
  2. From Mobile & Lightning Actions, drag Generate Letter into Salesforce Mobile and Lightning Experience Actions.
  3. Click Save.

If users don't see the button, see Users can't see or use the button.

5. Generate and check

  1. Open an account with contacts and click Generate Letter. The Composer page opens, with Files ticked.

    Generate Letter button on the Account record

  2. Click Download (Template) and open the PDF.

  3. 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.
  4. 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 seeFix
A tag such as {{Account.Owner.Name}} shows as text, or the address is blankThe 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 repeatsPut 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 brokenThe 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 formatCheck 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 fileFonts 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