A generated document can be downloaded, saved to the Salesforce record, emailed, sent for eSignature, or several of these at once. Which one happens is set by the solution's behaviors and by what the user clicks, so this page helps you choose the right setting and find files that seem to be missing.
How delivery is decided
Every solution delivers its output in one of two modes:
- Interactive (default). The user clicks the button and the Composer page opens. They click Download (Template), tick save locations, or click Send Email. Parameters such as
SCanddirectemailpreviewshape this page. - Background mode (
bgm). The Composer page is skipped and the file goes straight to the location thebgmvalue names. Parameters that need the Composer page (SC,directemailpreview) don't apply.
Flow and Document Bulk Merge (both Pro) have no user at the screen; they generate the document in the background from a Solution ID. Their documents are saved to both Files and Notes & Attachments on the record, whatever the solution's bgm value.
The save locations
| Location | Composer page option (SC value) | Background mode value |
|---|---|---|
| Files on the record | Files (file) | bgm=1 |
| Notes & Attachments (the Attachment object) | Notes & Attachments (notesAttachment) | bgm=2 |
| The record's Chatter feed | Chatter (chatterFile) | bgm=3 |
| Salesforce Documents | Documents (document) | bgm=5 |
| User's computer only | Download (Template) with no save location ticked | bgm=10 |
Values 1, 2, 3 and 5 also download the file. Add SkipDownload=1 to save without downloading.
On the Composer page, Download also saves a copy to every location that's ticked, such as Files.
With Pro, generated documents can also be stored and shared in third-party apps: SharePoint, DocuSign, Conga Sign and Adobe Sign.
When to use which
| If you want… | Use… |
|---|---|
| Users to review the document, then decide | The Composer page: Download (Template), the save checkboxes, Send Email |
| Certain save boxes ticked when the Composer page opens | SC, for example SC=file,chatterFile |
| One click: save to the record and download | bgm=1 (Files) or bgm=2 (Attachments) |
| One click: save to the record, no download | bgm=1 plus SkipDownload=1 |
| The file posted to the record's Chatter feed every time | bgm=3 (see Chatter by default) |
| A download only, nothing stored in Salesforce | bgm=10, or Download on the Composer page with no save location ticked |
| PDF instead of Word | Generated File > Convert to PDF? (Default PDF) |
| A predictable file name | ofn, for example {!Account.Name} - {{TODAY}} (Output file name) |
| To edit the Word file before it's final | Merge and Edit (Edit and download) |
| To open the email preview screen with the file attached | directemailpreview=1 |
| To email the merged PDF without any preview, in background mode | directemailsender=1 with a Docs Made Easy email template, with recipients set under Assign Behaviors > Email (details) |
| To preview a Salesforce standard email template before sending | directstandardemail (Direct standard email) |
| A specific From address | EmailFromID or owdemailid with an organization-wide address ID (EmailFromId) |
| A recipient looked up from data | EmailToId={QVar0} (QVars) |
| The document sent for signature (Pro) | bgm=11, signtemplateId and SkipDownload=1 (eSignature) |
| A document when a record changes, no click (Pro) | Flow with ASync Document Generate Solution (Flow, email from Flow); the file is saved to Files and Notes & Attachments |
| One document for each of many records (Pro) | Document Bulk Merge; each file is saved to the record's Files and Notes & Attachments |
Example: save a PDF to Files with no download
On the solution's Assign Behaviors page:
- In Generated File, set Filename to
{!Opportunity.Name} - {{TODAY}}and turn on Convert to PDF?. Click Save. - In Background Mode, turn on Would you like to enable background mode?, select File (bgm=1) and click Save.
- In Other Parameter, click Add Other Parameter, enter
SkipDownloadand1, and click Save. - Optionally, add
redirecttourlwith/{!Opportunity.Id}so the user returns to the record.
A user clicks the button on an opportunity. Nothing downloads, and a PDF named after the opportunity appears in the record's Files.
Limits and gotchas
Flow and bulk save to both lists. Documents from Flow and Document Bulk Merge appear in both Files and Notes & Attachments. The solution's
bgmvalue doesn't change that. If a Flow document is missing, check the Flow's debug logs.SCvs "can't be ticked by default". The Chatter by default FAQ says the File and Chatter File checkboxes can't be preselected, butSCpreselects them. If you need users to keep the choice, trySC. If you need it always saved, usebgm.directstandardemaildoesn't send in the background. It shows a preview of a Salesforce standard email template before sending. To send the merged PDF in background mode, usedirectemailsenderwith a Docs Made Easy email template.Email goes through Salesforce. Salesforce email limits apply, and the sent email is recorded in the record's activity history. If the document is too large, the email is sent without the attachment.
SkipDownloadneedsbgm. The SkipDownload page warns that without a validbgmvalue the result is unpredictable, so always set both.Documents is a Classic object. Salesforce Documents (
bgm=5) isn't shown in Lightning Experience. Prefer Files.bgm=10downloads to a browser. It isn't a way to store files from automation.
If a document seems not to arrive at all, see Document did not generate: checklist.