This feature allows you to combine the latest versions of different agreement documents along with the documents uploaded to the version aware agreement in Salesforce Lightning. You can merge the documents in different formats (DOCX, DOC, and PDF formats) into one DOCX or PDF document. 

You can set the following preconditions before generating the merged document:

  • Document type
  • Document permission
  • Watermark
  • Redlines
  • Order of the documents 

If all the documents you are merging are in DOC or DOCX format, you can select the output format (DOCX or PDF). If the documents you are merging contains at least one PDF, the PDF output format is selected by default and the DOCX output format is disabled.

If you have selected DOCX as the output format, you can select any protection type. The protection type is only applicable to DOCX documents.

If a DOCX document contains the draft watermark among the DOCX documents you need to merge and you select the Remove Draft Watermark option, the merged document will not retain the watermark from the original document. The Remove and Apply Draft Watermark option is only applicable to DOCX documents but not for PDF documents.

If you have redlines in the documents you need to merge, you can use the Preserve Redlines option to retain the redlines in the merged documents.

You can select any document type except for the Executed Document. By default, the Agreement Document option is selected.


  • You need to set up new agreement protection for merge documents. For more information, see the topic Configuring Agreement Document Protection.
  • You can merge the documents in DOC, DOCX, and PDF format in version-aware agreements.
  • Ensure that you have at least two different documents (documents generated using different templates) available in your agreement.
  • You can use the APTS_AppendVersionNumberToMergedDocs admin entry to suffix the name of the merged documents with a version number. For more information, see Admin Entries.


  • The Merge button is disabled if the agreement is in the following Status | Status Category:
    • In Signatures | Other Party Signature
    • In Signatures | Fully Signed
    • In Effect | Activated
  • The Document Permission field is not visible when you select PDF as the output format.


  • The merge document name must not exceed 250 characters.
  • The document size of the combined documents must not exceed 25 MB.

To merge documents

  1. On the Agreement Detail page, click Merge Documents. This displays the Merge Documents page.
  2. Enter a name for the merged document in the Document Name field.
  3. Select DOCX or PDF as the merged document output type.

  4. Select Retain Header and Footer to retain the header and footer of the original documents in the merged documents.
    Select Custom Header and Footer to see Header and Footer fields and add custom header and footer.

    When you neither select Retain Header and Footer nor Custom Header and Footer, the header and footer are removed in the merged document. When the APTSKeepSectionBreak admin entry is set to false and you select Retain Header and Footer, the documents will be merged together retaining the header and footer of the first document without keeping any section break.

    When the APTS_DefaultHeaderFooterOptionForMerge admin entry is configured, you can see either the Retain Header and Footer or Custom Header and Footer checkbox selected by default. For more information, see Admin Entries.

  5. Select a document type for the merged document.

  6. Select document permission for the merged document.

  7. Select a watermark option per your requirement either to apply or remove watermark in the merged document.

  8. Select the Preserve Redlines checkbox to retain the redlines in the merged document.

  9. Drag and rearrange the documents in the order you need to merge documents.
  10. Select the documents that you need to merge.
  11. Click the Merge button on the top of the page.
    You are navigated to the Agreement Detail page.
  12. Navigate to the Related tab.
  13. In the Document Versions section, click the Merge Documents hyperlink. This displays the Document Versions Detail page.
  14. Click the View hyperlink. 
    If you had selected DOCX as the output format, then a new tab and the merged document is downloaded to your system. If you had selected PDF as the output format, then the document opens in the document viewer online.
    The merged document is now available when you send for review, send for eSignature using EchoSign, send for manual signature, and activate an agreement.