Stitch Additional PDFs To Your Template During Document Generation (Beta)

Introduction

You can stitch any queryable PDF(s) in Salesforce to your S-Docs PDF during document generation. This article explains how to set up and use the PDF Stitch feature.

Note: PDF Stitch is not available for use with automation. Templates with PDF Stitch enabled must be generated manually.
Note 2: PDF Stitch is only available for the PDF template format.

Set Up PDF Stitch

PDF Stitch is configured at the template level. Open the template you'd like to enable for PDF Stitch and navigate to the Advanced Options tab.

Scroll down to the PDF Stitch Configuration section.

PDF Stitch uses admin-provided SOQL queries to select PDF(s) to stitch to the template.

[1] The Add PDF Query button allows you to write the SOQL query to define which PDFs can be stitched to this template upon document generation.
[2] The section above this button represents the current template and its position within the final document. You can move your PDF stitch queries above or below this section to specify where the queried PDFs should be merged (before or after the contents of the current template).
[3] The top section provides general configuration options. We'll come back to this section later.

Add PDF Queries

Click Add PDF Query to open the query editor.

[1] Add an optional label to describe what the query returns. This is for organizational purposes only and not used during the PDF stitching process.
[2] Choose to query Attachments or Content Documents.
[3] Write the query as a SOQL WHERE clause, omitting the WHERE.
[4] Use the arrows to reorder where the queried PDF(s) will appear in the final document.

You can query multiple PDFs in a single section, or click Add PDF Query again to add additional PDF queries.

When users generate this template, the queried PDFs will be automatically added to the document in the specified order.

Allow End User Customization

You can allow end users to view the list of PDFs returned by your query and choose which ones to stitch to the template, in what order. Check Allow User Customization in the PDF Stitch Configuration section.

This will cause two new fields to appear in your PDF query section(s).

[1] Write a prompt to display to end users when they are presented with your queried list of PDFs.
[2] Choose to select each PDF returned by default, allowing the end user to uncheck PDFs that shouldn't be stitched. If left unchecked, all PDFs returned will be unchecked and the end user will have to check PDFs that should be stitched.

Note: Allowing PDF Stitch user customization also allows end users to choose the order in which PDFs should be stitched.

PDF Stitch End User Experience

If Allow User Customization is unchecked, the end user experience will be no different from the regular document generation experience. Queried PDFs will be merged to the final document during generation.

If user customization is enabled, users will be presented with a screen similar to the following.

[1] Your prompt will appear above the list of PDFs returned by your query.
[2] When users select PDFs to merge, they will be added to the Selected Documents section.

One added, queried PDFs and the base template can be reordered using the arrows as necessary. Users can then click Generate Doc to generate the final document.

Tags: ,

Was this helpful?