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}}
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
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.
You need data from a related record
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.
Continuing to Related Tasks
Use How to Format Text, Dates, and Currency to format values.
Use Create Your First Template for the full PDF-Upload setup flow.
Use How to Show or Hide Content Automatically when content appears for selected records.
Practicing Merge Field Placement
Add
Opportunity.Nameto a PDF-Upload Document Template.Add
Opportunity.Account.Namebelow it.Generate the document from two different records and compare the output.
Last updated
Was this helpful?

