You can generate documents for many Salesforce records at once with Document Bulk Merge. First, you create a document query that selects the records. Then you create a Document Bulk Merge record that combines the query with a document solution, and run it as a batch.

Before you begin

Create the document query

  1. In Salesforce, open Docs Made Easy, click Document Queries, then click New. The new query form opens.

  2. Enter a Query Name, select the object (in this example, Account), choose the fields you need, such as Id and Account Name, and click Save.

    New document query for Account with the ID and Account Name fields

Create and run the bulk merge

  1. Open the App Launcher, search for Document Bulk Merge and open it. Click New to create a bulk merge record.

  2. Enter the Bulk Batch Name, Solution ID and Query ID, then click Save.

    New bulk merge record with batch name, Solution ID and Query ID

  3. On the saved Document Bulk Merge record, click Run Batch. The batch options appear.

  4. Choose an action. To run the process later instead, select Schedule Batch.

    Batch action options, including Schedule Batch to run the merge later

  5. Click Run Batch to start the batch. Docs Made Easy runs Bulk Document Generation in the background. When the process is complete, the message Bulk Document Generation is Complete! appears.

Bulk generation runs from the solution ID, so a syntax or configuration problem in the solution makes the batch fail at the start. If the solution is set up correctly, the batch won't fail on individual records, but empty fields merge as blanks. The batch size is configurable.

Find the generated documents

Docs Made Easy saves each generated document in both Files and Notes & Attachments on its record. The solution's bgm setting doesn't change that. In this example, each Account record included in the LAST_90_DAYS query gets its own file.

Generated document saved in the Files section of an Account record

Related: Create a document query with the pv0 parameter · Automate document generation with Flow