Test Drive
Document Generation Test Drive
Automated Doc Gen
introduction in the earlier manual doc gen docid\ pkeia45u44areccwi7g2z test drive, we saw how users can generate documents directly from templates using the cloudfiles doc gen component on record pages this test drive demonstrates the next level — how you can automate document generation using salesforce flows and doc generation flow actions docid\ nv27oftdk5ukedfzqpbpq instructions follow the same process as described in the manual doc gen docid\ pkeia45u44areccwi7g2z test drive 1 go to 'contracts' tab and create a new contract 2 fill in all the required fields in the 'new contract' form 'account name' choose an existing account or create a new one 'price book' select "cloudfiles price book" from the options 'contract image url' provide a public url for an image 'contract start date' pick a date 'customer signed date' pick a date 'contract term' enter a numerical value 'customer signed by' select an existing contact or create a new one 'status' leave as default i e 'draft' 3 once the contract is created, edit the status field and set it to ' activated' to trigger the flow automation 4 within seconds, a contract pdf and excel file will be auto generated and attached to the record in the 'files' related list— no clicks needed you may need to refresh the page to see the changes the below image displays the 'contract' record page after the generation store generated files in connected external storage if you want to see how cloudfiles document management & sharing docid 3gglz90lgx5zfwkrgm7ra works alongside document generation docid\ cmqmhkrlb3mveyvyapv9c you can also generate files directly into connected external storage platforms (like sharepoint, google drive, one drive etc ) after setting the status field to 'activated' , open the cloudfiles widget in the files tab of the contract record you’ll find the generated files located in the connected external folder note if you don’t see a connected folder or the files haven’t appeared yet, simply refresh the widget or the page the below image displays a sample 'contract' pdf file generated implementation this demo automation was configured using salesforce flows configured with doc generation flow actions docid\ nv27oftdk5ukedfzqpbpq triggers based on contract status field updates generate document (sync) docid 9davjkiyvj2zfhjw7zcvx flow action is executed store them either as salesforce files or push them into external storage the below image displays the 'contract' template configuration the below image displays the flow being triggered behind this demo for more information, please refer to doc generation flow actions docid\ nv27oftdk5ukedfzqpbpq beyond this test drive the doc generation flow actions docid\ nv27oftdk5ukedfzqpbpq can be applied to many real world automations beyond this simple demo below are some extended possibilities auto generate documents on key record updates trigger file creation when records reach specific stages or conditions in salesforce example when an opportunity reaches “closed won,” automatically generate a quote and a thank you letter, and attach them to the record multi format document generation produce multiple formats of the same template in one go example from a contract record, generate a pdf for client signature and a word copy for internal editing store in salesforce or external systems decide where to store generated files — natively in salesforce or in connected storage (sharepoint, google drive, onedrive, aws s3, etc ) example generate monthly invoices and save them directly in sharepoint under a customer specific folder while keeping metadata inside salesforce dynamic runtime variables insert values directly from salesforce records or flow runtime variables into templates example pull billing details from related objects or calculate discounts dynamically in real time and insert them into an invoice screen flow driven document generation capture values from users during a screen flow and inject them into templates as runtime inputs example a sales rep runs a screen flow that collects deal terms, payment conditions, and special clauses, then instantly generates a quote pdf with those details filled in chain with communication workflows combine with flows to email, share, or notify users once documents are generated example after generating a new service agreement, automatically email it to the customer with salesforce email alerts batch generation at scale run scheduled or batch flows to mass generate documents for groups of records example every quarter, generate performance reports for all active accounts and save them in a client facing experience cloud site enforce pdf security controls protect sensitive documents with configurable pdf restrictions example generate policy documents that cannot be printed or edited, with password protection enabled for opening with just a few clicks in flow builder, doc generation flow actions docid\ nv27oftdk5ukedfzqpbpq empower you to build sophisticated document generation workflows without writing a single line of code there are other test drives available that might be of interest to you as well head back to the test drive docid\ cgjldtde3usa oibbwgpn article to continue testing