Create documents in Salesforce
Generate documents from Salesforce records using preconfigured templates. This guide covers selecting templates, reviewing data, and saving generated documents.
To create documents, your organization must have document templates configured first. For template creation and setup, ask your Salesforce administrator to refer to the manage document templates in Salesforce and build document templates in Salesforce guides.
Prerequisites
Before creating documents, verify:
- Your organization has completed the set up document generation in Salesforce guide
- You have the Nutrient Create Documents permission assigned
- The widget is available on your record pages. It appears with a different title depending on user permissions:
- Create and Send Document with Nutrient (users with sign permission)
- Create Document with Nutrient (users without sign permission)
- At least one template exists for the record type you’re working with
If you need the Salesforce installation link, contact our Sales team.
If the widget isn’t visible or you can’t select templates, contact your Salesforce administrator.
In new organizations, your administrator may need to add Nutrient components to the Lightning record page before this widget appears.
Select a template
Navigate to any Salesforce record with configured templates (for example, Opportunity, Account, or Contact).
Locate the widget on the record page. It appears with a different title depending on user permissions:
- Create and Send Document with Nutrient (users with sign permission)
- Create Document with Nutrient (users without sign permission)
It often appears in the Related section, but your Salesforce administrator can place it elsewhere on the record page.
Click the Select a template dropdown to view available templates.
Select the template you want to use.
Click Create.
The system will prepare data from your Salesforce record using the template’s configuration.
Select dynamic data
Some templates require you to select specific Salesforce records at runtime. This step only appears if the template includes dynamic data inputs configured by the template builder.
- Review the data selection dialog.
- For each dynamic input, search and select the required records.
- Click Continue to proceed.
Only data inputs that can be resolved at runtime appear in this dialog. If you don’t see this step, the template doesn’t use dynamic data.
Review and edit data
If your administrator enabled Allow data review in the Nutrient Admin settings, you can preview and modify data before document creation.
Review the data that will populate your document:
- Check merge field values for accuracy
- Verify collection data (for example, opportunity line items)
- Review conditional field results
Optional: Edit any values that need adjustment for this specific document.
Click Create Document to proceed.
The field names in the dialog below depend on how the template was configured. Some templates show user-friendly labels, while others may show technical names such as root record references or dataset expressions.
Data resolution warnings
If Nutrient can’t resolve some template data, a warning appears. You can still create the document, but missing data won’t populate.
Common causes for warnings:
- Empty fields in Salesforce records
- Broken relationships or deleted related records
- Invalid navigation paths in template configuration
To fix persistent warnings, contact the template administrator to review the template configuration.
Preview or edit the generated document
After generation completes, the document opens in preview mode. Review the document to verify:
- All data populated correctly
- Formatting appears as expected
- Collections and conditional sections rendered properly
For editable templates (not locked templates), you can modify the generated document before saving or downloading.
- Click the Edit tab.
- Use the document editor to:
- Modify text content
- Adjust formatting
- Add additional information
- Polish layout and styling
- Return to the Preview tab to review your changes.
The editor provides the same capabilities used to build templates, giving you full control over the final document.
Locked templates cannot be edited after generation. If you need to make changes, generate a new document or contact your administrator about converting the template to an editable format.
Save to Salesforce
To attach the document to the current Salesforce record:
Click Save in the upper-right corner.
Choose whether to save as a new document version or as a new document.
Select the output format:
- PDF — Required for signing and for viewing/sharing
- DOCX — For archival or future editing
Enter a filename.
Click Save.
The document saves under Notes & Attachments on the record. Other users with access to the record can view and download the document.
Download the document
To download the document to your computer:
- Click Download in the upper-right corner.
- Select the output format:
- PDF — For viewing and sharing
- DOCX — For further editing in Microsoft Word
- Enter a filename.
- Click Download.
The file saves to your browser’s default download location.
Next step: Send the document for signing
If signing is enabled in your organization, continue with send documents for signing in Salesforce.
Troubleshoot common issues
If document creation fails or behaves unexpectedly, check these common issues and solutions.
No active templates found
Message
“No active templates found for Opportunity records. Please create templates first.”
Cause
No active template is available for the current Salesforce object.
Solution
Ask your administrator to create and publish a template for that object in Template Manager (within the Nutrient Documents app). For setup instructions, refer to the manage document templates in Salesforce and build document templates in Salesforce guides.
Template configuration errors
Error message
“Effective ranges intersect undefined” or similar placeholder errors
Cause
The template has overlapping or unclosed placeholders (merge fields, collections, or conditions).
Solution
The template needs fixing. Contact your Salesforce administrator or template manager. In the meantime, try a different template if available.
Missing data warnings
Warning
“Unable to resolve some template data”
Cause
One or more of the following:
- Required Salesforce fields are empty
- Related records have been deleted
- Template navigation uses invalid relationships or filters
Solution
- Fill in missing fields on the Salesforce record
- Contact your administrator to check the template’s field mappings, navigation steps, and filters
- Check that all related records still exist
Unexpected data or missing table rows
Issue
Generated data doesn’t match the template, or a table row disappears unexpectedly.
Cause
Navigation steps or filters may be pointing to the wrong records, or a condition inside a table row may be removing the row when it evaluates to false.
Solution
- Verify the template’s navigation steps and filters
- Ask your administrator to check whether the field mapping points to the intended related record
- If you use conditions in tables, place each condition in its own table row instead of mixing it with other text
- If the condition evaluates to false, the entire row is removed from the generated document
Empty documents
Issue
Document generates but shows blank sections
Cause
Collections returned no data, or conditions evaluated to false.
Solution
This may be expected behavior.
For example:
- An Opportunity with no line items will show an empty line items section
- Conditional sections only appear when their conditions are true
If sections should contain data, verify the Salesforce record has the expected related records or field values.