Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Auto-fill customer data in Document Templates

Add Merge Fields to PDF-Upload Document Templates and generate documents with Salesforce record data.

Use this tutorial to place Salesforce record data into a PDF-Upload Document Template.

Previewing Generated Output

After setup, each generated PDF can include:

  • Record data in fixed page locations

  • Different values for each Salesforce record

  • Reusable field placement across similar Document Templates

Use this approach for welcome packets and branded PDFs.

Understanding Merge Fields

Merge Fields pull Salesforce data into generated documents.

When S-Docs runs, it reads the source record, resolves each field path, and prints the value in the final output.

Common examples include:

  • Customer names

  • Billing addresses

  • Opportunity amounts

Understanding Merge Fields in S-Docs

S-Docs uses the Document Template's Related To Type as the starting object.

From there, it can pull fields from that record and related records, such as Opportunity.Account.Name.

In a PDF-Upload Document Template, select the field in the editor.

S-Docs creates the Merge Field and adds it to the PDF canvas.

Using Merge Field Syntax

Use {{!Object.FieldName}} in the Document Template body to print one field value.

Example: {{!Opportunity.Name}}

The field picker creates Merge Fields in PDF-Upload Document Templates.

Add a Merge Field to a PDF-Upload Document Template

Reviewing the configuration

  • One PDF-Upload Document Template tied to a Salesforce object

  • One Merge Field placed on the PDF

  • One test document to confirm the output

Estimated time: 10 minutes

Meeting prerequisites

Before you start, make sure you have:

  • Access to S-Docs Templates

  • Permission to create or edit Document Templates

  • A PDF file ready to upload

  • A test record with values you can verify

1

Create a PDF-Upload Document Template

  1. Navigate to S-Docs Templates.

  2. Click New.

  3. Set Related To Type to the required object, such as Opportunity.

  4. Set Template Format to PDF-UPLOAD.

  5. Click Save.

S-Docs uses these settings for drag-and-drop Merge Field placement.

2

Upload the PDF

  1. Open the Document Template.

  2. Click Template Editor.

  3. Click Upload PDF File.

  4. Select the PDF file.

The PDF appears on the canvas. The field tools appear on the left.

Download the sample PDF file for reference.

PDF ยท 61KB
Open
3

Create a Merge Field

  1. In S-Docs Fields, click Create Another Field.

  2. Select Merge Field.

  3. Click Select Merge Field.

  4. Choose a field, such as Opportunity.Name or Opportunity.Account.Name.

  5. Click Insert Field.

S-Docs creates the Merge Field from the selected Salesforce path.

4

Place the Merge Field on the PDF

  1. Find the generated field block in the left panel.

  2. Drag it onto the PDF canvas.

  3. Drop it where the value should appear.

S-Docs prints the field value in this location.

5

Test the Document Template

  1. Click Save.

  2. Open a test record for the same object.

  3. Click Generate Document.

  4. Confirm the PDF shows the expected value in the right spot.

If the value is incorrect or blank, check the source record and field selection.

Resolving Common Issues

The Merge Field shows blank in the PDF

Verify that the source record contains data. Confirm Related To Type matches the source object. Reinsert the Merge Field if you selected an incorrect path.

Expand related records in the field picker. Select a path such as Opportunity.Account.Name. Test with a record that includes the relationship.

The Merge Field placement looks incorrect

Move the Merge Field to a wider PDF area. Test with shorter sample values. Split long content across separate fields when needed.

Reviewing What You Learned

  • Merge Fields add Salesforce data to generated documents.

  • S-Docs resolves Merge Fields from Salesforce record data.

  • PDF-Upload Document Templates support drag-and-drop Merge Field placement.

Practicing Merge Field Placement

  1. Add Opportunity.Name to a PDF-Upload Document Template.

  2. Add Opportunity.Account.Name below it.

  3. Generate the document from two different records and compare the output.

Last updated

Was this helpful?