Large-scale customers using Formstack Documents for Salesforce are experiencing performance and scalability limitations with the standard batch-based generation approach. The High-Volume Generation feature is designed to efficiently handle scenarios where a large number of individual documents need to be generated. This feature leverages Salesforce's Batch Apex framework to handle thousands of records efficiently while respecting platform governor limits.
Key Benefits
- Scalability: Process up to 20,000+ records in a single operation
- Performance: Optimized query execution and memory management
- Flexibility: Customizable batch sizing for optimal performance
Use Cases
The feature is suited for scenarios such as:
- Monthly statement generation for hundreds of customers
- Bulk contract renewals and documentation
- Mass communication campaigns with personalized documents
- Quarterly reporting across multiple business units
Note: This feature is not intended for single documents with very large data merges (e.g., one document pulling thousands of related records).
Choosing Between Batch Mode and High-Volume Generation
When running batch processing, you can choose either the classic Batch Mode or the High-Volume Generation. Once one option is applied, the other is disabled—you cannot run both at the same time.
- Use Batch Mode if you need maximum stability and are working with small to medium volumes. It uses Salesforce’s standard batch framework, processing records one by one. This option is best for simple mappings and lower data volumes where reliability is more important than speed.
- Use High-Volume Generation if you want performance at scale. It is designed for large volumes and complex mappings, using parallel processing with caching and bulk-optimized queries. This option is up to 85% faster, supports batches of up to 200 records per batch, and is best suited for enterprise-level operations.
How to enable and set up the feature?
Enable the feature on the mapping page
Inside your Formstack Mapping, under Optional Settings, you will see the High-Volume Generation checkbox.
Once enabled, the Batch Size option will be displayed, allowing you to control the number of records you want to process in each batch. Range: 1 to 200 records per batch (Salesforce platform maximum)
Recommended Batch Sizes:
- Simple Mappings (basic fields only): 150-200 records
- Complex Mappings (SOQL queries, relationships): 50-100 records
- Heavy Data Processing: 25-50 records
- Conservative Approach: Start with 50 and adjust based on performance
Additional Setups when using APEX
Currently, the High-Volume Generation doesn’t support Save Documents in Files/Attachments when using APEX.
If you want to store the merged file(s), you will need to set up a Salesforce Delivery.
Step 1: Inside your Document/Data Route go to the Deliver tab
Step 2: Click on +New Delivery and search for Salesforce. Once you link your Salesforce Org(the one that will be getting the merge files), you will see this screen:
Step 3: In the Record ID box, enter {$_salesforce_record_id} , which is the field that will contain the Salesforce Record ID by default.
Step 4: In the Object Name box, enter the object that will receive the merge files.
Step 5: Lastly, in the Save File in dropdown, select if you want to store the merged file as an Attachment or File.
That’s it, execute a merge processing a few records, and you should see in the Docs Overview tab a confirmation that records have been processed and merged files have been successfully stored.
Note: For more information about Salesforce Deliveries, visit: https://support.webmerge.me/s/article/Salesforce-Setting-up-as-a-Delivery
Feature Limitation
- High-Volume Generation does not support file retrieval. If the system detects an include file during mapping while using High-Volume Generation, it will automatically switch to Batch Mode.
- Mutually exclusive with Batch Mode. Only one processing mode can be used per Mapping at a time