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 SC and directemailpreview shape this page.
  • Background mode (bgm). The Composer page is skipped and the file goes straight to the location the bgm value 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

LocationComposer page option (SC value)Background mode value
Files on the recordFiles (file)bgm=1
Notes & Attachments (the Attachment object)Notes & Attachments (notesAttachment)bgm=2
The record's Chatter feedChatter (chatterFile)bgm=3
Salesforce DocumentsDocuments (document)bgm=5
User's computer onlyDownload (Template) with no save location tickedbgm=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 decideThe Composer page: Download (Template), the save checkboxes, Send Email
Certain save boxes ticked when the Composer page opensSC, for example SC=file,chatterFile
One click: save to the record and downloadbgm=1 (Files) or bgm=2 (Attachments)
One click: save to the record, no downloadbgm=1 plus SkipDownload=1
The file posted to the record's Chatter feed every timebgm=3 (see Chatter by default)
A download only, nothing stored in Salesforcebgm=10, or Download on the Composer page with no save location ticked
PDF instead of WordGenerated File > Convert to PDF? (Default PDF)
A predictable file nameofn, for example {!Account.Name} - {{TODAY}} (Output file name)
To edit the Word file before it's finalMerge and Edit (Edit and download)
To open the email preview screen with the file attacheddirectemailpreview=1
To email the merged PDF without any preview, in background modedirectemailsender=1 with a Docs Made Easy email template, with recipients set under Assign Behaviors > Email (details)
To preview a Salesforce standard email template before sendingdirectstandardemail (Direct standard email)
A specific From addressEmailFromID or owdemailid with an organization-wide address ID (EmailFromId)
A recipient looked up from dataEmailToId={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:

  1. In Generated File, set Filename to {!Opportunity.Name} - {{TODAY}} and turn on Convert to PDF?. Click Save.
  2. In Background Mode, turn on Would you like to enable background mode?, select File (bgm=1) and click Save.
  3. In Other Parameter, click Add Other Parameter, enter SkipDownload and 1, and click Save.
  4. Optionally, add redirecttourl with /{!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 bgm value doesn't change that. If a Flow document is missing, check the Flow's debug logs.

  • SC vs "can't be ticked by default". The Chatter by default FAQ says the File and Chatter File checkboxes can't be preselected, but SC preselects them. If you need users to keep the choice, try SC. If you need it always saved, use bgm.

  • directstandardemail doesn'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, use directemailsender with 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.

  • SkipDownload needs bgm. The SkipDownload page warns that without a valid bgm value 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=10 downloads 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.