Dive into Document Generation Capabilities
Learning Objectives
After completing this unit, you’ll be able to:
- Describe Industries Document Generation capabilities.
- Explore Document Template Designer.
Key Capabilities
Industries Document Generation is truly a powerful solution. Teams can:
- Create document templates with the Document Template Designer tool.
- Use data tokens, conditional logic, and tabulation in the templates.
- Use object-based templates to map tokens directly to Salesforce object fields.
- Use JSON to extract and map internal and external data.
- Generate documents using various sources and processes.
Now it’s time to zoom in and learn more about each capability.
Document Template Designer
A document template defines the structure, content, and format of generated documents. Document Template Designer is a tool for creating document templates in Salesforce. Using this tool, you can define HTML-based, Microsoft Word, and Microsoft PowerPoint templates with formatted text, including paragraphs, page columns, tables, images and more. Generate documents using an existing template, or create a new version of a template in the designer.
This screen shows the user interface (UI) and the Start New Template screen where you create document templates for different objects.
Use the Template Designer to define the template settings (1) and view the uploaded document/file (2).
Data Tokens, Conditional Logic, and Tabulation
You may need to build complex projects at times. To assist, insert tokens into your templates to perform various functions. Industries Document Generation supports several token types and functions.
Token Type |
Function |
---|---|
Variable |
Displays the value of a variable that is passed into the document template as a JSON element. |
Repeating content |
Repeats content sections, for example, a list of products. |
Conditional logic |
Checks a Boolean condition to display content when certain conditions are met. The content can be displayed in a tabular format. |
Image |
Inserts dynamic images in generated documents. |
Rich text |
Inserts rich text content in generated documents. |
Hyperlink |
Inserts dynamic URLs in generated documents. |
Data Mapping with Objects
When you create an HTML-based template, you can associate it with SFDC object data. Here’s a diagram that shows you the object-based data flow and mapping.
Object-based templates apply only to specific objects, such as Contract, Opportunity, Order, and Quote. Each token in a contract document section maps to an SFDC object field.
Data Mapping with JSON
You can populate your documents with data stored in Salesforce or data from external systems. Industries Document Generation templates accept JSON data from any source.
Here’s a diagram that shows you how the data extraction and transformation works.
When you create a template, you can associate it with JSON input data. For example, templates can accept input JSON data from a Data Mapper extraction step in an OmniScript or data from an OmniScript that a user fills out directly.
Client-Side or Server-Side Processing
You can generate documents using the sample client-side and server-side OmniScripts. You can also create your own OmniScripts, Integration Procedures, and Apex classes to generate documents, all on the Salesforce Platform. Integration Procedures are declarative, server-side processes that run multiple actions in a single server call. The final output format of the generated document can be .docx, .pptx, or .pdf.
Here’s an example of a client-side OmniScript in preview mode.
The OmniScript walks you through each step required to generate a document. In this case, the steps include:
- Enter Object Id
- Pick a template
- Generation Options
- Generate Document
Whether it’s a contract, quote, or opportunity record page, you can trigger the document-generation process straight from the relevant record. In addition, you may also want to set up document generation as a back-end process.