Use the Document Automation Wizard to build your own document solution from scratch. You create a button, choose the related data to pull in, upload a Microsoft Word template with merge fields, optionally add an email template, and then place the button on a record page.
Use this guide when the pre-built Quick Start solutions don't match your business documents and you need your own layout, content or logic.
Before you begin
- Docs Made Easy is installed and you have a Docs Made Easy license and permission set. See Assign licenses and permission sets.
- You have a Microsoft Word document to use as your template.
Create the solution button
On the Document Setup page, click Launch Wizard. The Add Details screen opens.
Enter a Button Name, select the Salesforce object that the button goes on, and optionally add a Description. Click Create. The Gather Data page opens.

Add relationships on the Gather Data page
On the Gather Data page, you add relationships to the object you selected so that the template can use data from related records.
Click Add Child. The child relationship form opens.
Select the child Object from the list and enter an Alias for it.

You can also add filter conditions, set a limit and order the data. See Set up object relationships in Gather Data.
Click Save. The child appears in the list of relationships. You can add more than one child, and you can add lookup relationships the same way.
You can also add SOQL queries to your solution. See Create a document query with the pv0 parameter.
When you have added all the relationships you need, click Next. The Add Template page opens.
Create and upload the document template
Click Create New Document Template. The upload window opens.
Click Merge Field Helper to find the merge fields for your template.
In the Merge Field Helper, copy the merge fields you need and paste them into your Word template. To copy a field, click the clipboard icon next to it.

You can also select relationship fields from the objects that you added on the Gather Data page. The relationship merge fields include data from every object you selected. For example, if you selected only Account and Contact, only their fields appear.

Child objects need table syntax to fetch their records from Salesforce, for example
{{TableStart:ContactsAcc}}{{AssistantName}}{{TableEnd:ContactsAcc}}. See Table format to learn more.When the template contains all the merge fields you need, click Upload Files, add your template and click Save. Docs Made Easy adds the template to your solution, and it appears in the templates list.
Create an email template
You can add an email template to the same solution, so that the generated document can be sent by email.
Click Create New Document Email Template. The new email template form opens.
Enter a Template Name, select the Salesforce object for the template, and click Next. The email template editor opens.

In the editor, add the content of the email body.

To add a merge field to the body, click Insert Field, select the field and click Insert. To copy the merge field instead, click Copy to Clipboard.

To add fields from a related object, click Insert Related List and select the related object.
Select the fields you want, move them to the right-hand list and click Insert.

When the body contains all the merge fields you need, click Save & Close. Docs Made Easy saves the email template.
Add the email template to the solution
In the search bar, enter the name of the email template, then select it in the results. The email template now appears in the Templates section.

Select the template and click Next. The Assign Behaviors page opens.
Configure email and place the button
On the Assign Behaviors page, go to Email.
Enter the recipient details, click Save, and then click Next. Docs Made Easy saves your button.

Click Go to Page Layouts to place the button on the object's record page. The list of page layouts opens.
Click the page layout where you want the button. The page layout editor opens.
Go to Mobile & Lightning Actions, drag your new button to the Salesforce Mobile and Lightning Experience Actions section, and click Save.

Generate and send the document
Open a record and click your new button. The Composer page opens.
Click Download (Template) to download your document. To choose the file format, click the arrow next to the download button and select a format.

To send the document by email, click the arrow on the Send Email button and select Custom DME Mail. You can also use standard Salesforce email templates. You can also choose whether to attach the file to the Salesforce record.

If you have questions, contact us.
Related: Generate your first document with Quick Start · Set up object relationships in Gather Data · Edit and download merged documents