Template Settings: Complete Reference
Page Settings
These settings control the physical dimensions and margins of your generated document.
Page Layout
Purpose: Set overall page orientation and dimensions
Options:
Portrait
Standard vertical orientation
8.5" × 11" (US Letter)
Landscape
Horizontal orientation
11" × 8.5" (US Letter)
Custom
User-defined dimensions
Any size
Behavior:
Selecting Portrait or Landscape locks width and height fields
Custom allows manual entry of dimensions
Changing layout resets margins to defaults
Page Width
Purpose: Set the width of the page
Syntax: Numeric value
Units: Inches, Centimeters, or Pixels (based on Unit setting)
Default: 8.5 inches (Portrait), 11 inches (Landscape)
Range:
Minimum: 1 inch (or equivalent)
Maximum: 200 inches (or equivalent)
Practical maximum: 17 inches (tabloid size)
Examples:
Notes:
Only editable when Page Layout is "Custom"
Consider printer capabilities
Very large pages may have performance impact
Page Height
Purpose: Set the height of the page
Syntax: Numeric value
Units: Inches, Centimeters, or Pixels (based on Unit setting)
Default: 11 inches (Portrait), 8.5 inches (Landscape)
Range:
Minimum: 1 inch (or equivalent)
Maximum: 200 inches (or equivalent)
Practical maximum: 14 inches (legal size)
Examples:
Notes:
Only editable when Page Layout is "Custom"
Affects pagination and content flow
Must accommodate margin settings
Top Margin
Purpose: Set space between top of page and content
Syntax: Numeric value
Units: Inches, Centimeters, or Pixels (based on Unit setting)
Default: 1 inch
Typical Range: 0.25 to 3 inches
Examples:
Notes:
Increased for pre-printed letterhead
Minimum often limited by printer (typically 0.25")
Affects header placement
Consider header height when setting
Bottom Margin
Purpose: Set space between bottom of page and content
Syntax: Numeric value
Units: Inches, Centimeters, or Pixels (based on Unit setting)
Default: 1 inch
Typical Range: 0.25 to 2 inches
Examples:
Notes:
Consider footer content when setting
Affects pagination
Minimum often limited by printer
Left Margin
Purpose: Set space between left edge and content
Syntax: Numeric value
Units: Inches, Centimeters, or Pixels (based on Unit setting)
Default: 1 inch
Typical Range: 0.25 to 2 inches
Examples:
Notes:
Increase for binding/hole punches
Affects text alignment and readability
Right Margin
Purpose: Set space between right edge and content
Syntax: Numeric value
Units: Inches, Centimeters, or Pixels (based on Unit setting)
Default: 1 inch
Typical Range: 0.25 to 1.5 inches
Examples:
Notes:
Often matches left margin for balance
Affects line length and readability
Unit
Purpose: Set measurement unit for all dimension fields
Options:
inches
Imperial measurement
US documents
centimeters
Metric measurement
International documents
pixels
Screen measurement
Digital-only documents
Conversion:
1 inch = 2.54 centimeters
1 inch = 96 pixels (at 96 DPI)
Notes:
Changing units converts all existing values
Pixels less common for print documents
Use inches for US, cm for international
Document Options - Attachment & File Name Options
Output File Format
Purpose: Define the naming pattern for generated documents
Syntax: Text string with optional merge fields
Merge Field Syntax: {!Object.Field} (single braces)
Default: SD-####.pdf (sequential numbering)
Maximum Length: 255 characters (recommended: under 80)
Examples:
Supported Merge Fields:
Standard fields from base object
Custom fields
Lookup fields (up to 5 levels)
User fields:
{!User.FirstName}
Restricted Characters:
/(forward slash)\(backslash):(colon)*(asterisk)?(question mark)"(double quote)<(less than)>(greater than)|(pipe)
Notes:
Always include .pdf extension
Use hyphens or underscores instead of spaces
Null merge fields result in blank spaces in filename
Very long names may be truncated by file systems
Document Options - Attachment & File Options
Create Salesforce Attachment and link to record
Purpose: Automatically create attachment in Notes & Attachments
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Attachment created with each document generation
Attachment appears in Notes & Attachments related list
Attachment named according to Output File Format setting
Attached to base record (Opportunity, Account, etc.)
Storage: Counts toward Salesforce Attachment storage limit
Use Cases:
Legacy systems requiring attachments
Classic interface users
Integration requirements
Backup to Files
Notes:
Can be used simultaneously with Files
Not recommended for new implementations
Consider storage limits
Create Salesforce File and link to record
Purpose: Automatically create file in Salesforce Files
Type: Checkbox
Default: Unchecked
Behavior:
When checked: File created with each document generation
File appears in Files related list
File named according to Output File Format setting
Linked to base record
Supports sharing and collaboration features
Storage: Counts toward Salesforce Files storage limit
Use Cases:
Modern Salesforce implementations
Lightning Experience
Collaboration requirements
Version control needs
Notes:
Recommended over Attachments for new implementations
Better sharing and collaboration features
Supports versioning
Create Salesforce Attachment only when emailed
Purpose: Create attachment only if document is emailed
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Attachment created only when email is sent
No attachment for download/view only
Saves storage for documents that aren't emailed
Use Cases:
Reduce storage usage
Only keep emailed documents
Audit trail of sent documents
Notes:
Independent of "Create Salesforce Attachment" checkbox
Does not apply to Files, only Attachments
Useful for high-volume generation where not all are emailed
Delete related Salesforce Attachment/File upon S-Doc deletion
Purpose: Control whether attachments/files are deleted with S-Doc record
Type: Checkbox
Default: Checked
Behavior:
When checked: Deleting S-Doc record also deletes related attachments/files
When unchecked: Attachments/files preserved even if S-Doc deleted
Applies to both Attachments and Files
Use Cases:
Keep Checked (Default):
Maintain data hygiene
Prevent orphaned files
Synchronize record cleanup
Uncheck When:
Audit requirements mandate file retention
Attachments/files serve independent purpose
S-Doc records are temporary but files are permanent
Notes:
Cannot be changed after generation
Consider compliance requirements
Affects storage cleanup strategy
Allow Edit
Purpose: Enable Live Edit feature for generated documents
Type: Checkbox
Default: Unchecked
Behavior:
When checked: "Edit" button appears on generated documents
Users can edit document in browser
Opens WYSIWYG editor
Changes saved to document
Use Cases:
Documents needing minor adjustments
Templates with flexible sections
Quick edits without regeneration
Not Recommended For:
Legal documents
Compliance-critical documents
Templates with complex formatting
Documents with strict version control
Notes:
Works best with simple layouts
Complex tables may not edit cleanly
Requires "S-Docs Edit Document" permission
Consider combining with versioning options
Allow naming of new Salesforce Attachment with each edit
Purpose: Let users rename attachments created during edits
Type: Checkbox
Default: Unchecked
Requires: "Allow Edit" must be checked
Behavior:
When checked: User prompted to name attachment after editing
Applies only if "Create new Salesforce Attachment with each edit" is also checked
Use Cases:
Users need descriptive version names
Tracking different edit iterations
Clear version identification
Notes:
Only works with Attachments, not Files
Only applies when creating new attachments with edits
User can keep default or enter custom name
Create new Salesforce Attachment with each edit
Purpose: Create new attachment version with each edit
Type: Checkbox
Default: Unchecked
Requires: "Allow Edit" must be checked
Behavior:
When checked: Each edit creates new attachment
When unchecked: Edits overwrite existing document
Preserves version history if checked
Use Cases:
Create New (Checked):
Need version history
Audit trail required
Track edit progression
Overwrite (Unchecked):
Working drafts
Storage constraints
Only final version matters
Notes:
Increases storage usage
Provides edit audit trail
Users can access all versions
Show Content Version JSON field
Purpose: Enable setting custom Content Version field values
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Reveals "Content Version Field Assignment JSON" text field
Accepts JSON mapping of field API names to values
Sets custom fields on ContentVersion object
Syntax:
Field Types Supported:
Text: String values
Number: Numeric values (no quotes)
Date: ISO format or merge fields
Checkbox: "true" or "false"
Picklist: API name of value
Use Cases:
Custom metadata on files
Classification fields
Integration requirements
Custom file attributes
Notes:
Only works with Salesforce Files, not Attachments
Fields must exist on ContentVersion object
Merge fields use double braces:
{{!Field}}Invalid JSON causes errors
Document Options - Mass Merge Options
Note: These options only appear if Mass Merge is enabled in your org.
Allow user to email single consolidated document
Purpose: Enable emailing combined document after mass merge
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Email option appears after mass merge completes
User can email combined PDF
Email settings from template apply
Use Cases:
Send batch invoices to accounting
Email combined reports to management
Distribute consolidated statements
Notes:
Large PDFs may exceed email size limits
Test email delivery before large batches
Email settings can be configured separately
Do not archive the single consolidated document
Purpose: Prevent saving combined document to Salesforce Documents
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Combined PDF not saved to Documents folder
When unchecked: Combined document archived
Individual documents still created per settings
Use Cases:
Don't Archive (Checked):
Large batches consuming storage
Temporary batch processing
Only individual documents needed
Archive (Unchecked - Default):
Keep combined file for records
Regulatory requirements
Combined file sent externally
Notes:
Saves storage space if checked
Individual documents unaffected
Consider compliance requirements
Do not include a page break between each document
Purpose: Remove automatic page breaks between documents
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Documents flow continuously
When unchecked: Each document starts new page
Use Cases:
Receipt printing (continuous forms)
Labels on continuous stock
Shipping labels
Tickets
Not Recommended For:
Standard documents needing separation
When users need to separate individual docs
Professional reports
Notes:
Overrides default page break behavior
Test print before production use
Consider printer capabilities
Include a page break after every N documents
Purpose: Insert page breaks at regular intervals
Type: Text field (numeric)
Default: Empty (uses default behavior)
Syntax: Integer value
Examples:
Behavior:
Blank or 1: Page break after each document (default)
N > 1: Page break after every N documents
0: Same as leaving blank
Use Cases:
Printer can handle N pages at once
Batch separation for processing
Organizing into groups
Notes:
Useful for large batch printing
Consider printer tray capacity
Test with actual printer
Immediately clear S-Doc jobs after combine all
Purpose: Delete S-Doc Job records after combining
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Jobs deleted after "Combine All" clicked
When unchecked: Jobs remain until manually deleted
What Are S-Doc Jobs:
Temporary records for each document in mass merge
Track generation status
Allow individual document access
Use Cases:
Clear Jobs (Checked):
Keep org clean
Reduce record clutter
Large batches create many jobs
Keep Jobs (Unchecked):
Troubleshoot failures
Access individual documents later
Audit requirements
Notes:
Can accumulate quickly
Consider storage
Cannot undo after deletion
Immediately clear S-Doc jobs after emailing
Purpose: Delete S-Doc Job records after emailing consolidated document
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Jobs deleted after sending consolidated email
When unchecked: Jobs remain
Use Cases:
Same as "clear after combine"
Additional trigger point for cleanup
Email marks completion of process
Notes:
Can be used with or without "clear after combine"
Consider if users might need to re-email
Clean up automation
Sort the documents in the consolidated document by this field
Purpose: Define sort order for documents in combined PDF
Type: Text field
Syntax: fieldName sortDirection[, fieldName sortDirection, ...]
Sort Directions:
asc= Ascending (A-Z, 0-9, oldest-newest)desc= Descending (Z-A, 9-0, newest-oldest)
Examples:
Supported Fields:
Standard fields
Custom fields
Lookup fields (dot notation)
Important:
Don't include base object name
✓ Correct:
Name asc✗ Incorrect:
Opportunity.Name asc
Notes:
Separate multiple fields with commas
First field is primary sort
Case-sensitive for field names
Use Insert Field tool to verify API names
Document Options - Other Options
Template contains international characters (Unicode fonts)
Purpose: Enable Unicode character support
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Enables Unicode character rendering
Required for non-English characters
Works with Unicode enforcement level setting
When to Check:
Any non-English characters
Accented characters (é, ñ, ü)
Non-Latin scripts (Chinese, Arabic, Russian)
Special symbols
Notes:
Check this first for international content
May need to increase enforcement level
Works with standard fonts
Minimal performance impact
Enable Rich Text in Runtime Prompts Tab
Purpose: Control rich text editor in Runtime Prompts
Type: Checkbox
Default: Checked
Behavior:
When checked: Text prompts show rich text editor (formatting toolbar)
When unchecked: Text prompts show plain text area
Affects loading time of Runtime Prompts tab
Use Cases:
Keep Checked (Default):
Users need formatted input
Email body templates
Styled content needed
Uncheck When:
Only plain text needed
Loading time is slow
Simpler interface preferred
Notes:
Only affects prompts created after changing
Doesn't affect template body editor
Performance consideration for slow connections
Show warning messages during document generation
Purpose: Control warning message display
Type: Checkbox
Default: Checked
Behavior:
When checked: All warning messages shown
When unchecked: Only critical errors shown
Affects user experience during generation
Warning Types:
Null merge fields
Missing lookup data
Field access issues
Non-critical formatting issues
Use Cases:
Show Warnings (Checked - Default):
Development and testing
Troubleshooting issues
User training
Quality control
Hide Warnings (Unchecked):
Production with known warnings
User experience optimization
Warnings are expected and acceptable
Notes:
Critical errors always shown
Consider user experience
May hide useful information
Redirect back to record
Purpose: Return user to record after generation
Type: Checkbox
Default: Unchecked
Behavior:
When checked: User redirected to base record after generation
When unchecked: User stays on S-Doc/generation page
Use Cases:
Redirect (Checked):
Streamline workflow
Users continue working on record
Generation is one step in process
Stay on Page (Unchecked):
Users need to email document
Users need to edit document
Multiple actions on generated doc
Notes:
Affects user workflow
Consider what users do next
Can be overridden by user navigation
Attach related case articles to outbound email
Purpose: Include case articles in emails
Type: Checkbox
Default: Unchecked
Requires: Base object must be Case
Behavior:
When checked: Articles from case automatically attached to email
Articles added along with generated document
Only applies when emailing document
Use Cases:
Customer support responses
Knowledge base distribution
Case resolution documentation
Notes:
Only works with Case object templates
Only affects emailed documents
Articles must be attached to case
Unicode enforcement level
Purpose: Set level of Unicode character handling
Type: Picklist
Options:
(blank/None)
Standard handling
Fast
English only
Data
Enforces Unicode in merge fields
Minimal impact
Western European languages
Strict
Full Unicode enforcement
Moderate impact
Asian/Arabic/Complex scripts
Behavior:
None: Default behavior
Data: Unicode in data fields only
Strict: Complete Unicode handling
Use Cases:
None: English documents
Data: French, German, Spanish, Portuguese
Strict: Chinese, Japanese, Korean, Arabic, Hebrew, Thai
Notes:
"Template contains international characters" must also be checked
Increase level only if needed
Higher levels = more processing
Test with actual characters
Maximum versions retained in archive
Purpose: Limit number of template versions saved
Type: Text field (numeric)
Default: Varies by implementation (often 10-20)
Syntax: Integer value
Examples:
Behavior:
New version created each time template is saved
Oldest versions deleted when limit exceeded
Version history accessible from template detail page
Use Cases:
Lower Number (10-15):
Reduce storage
Simple templates
Infrequent changes
Higher Number (25-50):
Complex templates
Frequent iterations
Detailed audit trail needed
Notes:
Cannot recover deleted versions
Consider development cycle
Balance storage vs. history
List of merge fields that cannot be null
Purpose: Prevent generation if specified fields are null
Type: Text area
Syntax: One merge field per line
Format: {{!Object.Field}}
Example:
Behavior:
Document generation blocked if any listed field is null
Error message shown to user
User must populate fields before generating
Use Cases:
Ensure required data present
Prevent incomplete documents
Data quality enforcement
Compliance requirements
Notes:
Use double braces:
{{!Field}}One field per line
No commas or semicolons
Validation occurs before generation starts
Email Settings - Email Subject Settings
Subject
Purpose: Set default email subject line
Type: Text field
Merge Field Syntax: {!Object.Field} (single braces)
Maximum Length: 255 characters
Examples:
Supported Content:
Static text
Merge fields from base object
Combination of text and merge fields
Notes:
Leave blank if users should always enter subject
Can be locked to prevent user changes
Null merge fields appear as blanks
Consider mobile email clients (shorter is better)
Lock Subject
Purpose: Prevent users from changing email subject
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Subject field appears grayed out (not editable)
When unchecked: Users can modify subject
Special Behavior:
If locked AND blank: Subject field hidden entirely
Use Cases:
Lock Subject (Checked):
Enforce branding standards
Compliance requirements
Prevent errors
Consistent communication
Allow Editing (Unchecked):
Users need flexibility
Subject varies significantly
Users add personal touches
Notes:
Populate subject before locking (or field disappears)
Test locked experience
Consider user needs
Require subject line
Purpose: Force users to enter email subject
Type: Checkbox
Default: Unchecked
Behavior:
When checked: Users cannot send email without subject
When unchecked: Blank subject allowed
Validation occurs when clicking Send
Use Cases:
Require (Checked):
Ensure professional communication
Email tracking and searching
Best practices enforcement
Optional (Unchecked):
Subject always pre-filled
Subject field locked
Rare edge cases need blank subjects
Notes:
Doesn't apply if subject is locked with value
Error shown if user tries to send without subject
Independent of Lock Subject setting
Email Settings - Email Recipient Settings
To
Purpose: Set default primary recipients
Type: Text area
Merge Field Syntax: {!Object.Field} (single braces)
Format:
Single email:
user@example.comMultiple emails: Comma-separated
Merge fields:
{!Contact.Email}Mixed:
user@example.com, {!Contact.Email}

