1. Step 1: Log In to Salesforce
-
Navigate to the Salesforce login page
-
Enter your Username and Password.
-
Click Log In (Submit).
Step 2: Open the Doc-Gen Application
- Click the App Launcher (nine-dot icon in the top-left corner).
- In the search bar, type Doc-Gen.
- Select Doc-Gen from the results.
/>
2. # Step 3: Select Fields from Merge Fields
Step 3.1: Select the Main Object
-
Click Merge Field Tab.
-
Select the main object that will generate the document.
Example used in this demo:
- Click Billing
This defines the main object for the document.
Step 3.2: Select a Field from the Main Source Object
- Click Billing Name (Name)
This field will be inserted into the document template.
Example merge key copied:
LawAccounting__Billing__c.Name
Step 3.3: Insert the Merge Tag into Word
-
Open Microsoft Word
-
Place the cursor where the field should appear
-
Click Insert
-
Click Text
-
Click Field
-
Select MergeField in Field name
-
Paste the merge key copied
Example:
LawAccounting__Billing__c.Name
- Click Save
Step 3.4: Select a Field from the same Parent Object (Billing)
-
Click Customer (Account) underneath Parent Objects
-
Click Party Name (Name) underneath Object Fields when you get redirected.
Example merge key copied:
LawAccounting__Billing__c.LawAccounting__Customer__r.Name
Step 3.5: Insert the Parent Merge Tag
-
Place the cursor in the Word template where the field should appear
-
Click Insert on Ribbon
-
Click Text (MacOS) or QuickParts (Windows)
-
Click Field
-
Select MergeField in Field name
-
Paste the merge key copied
Example:
LawAccounting__Billing__c.LawAccounting__Customer__r.Name
- Click Save
Step 3.6: Select a Child Object Field
- Click Billing Line
- This will navigate you to new page. Click Billing Name (Name) in Object Fields.
Example merge key copied:
LawAccounting__Billing__c.LawAccounting__Billing_Lines__r.Name
Step 3.7: Insert the Child Object Field
-
Place the cursor in the Word template
-
Click Insert
-
Click Text
-
Click Field
-
Select MergeField in Field name
-
Paste the merge key copied
Example:
LawAccounting__Billing__c.LawAccounting__Billing_Lines__r.Name
- Click Save
Step 3.8: Select Another Child Object Field
- Click Billing Line
- This will navigate you to new page. Click Total (LawAccounting__Total__c)
Example merge key copied:
LawAccounting__Billing__c.LawAccounting__Billing_Lines__r.LawAccounting__Total__c
Step 3.9: Insert the Child Object Total Field
-
Place the cursor in the Word template
-
Click Insert
-
Click Text
-
Click Field
-
Select MergeField in Field name
-
Paste the merge key copied
Example:
LawAccounting__Billing__c.LawAccounting__Billing_Lines__r.LawAccounting__Total__c
- Click Save
Step 4: Save the Word Template
-
Click File
-
Click Save As
-
Click Save
Save the document as a .DOCX or PDF template file.
Example used in this demo:
Billing Template2.docx
Step 5: Create a Template Record in Salesforce
-
Click Templates
-
Click New
-
Click Object Type
-
Select the object associated with the template
Example used in this demo:
Name: Billing Template2 | Object Type: [[LawAccounting__Billing__c]]
- Click Save
Step 6: Upload the Template
- Open the created template record and navigate into Related
- Click Upload
- Select the DOCX template file
- Click Done
Step 7: Create a DocGen Solution
-
Click Doc-Gen Configuration
-
Click New
-
Click Solution Name
-
Enter a name for the solution
Example used in this demo:
Billing Document Solution2
- Select the Main Object
Example used:
Billing ([[LawAccounting__Billing__c]] )
-
Click Select a template
-
Choose the template created earlier
Example:
Billing Template2
- Enter an Output File Name
Example:
Test2
- Click Save
Step 8: Generate the Document
- Navigate to a record for the selected object
Example used in this demo:
Billing Record
Example record ID:
B-00823
-
Open the record
-
Click Generate
The system processes the template and merges record data.
Step 9: Verify the Generated Document
Depending on the configuration, the document may:
• Attach to the record
• Download to the computer
• Open in preview
• Send via email
The fields shown in this guide are examples used only to demonstrate functionality. Your organization may select different objects and fields depending on its configuration.
/>