Test Drive
Document Generation Test Drive

Real-Time Document Generation with Runtime Variables

introduction in the test drives manual document generation docid\ pkeia45u44areccwi7g2z and automated document generation docid 8kdy8u5n93vsdofsnt wc , we demonstrated how cloudfiles doc gen enables users to generate customizable documents (docx, xlsx, pptx, or pdfs) using templates and salesforce record data this test drive showcases the next level generating documents using dynamic runtime variables instead of relying solely on salesforce field values, you’ll populate an invoice through a guided screen flow , which accepts custom input directly from the user and generates a document on the fly in order to access this test drive, head over to our salesforce appexchange listing & click on the try it button enter your information to open the test drive org once the test drive is open, navigate to this article within the instructions tab of the test drive instructions to test out this feature, follow the simple instructions below 1 go to opportunities tab and create a new opportunity with basic details 2 once the record is saved, open it and click the generate invoice button 3 this launches the cloudfiles opportunity dynamic invoice docgen screen flow you’ll now see a guided screen where you can enter your own runtime details 4 in the invoice details section, fill out information such as the invoice number, who prepared it, the document name, and date/time 5 choose whether you want to generate a pdf or docx file 6 in the contact details , enter the customer's information, including email ( make sure it's valid — the document will be emailed here ) 7 under products , toggle on the products you wish to be included as line items in the invoice and specify quantity and unit price 8 in the subscription period , set the start and end dates for the billing cycle 9 lastly, add any custom notes for the customer using the rich text editor in note to customer section 10 when you're ready, click generate within seconds, the invoice will be created and attached to the files related list of the opportunity 12 you’ll also receive an email with the generated file as an attachment implementation this demo is powered by salesforce flow builder combined with generate document (sync) docid 9davjkiyvj2zfhjw7zcvx flow action the key components of the flow include screen elements to collect runtime input from the user assignment elements to map these inputs to variables a generate document (sync) action that invokes the doc gen process using template id file type runtime variables destination record context the runtime values are not pulled from fields — instead, they’re entered by the user at runtime and passed as runtime variables the below image displays the flow being triggered behind this demo the below image displays the 'invoice' template configuration in ms word cloudfiles supports a variety of variable types, including runtime variables (entered via flows) record single variables (individual records) record collection variables (lists of records) each variable can be configured with a specific data type such as string, boolean, integer, date, time, datetime, double, and rich text beyond this test drive this demo shows how cloudfiles enables dynamic, user driven document generation — but the real power lies in what follows pdf security & encryption cloudfiles lets you enforce robust pdf controls directly from salesforce flows lock files from editing, copying, or printing set owner/viewer passwords control form filling and retention these settings can be dynamically assigned via flow variables, offering unmatched flexibility and compliance synchronous document generation unlike other tools that use delayed async methods, cloudfiles supports real time (sync) document generation this means no delays or polling instant file availability for email, attachments, or external storage seamless experience for users and automation flows together, these capabilities make cloudfiles a powerful, secure, and efficient solution for enterprise grade document automation