Salesforce · Document Automation · Formstack

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.

Where we sit in this: Twopir Consulting implements document automation on Salesforce with several tools, Formstack Documents among them. This guide explains how the product works from its official documentation, so you can judge the fit before you build.

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, |modifiers for 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.

Section 01 · Definition

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.

Section 02 · Verdict

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.

Section 03 · Templates

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.

Formstack Documents Document Builder showing a service contract template with merge fields such as Client Name and Contract Effective Date as pills, and a Merge Fields panel on the right
The Document Builder: merge fields sit in the template as pills and are listed in the Merge Fields panel for reuse. Image: Formstack.
Template typeBest forOutput formatsWatch out for
Native builderQuotes, letters, order forms, anything with Salesforce rich text; fastest for end usersPDF, DOCX, XLSX, HTML, XML, email, JPG, or text with your own extensionNo table of contents; the drag-and-drop editor works poorly when framed inside Salesforce, so edit at formstack.com
Fillable PDFFixed government, carrier or lender forms; checkbox- and radio-heavy layoutsPDF (flattened or not), JPGVariable-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 bordersDOCX, PDF, JPGMerge syntax is typed by hand; some Salesforce rich text does not translate; editors need a Word subscription
Excel (XLSX)Pricing schedules, calculations, chartsXLSX, PDFAn IF statement can blank a row's content but cannot hide the row itself
PowerPoint (PPTX)Proposals and account reviewsPPTX, PPSX, PDF, JPGUse {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.

Section 04 · Merge Fields

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.

ValidInvalidWhy 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:

NeedSyntaxResult
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}, |ucwordsUpper 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.

Section 05 · Logic

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.

Section 06 · Mappings

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.

Source 1 — The record and its parents

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.

Source 2 — Child relationships

Line Items, Contacts, Cases And Custom Child Objects

Sent to the template as a list for {tablerow} and {foreach} loops.

Source 3 — SOQL and user input

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.

Section 07 · Generation

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.

MethodHow it runsUse it when
Merge Document buttonA user clicks it on the record; a preview option merges real data without sending deliveriesA person decides when the document is ready, such as a quote after a pricing review
List viewSelect records and generate in one batch job, optionally combined into one filePeriodic runs: renewal letters, statements, certificates
Mapping rulesRuns when a record is created or edited and meets up to four criteriaA simple trigger with no other automation around it
Salesforce FlowA record-triggered flow calls the Generate Document action with the record ID and Mapping IDThe default for automation: a stage change, an approval, a status update
Apexwebm.WebmergeGenerator methods for single, batch and combined-PDF generationCustom 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.

Section 08 · Delivery

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.

Email

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.

Section 09 · Setup

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.

1. Install the managed package
Install "Formstack Documents" from AppExchange as a System Administrator. It adds Formstack Documents, Formstack Mappings and Formstack Settings tabs.
2. Assign access
Give admins the "Formstack Document" permission set, internal users "Formstack Document Merge Users", and Experience Cloud users "Formstack Document Merge Users External". Setup needs a full Salesforce licence.
3. Connect the accounts
Create an API key and secret in Formstack Documents (Profile, API Access) and enter them in Formstack Settings.
4. Build the template
Choose the template type, add merge fields to the naming standard, apply modifiers, add conditional sections and loops, and upload the logo and images.
5. Create the mapping
Pick the object and template, map every merge field to its source, and add the Merge Document button to the page layout or Lightning page.
6. Configure deliveries
Set up the Salesforce delivery first, then email or e-signature, with "Delay other deliveries" switched on for anything that needs a signature.
7. Test, then automate
Use Test Mode and Preview with real records, including edge cases such as empty fields and long line-item lists. Then build the record-triggered Flow and move everything to production.

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.

Section 10 · Pitfalls

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.

1. A template per variation. Separate files for each region, product or language multiply every wording change. Conditional sections and data routes keep one maintained template per document type.
2. Unsigned copies filed as final. Without "Delay other deliveries", the pre-signature version lands on the record and in storage, and nobody is sure which copy is binding.
3. Surprise merge counts. Each delivery location is a merge, and a data route with five templates is five. Volume plans built on "one document per deal" undercount.
4. Duplicate generation. A flow that fires on every edit, rather than when the record first meets its criteria, sends the same contract several times. Add an entry condition or a "document generated" flag.
5. Automation nobody owns. Legacy Process Builder triggers, undocumented Apex and Flows outside Formstack's support scope need a named owner and a migration plan.

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.

Section 11 · Use Cases

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.

Section 12 · Partner

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.

Ready to Start

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 Call
Bottom Line

The 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. 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. 2

    Use conditional sections, loops and data routes to keep one maintained template per document type.

  3. 3

    Trigger automatic generation with a record-triggered Flow, not Process Builder, and guard against duplicate runs.

  4. 4

    Delay other deliveries until signing is complete, and plan volumes knowing each delivery location counts as a merge.

  5. 5

    Build and test in a sandbox, then move mappings to production with export and import.


FAQ

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.

TC

Twopir Consulting

Salesforce Partner · HubSpot Partner

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.