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

How to Auto-Fill Customer Data into Templates

Learn what merge fields do, how S-Docs resolves them, and how to place one on a PDF-Upload template.

Use this tutorial when you need to place live Salesforce data into a PDF template.

What it looks like

After setup, one generated PDF can show all of this:

  • Record data in fixed spots on the page

  • Different values for each Salesforce record

  • Reusable field placement across similar templates

This is the right starting point for forms, welcome packets, and branded PDFs.

What merge fields do

Merge fields pull data from Salesforce into the generated document.

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 name

  • Billing address

  • Opportunity amount

How merge fields work with S-Docs

S-Docs uses the 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 template, you usually select the field in the editor instead of typing the syntax yourself.

S-Docs builds the field for you and lets you place it on the PDF canvas.

Merge field syntax

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

Example: {{!Opportunity.Name}}

In PDF-Upload templates, the field picker usually generates the merge field for you.

Insert a merge field into a PDF template

What you'll configure

  • One PDF-Upload template tied to a Salesforce object

  • One merge field placed on the PDF

  • One test document to confirm the output

Estimated time: 10 minutes

Prerequisites

Before you start, make sure you have:

  • Access to S-Docs Templates

  • Permission to create or edit templates

  • A PDF file ready to upload

  • A test record with values you can verify

1

Step 1: Create or open a PDF-Upload template

  1. Go to S-Docs Templates.

  2. Open an existing template or click New.

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

  4. Set Template Format to PDF-UPLOAD.

  5. Save the template.

This gives S-Docs the record type and PDF format needed for drag-and-drop field placement.

2

Step 2: Open the template editor and upload the PDF

  1. Open the template.

  2. Click Template Editor.

  3. Click Upload PDF File.

  4. Select your PDF.

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

Click on the link below to download a sample pdf file for reference.

PDF · 61KB
Open
3

Step 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 now builds the field for you from the selected Salesforce path.

4

Step 4: Place the 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.

This tells S-Docs where to print the field value in the final PDF.

5

Step 5: Save and test

  1. Click Save.

  2. Open a test record for the same object.

  3. Generate the document.

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

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

Common issues and solutions

"The field shows blank in the PDF"

Problem: The field is placed, but the generated PDF has no value.

Solution:

  • Check that the source record has data in that field

  • Confirm the template uses the correct Related To Type

  • Reinsert the field if you selected the wrong path

"The value placement looks off on the page"

Problem: The value prints, but the placement is hard to read.

Solution:

  • Move the field to a wider area on the PDF

  • Test with shorter sample values first

  • Split long content across separate fields when needed

What you've learned

✅ What merge fields are used for ✅ How S-Docs resolves merge fields from Salesforce data ✅ The basic merge field syntax ✅ How to place a merge field on a PDF-Upload template

Next steps

Practice exercise

  1. Add Opportunity.Name to a PDF 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?