Formstack Documents For Salesforce: The Complete Guide To Automated Document Generation
How Formstack Documents turns Salesforce records into finished contracts, quotes, invoices and forms: which template type to choose, how merge fields, logic and loops work, how to trigger generation with Flow, and how to route documents for e-signature and back to the record.
Key Takeaways
- Formstack Documents for Salesforce is a managed AppExchange package that merges Salesforce record data into PDF, Word, Excel and PowerPoint documents, then delivers them by email, to Salesforce Files, to cloud storage or for e-signature.
- It is the product formerly known as WebMerge. Formstack acquired WebMerge in 2019, and the parent company rebranded as Intellistack in 2025; Formstack Documents is still sold and supported.
- Pick the template type by the job: the native builder for fast, rich-text documents, fillable PDF for fixed government or carrier forms, Word for long documents with dynamic tables.
- Templates use a Smarty-style syntax:
{$Field}merge fields,|modifiersfor formatting,{if}blocks for conditional content and{tablerow}loops for line items and child records. - Automate generation with a record-triggered Salesforce Flow and the package's Generate Document action. Salesforce ended support for Process Builder on December 31, 2025, so build new automation in Flow.
- When a document goes for signature, delay the other deliveries so only the signed copy is stored, and remember that every delivery location counts as a merge.
Most Salesforce teams still produce at least one document the slow way: export a report, paste values into a Word file, fix the formatting, save it as a PDF, email it, and attach a copy to the record if anyone remembers. Formstack Documents for Salesforce replaces that loop with a template that fills itself from the record, a rule that decides when it runs, and a delivery that puts the finished file where it belongs.
This guide is written for the Salesforce admins, RevOps leads and operations managers at growing and mid-market companies who own that process. It covers what the product does, how its template language works, how to wire it into Salesforce automation, and the design decisions that separate a document estate that scales from one that turns into fifty near-identical templates nobody dares to edit.
What Is Formstack Documents For Salesforce?
Formstack Documents for Salesforce is a managed package, installed from AppExchange, that generates documents from Salesforce data. You build a template, map its merge fields to fields on a Salesforce object and its related records, and choose when it runs and where the result goes. Output can be PDF, Word, Excel or PowerPoint, delivered to the record, by email or for signature.
The product has a longer history than its name suggests. It began as WebMerge, founded in 2011; Formstack announced the acquisition in April 2019 and folded it into Formstack Documents. The old name still shows in the package: the Apex class is webm.WebmergeGenerator and the Flow action asks for a "Webmerge Mapping ID". In 2025 the company rebranded as Intellistack, and it states that the Formstack products, Documents included, continue to be sold and supported. The AppExchange listing now shows Intellistack as the provider.
Four building blocks do all the work, and every design decision in this guide belongs to one of them:
Templates
The document design, built in Formstack's builder or uploaded as a fillable PDF, Word, Excel or PowerPoint file, with merge fields where the data goes.
Mappings
The Salesforce side: which object feeds the template, and which field, parent field, child relationship or SOQL query fills each merge field.
Triggers
What starts a merge: a button on the record, a list view, a mapping rule, a record-triggered Flow, or Apex for batch and custom cases.
Deliveries
Where the file goes: Salesforce Files or Attachments, email, cloud storage, a webhook, or an e-signature service such as Formstack Sign or DocuSign.
When Formstack Documents Fits Your Salesforce Org (And When It Doesn't)
Formstack Documents fits teams that need branded, data-driven documents from Salesforce without writing code, and that value flexible delivery more than staying entirely inside Salesforce. Its pricing follows document volume rather than users, which suits orgs where many people trigger documents but few build them.
It fits if you generate quotes, contracts, order forms, invoices, onboarding packs or applications from Salesforce records; you want one template per document type with conditional sections instead of a copy per region or product; you need the file signed and filed back on the record; or you already use Formstack Forms or Sign and want one vendor across capture, generation and signature.
Look harder if your security policy requires that record data never leaves Salesforce during generation (Formstack merges on its own platform, so review the vendor's Trust Center and your data-processing terms first); you only need one or two simple documents a month; or your templates depend on deep nesting across many levels of related records, which needs SOQL-based mappings and careful design.
If you are still comparing tools, our Formstack document automation page covers the whole document lifecycle, from request and approval through signature and filing, and where Formstack fits in it.
Which Template Type Should You Use: Builder, Word Or Fillable PDF?
Use the native builder for most Salesforce documents, fillable PDF when the layout is fixed by someone else, and Word when you need long documents with dynamic tables or a table of contents. Excel suits calculations and charts; PowerPoint suits proposals and decks. The choice also decides the output formats you can produce.
Formstack's builder itself offers three editing modes: a drag-and-drop editor where merge fields appear as pills, an Advanced (HTML) editor for full control over the markup, and a Classic editor where you type merge fields as text. A "T" icon on the toolbar switches between pill mode and plain-text mode, which is the quickest way to check exactly what syntax a pill contains.

| Template type | Best for | Output formats | Watch out for |
|---|---|---|---|
| Native builder | Quotes, letters, order forms, anything with Salesforce rich text; fastest for end users | PDF, DOCX, XLSX, HTML, XML, email, JPG, or text with your own extension | No table of contents; the drag-and-drop editor works poorly when framed inside Salesforce, so edit at formstack.com |
| Fillable PDF | Fixed government, carrier or lender forms; checkbox- and radio-heavy layouts | PDF (flattened or not), JPG | Variable-length tables and loops are very difficult; checkbox export values are capped at 49 characters |
| Word (DOCX) | Long contracts and policies, dynamic tables, table of contents, precise borders | DOCX, PDF, JPG | Merge syntax is typed by hand; some Salesforce rich text does not translate; editors need a Word subscription |
| Excel (XLSX) | Pricing schedules, calculations, charts | XLSX, PDF | An IF statement can blank a row's content but cannot hide the row itself |
| PowerPoint (PPTX) | Proposals and account reviews | PPTX, PPSX, PDF, JPG | Use {slideif} to show or hide whole slides |
Template capabilities and output formats from the Formstack Help Center, checked October 2026. Formstack also offers an AI Assist option that drafts a starter template from a prompt; an org admin has to enable it, and it does not yet add images, advanced HTML or deliveries.
How Do Merge Fields And Modifiers Work In Formstack Documents?
A merge field is a placeholder written {$FieldName}: curly brackets, a dollar sign, then a name. At merge time it is replaced by the mapped Salesforce value. A modifier, added after a pipe as in {$Amount|number_format:2}, formats that value before it prints.
Naming rules
Formstack's merge field dos and don'ts come down to three rules: use letters, numbers and underscores; never start with a number; and never use spaces, hyphens or special characters.
| Valid | Invalid | Why it fails |
|---|---|---|
{$name} | {$1stName} | Starts with a number |
{$EmailAddress} | {$email address} | Contains a space |
{$Home_Phone} | {$phone-number} | Hyphen instead of an underscore |
{$Customer_ID} | {$merge/field} | Special character |
Keep names consistent with the Salesforce field they represent. A naming standard, written down once (for example, Account_Name for a parent field and Opp_CloseDate for the record's own), saves hours when a second admin inherits the templates.
Modifiers worth knowing
Modifiers run top to bottom and can be stacked. In the builder you pick them from a drop-down on the pill; in Word or PDF templates you type them. Formstack's official modifier list runs to dozens of options. These are the ones most Salesforce templates use:
| Need | Syntax | Result |
|---|---|---|
| Currency | {$TotalAmount|currency_format:"$"} | $1,298.99 |
| Thousands separator and decimals | {$TotalPrice|number_format:2} | 5234.35 becomes 5,234.35 |
| Date format | {$StartDate|date_format:"m/d/Y"} | A US-style date |
| Date arithmetic | {$Date|add_days:10} | The date ten days later |
| Fallback for empty fields | {$FavoriteColor|default:"None"} | "None" when the field is blank |
| Case | {$Name|upper}, |ucwords | Upper case, or capitalised words |
| Amount in words | {$Total|money_to_words} | 10.50 becomes "ten dollars and 50 cents" |
When the formatting has to happen before the template sees the data (combining first and last name into one field, for instance), use Field Map, Formstack's preprocessing layer, rather than piling logic into the template.
How Do Conditional Logic And Loops Keep You To One Template?
Conditional blocks show or hide content based on field values, and loops repeat a row or paragraph for every item in a list, such as Opportunity Products or a record's child Contacts. Together they let one template serve every region, product line and deal size, instead of a separate file for each variation.
Conditional sections
The syntax follows the Smarty template language. A clause that changes by state, for example, looks like this:
{if $State == "CA"}
California-specific terms...
{elseif $State == "AZ"}
Arizona-specific terms...
{else}
Standard terms...
{/if}Two variants handle structured content: {tableif} hides a table row and {listif} hides a list item when its condition is false. To stop an empty field leaving a blank line, put the line break inside the block: {if !empty($Company)} ... {/if}.
Loops for line items and child records
When the mapping includes a Salesforce child relationship, the template receives it as a list. {tablerow} repeats a table row for each item, which is how quotes and invoices print their line items. The part after the dot is the Salesforce API field name:
{tablerow from=$LineItems item=_row}
{$_row.Name} {$_row.Quantity} {$_row.UnitPrice|number_format:2}
{/tablerow}Use {foreach} for loops outside tables and {listrow} for bulleted lists. Loops can be sorted with the sort modifier, and grandchild records (a Contact's dependants under an Account, say) need a nested loop fed by a SOQL query in the mapping. Formstack's loop documentation has the full syntax.
How Does Formstack Documents Pull Data From Salesforce?
Through a mapping. A mapping ties one template, or a data route of several templates, to one Salesforce object, then assigns every merge field a source: a field on the record, a field on a parent such as the Account or Owner, a child relationship, a SOQL query, or a value the user types at generation time.
Fields On The Object, Account, Owner And Other Lookups
The simplest mapping: {$Opp_Name} from Opportunity.Name, {$Account_Name} from Account.Name, {$Rep} from Owner.Name.
Line Items, Contacts, Cases And Custom Child Objects
Sent to the template as a list for {tablerow} and {foreach} loops.
Queries For Complex Structures, Prompts For Ad Hoc Values
A SOQL query handles filtered or deeply nested data; an ad hoc field asks the user for a value, such as a discount reason, when they generate.
Mappings live in each Salesforce org separately. Build and test in a sandbox, then move them to production with the mapping page's export and import (JSON) options. Because the Mapping ID changes between orgs, storing it in Custom Metadata keeps your Flows working in both environments.
Formstack's own guidance is to start a Salesforce implementation from the templates and deliveries, then define the data that feeds them. In practice that means agreeing the finished document first, listing every field it needs, and only then building the mapping. Twopir's Formstack Documents implementation work starts the same way: a field dictionary and naming standard before the first template is built.
What Are The Ways To Generate Documents From Salesforce?
There are five: a Merge Document button on the record page, a list-view action for many records at once, the mapping's built-in automation rules, a record-triggered Salesforce Flow using the Generate Document action, and Apex for batch, combined or fully custom generation. Flow is the right default for anything automatic.
| Method | How it runs | Use it when |
|---|---|---|
| Merge Document button | A user clicks it on the record; a preview option merges real data without sending deliveries | A person decides when the document is ready, such as a quote after a pricing review |
| List view | Select records and generate in one batch job, optionally combined into one file | Periodic runs: renewal letters, statements, certificates |
| Mapping rules | Runs when a record is created or edited and meets up to four criteria | A simple trigger with no other automation around it |
| Salesforce Flow | A record-triggered flow calls the Generate Document action with the record ID and Mapping ID | The default for automation: a stage change, an approval, a status update |
| Apex | webm.WebmergeGenerator methods for single, batch and combined-PDF generation | Custom logic, integrations, or volumes the other methods cannot handle |
For Flow, the official Flow article walks through the setup: copy the Mapping ID, add the Generate Document action to a record-triggered flow, and pass {!$Record.Id} as the record ID. For bulk runs, collect the records with Get Records, transform them into a text collection of IDs and pass that list to the same action, with no loop element needed. Formstack notes that building and maintaining Flows is outside the scope of its support, so the automation needs an owner on your side.
For volume, the package's High-Volume Generation mode runs on Salesforce Batch Apex, handles 20,000+ records in one operation with a batch size of 1 to 200, and is described by Formstack as up to 85% faster than the standard batch mode.
Some older orgs still generate documents from Process Builder. Salesforce ended support for Workflow Rules and Process Builder on December 31, 2025. Existing processes keep running but receive no fixes, so move document triggers to Flow as part of any Formstack clean-up.
Where Can Documents Go: Delivery Options And E-Signature
Formstack Documents can deliver a merged file to Salesforce Files or Attachments, by email, to cloud storage such as Google Drive, Box, Dropbox and SharePoint, by webhook or SFTP, and to e-signature services including Formstack Sign, DocuSign, Adobe Sign and Dropbox Sign. One document can have several deliveries, each with its own conditions.
Back to Salesforce
Saves the file to the record as a File or Attachment, can set the file owner, and can update record fields (for example, a "document sent" date) using JSON.
Recipients from merge fields, CC and BCC, delayed sending, and three security levels up to a password-protected download link instead of an attachment.
Storage and systems
Google Drive, Box, Dropbox, SharePoint, Amazon S3, SFTP, Egnyte, ShareFile and NetDocuments, plus webhooks for anything custom.
E-signature
Formstack Sign, DocuSign, Adobe Sign, Dropbox Sign (formerly HelloSign), SignNow, OneSpan Sign and others.
Formstack Sign in the flow
Formstack Sign sends documents by email or SMS, lets you set the signing order for several signers, sends automatic reminders by email and text, and adds an audit-trail certificate to the end of every signed document. Formstack states that Sign supports compliance with the US ESIGN Act and UETA; treat that as the vendor's position and confirm it against your own legal requirements.
The setting that matters most is "Delay other deliveries until signing complete." Without it, the unsigned copy goes to Salesforce and every other destination immediately, which Formstack itself warns can cause compliance headaches. With it, only the signed version is filed on the record. If no one signs within 90 days, the merge expires and a notice is sent.
Two operational facts shape the design. Formstack Documents does not store merged files, so the delivery is your record of what was sent; if a file is lost it has to be merged again. And merges are counted per delivery location: a document sent for signature and then stored in Salesforce counts as two. Test mode merges are watermarked and do not count against the live allowance.
How Do You Set Up Formstack Documents For Salesforce, Step By Step?
Install the package from AppExchange, assign permission sets, connect it with an API key, build and test the template, create the mapping, configure deliveries, then automate with Flow. Do all of it in a sandbox first and move the mappings to production once the output has been checked. Formstack's setup guide covers each screen.
Keep Version History in mind while you iterate: every save creates a version, versions are kept for at least 30 days, and the last three are always kept. For legally significant wording, that is a safety net, not a change-control process, so agree who may edit which templates before go-live.
Where Formstack Documents Implementations Go Wrong
The product rarely fails on its own. Problems come from template and automation design decisions that look harmless in week one and expensive in year two.
If an existing Formstack setup already shows these symptoms, a Formstack audit inventories the templates, mappings, integrations and licences and ranks the fixes by business risk before anything is rebuilt.
Common Formstack Documents Use Cases By Team
Almost every team that keeps its data in Salesforce has at least one document worth automating. These are the most common patterns, with the Formstack features each one relies on.
Sales: quotes and order forms
Opportunity products printed with {tablerow}, currency formatting, discount clauses shown only when a discount applies, and the signed copy filed back on the Opportunity.
Legal and contracts
NDAs, MSAs and engagement letters generated at a stage change, with jurisdiction-specific clauses handled by conditional sections and a signing order for multiple parties.
Finance: invoices and statements
Invoices and receipts from orders or custom billing objects, and periodic statements run from list views or High-Volume Generation and combined into one PDF where needed.
Onboarding and service
Welcome packs, applications and service agreements assembled from several templates through a data route, with fillable PDFs for third-party forms.
One published example: for a US manufacturer, Twopir automated receipts, agreements and payment records with Salesforce Flow and WebMerge, the tool that is now Formstack Documents. Field mappings fill PDF and HTML templates from live CRM data, and generation fires on record updates and business events. The document generation case study reports generation in under 90 seconds from trigger to finished output, across three automated document types.
Should You Implement Formstack Documents In-House Or With A Partner?
A capable Salesforce admin can install the package and build a first template in a day. Bring in a partner when documents are legally significant, volumes are high, templates depend on complex related data, or the automation has to fit an org that already has years of Flows, Apex and integrations.
Twopir Consulting is a Salesforce Partner and HubSpot Partner. We implement, rescue, optimize, and integrate complex CRM and revenue systems, and document generation is where those systems meet customers. We help growing and mid-market companies, as well as enterprise teams, design the template architecture, merge mappings, generation triggers and delivery routes, and connect Formstack forms, documents and signatures into one Formstack Salesforce integration workflow.
Let's Map Your Salesforce Document Workflow
On a 30-minute discovery call, a Twopir Salesforce consultant will walk through the documents your team produces today, where they break, and whether Formstack Documents, or another approach, is the right fit for your org.
Schedule a Discovery CallThe Bottom Line
Formstack Documents for Salesforce is a mature, flexible way to turn record data into finished documents, and its usage-based pricing suits orgs where many people generate documents. The tool is the easy part. The value comes from the design around it: one template per document type with logic instead of copies, a naming standard for merge fields, Flow-based triggers that fire once, and deliveries that file only the signed version back on the record.
- 1
Choose the template type by the document: the builder for most Salesforce output, fillable PDF for fixed forms, Word for long documents with dynamic tables.
- 2
Use conditional sections, loops and data routes to keep one maintained template per document type.
- 3
Trigger automatic generation with a record-triggered Flow, not Process Builder, and guard against duplicate runs.
- 4
Delay other deliveries until signing is complete, and plan volumes knowing each delivery location counts as a merge.
- 5
Build and test in a sandbox, then move mappings to production with export and import.
Frequently Asked Questions
Formstack Documents for Salesforce is a managed AppExchange package that generates documents from Salesforce data. You build a template with merge fields, map those fields to a Salesforce object and its related records, and the package produces PDF, Word, Excel or PowerPoint files and delivers them to the record, by email, to cloud storage or for e-signature.
Yes. Formstack acquired WebMerge in 2019 and folded it into Formstack Documents. The legacy name still appears in the Salesforce package, for example in the webm Apex namespace and the Webmerge Mapping ID input on the Flow action. In 2025 Formstack's parent company rebranded as Intellistack, and Formstack Documents continues to be sold and supported.
The AppExchange listing says fees are based on the number of documents generated each month, not on users. In October 2026 Formstack published a Suite plan (Forms, Documents and Sign) from $250 a month billed annually with 250 document deliveries a month, while its Salesforce Solutions and Enterprise plans are custom-priced. Confirm current pricing with Formstack before budgeting.
Yes. Add the package's Generate Document action to a record-triggered flow and pass it the record ID and the Mapping ID of your template mapping. For bulk generation, pass a text collection of record IDs to the same action. Flow is the recommended route, because Salesforce ended support for Process Builder on December 31, 2025.
Use the native builder for most Salesforce documents, because it handles rich text, dynamic tables and e-signature tags and generates quickly. Use a fillable PDF when the layout is a fixed form you cannot change. Use Word for long documents that need a table of contents or precise formatting, accepting that merge syntax is typed by hand.
Set up the Salesforce delivery first, then add the e-signature delivery, such as Formstack Sign or DocuSign, and switch on Delay other deliveries until signing complete. The other deliveries then wait for the signature, so only the signed copy is saved to the record. Remember that the signature step and the Salesforce delivery each count as a merge.
Write each merge field as a dollar sign and a name inside curly brackets. Names may use letters, numbers and underscores, must not start with a number, and must not contain spaces, hyphens or special characters. Name and Home_Phone are valid; 1stName, email address and phone-number are not.
Twopir Consulting
Twopir Consulting helps growing and mid-market companies solve complex CRM, integration, and business system challenges. Since 2014 our team of 40+ consultants and architects has delivered Salesforce, HubSpot and integration projects for clients in the US, UK, Australia and New Zealand, the UAE and Canada, including document generation and e-signature workflows.