Introduction
In this test drive, we will explore how CloudFiles Doc-Gen generates customizable documents (DOCX, XLSX, PPTX, and corresponding PDFs) from Salesforce Object records and templates created using Microsoft Word or Power Point or Excel. The entire process takes less than a minute to complete.
Refer to the below video to understand what to expect in this test drive -
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.
- Go to 'Contracts' tab and create a new Contract.
- 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.
- Once the Contract is created, open it and find the 'CloudFiles' Doc-Gen component on the record.

- The component will display templates configured for the 'Contract' object.

- Click the drop-down next to a template and select either 'Generate PDF' or 'Generate DOCX/PPT/Excel' to create the document.

- The file generation takes a moment of time.

- Once generated you can
- 'Download' the document to your computer
- 'Copy to Salesforce Files' to save it as a Salesforce file on the record.
Refer to the GIF below for visual understanding of the above steps -

Implementation
This setup uses Document Generation powered by:
- Template Creation in Microsoft Word, Excel, or PowerPoint
- Doc Gen Widget Set-up
The Doc-Gen component reads record data, applies it to the chosen template, and outputs a document in the required format. Generated files can be instantly downloaded, stored as Salesforce Files, or synced into external storage via CloudFiles Document Management.
The below image displays the 'Contract' Template configuration:

For more details please refer to Document Generation.
Beyond this Test Drive
The possibilities of document generation with CloudFiles Doc-Gen extend beyond this specific scenario. Below are several practical examples and extended capabilities:
Multi-format Template Creation
CloudFiles Doc-Gen supports Template Creation and customization across multiple file formats.
Example: Create PDFs with form fields, Word documents (.docx), Excel sheets (.xlsx), and PowerPoint presentations (.pptx) to cater to various use cases and requirements.
Universal Salesforce Object Support
Templates can be designed for any Salesforce standard or custom object.
Example: Generate customized quotes from Opportunities, detailed case reports from Cases, or personalized client communications from Contacts. Each object can have multiple unique templates.
Advanced Template Configuration
Templates can accommodate complex and highly customized configurations.
Example: Configure templates with conditional content insertion, dynamic tables from related lists, calculated fields, and complex formatting using CloudFiles Template Builder and .
Flexible Salesforce Integration
CloudFiles Doc-Gen components can be embedded in various Salesforce interfaces.
Example: Place the on Salesforce Lightning record pages, internal apps, or customer-facing Experience Cloud pages, enabling diverse users easy access to document generation functionality.
Workflow Automation
Automate document generation within Salesforce processes and workflows.
Example: Integrate document generation with Salesforce Flow or CloudFiles to automatically create, store, and distribute documents based on record triggers, approvals, or events, while saving generated files directly to Salesforce Files or external storage systems.
There are other test drives available that might be of interest to you as well. Head back to the Test Drive article to continue testing.