Create Web Document Templates
Learning Objectives
After completing this unit, you’ll be able to:
- List the types of document templates you can create.
- Create a web document template using Document Template Designer.
- Describe the document template sections.
Document Generation at Infiwave
In the Industries Document Generation Foundations module, you saw how Infiwave simplified and expedited the sales process with digital document generation. Led by Sophia Perez, sales manager, the sales team can now whip up business-critical documents with speed, precision, consistency, and accuracy.
Document templates define the structure, content, and formatting of documents. In this module, you examine how Infiwave set up its Industries Document Generation solution, namely the quote, proposal, and contract document templates the team members use daily.
Who helped set up the logic required to implement and maintain the Document Generation solution? Enter Felix Davis Rosenberg, the trusty Salesforce administrator at Infiwave.
Let’s learn how Felix set up the templates and configured the supporting document-generation processes. But first, let’s find out about templates and template types.
Templates and Template Types
Document templates can be as simple or sophisticated as needed, as long as they help optimize the business process. Template creation is the first project to tackle when setting up a document-generation solution.
How can you create templates with Industries Document Generation? Use the Document Template Designer to build three types of templates: Web HTML, Microsoft Word .docx, and Microsoft PowerPoint .pptx. When you design a template, you can include standard, conditional, and dynamic elements. This way, when the end-user generates a new document from the template, a lot of the content is already populated.
You can also combine standard content with tokens and display conditions. For example, quote documents may require standard elements, like the company name, logo, and details. They can also require dynamic elements, such as the customer’s chosen product and features, along with a quoted price. For some types of documents, you may want to show certain sections under specific conditions.
Data Mapping Types
Each type of template uses JSON-based data mapping. Web templates can use object-based data mapping as well. This diagram shows the template types and data mappings.
You can design two types of templates based on how token mapping occurs.
- JSON-based
- Object-based
JSON-based data mapping is available for each template type. This mapping allows you to define a document template and then use it to generate documents by merging data from any source, such as OmniScript or an external system. You can either use a Data Mapper to map JSON-based tokens to JSON data or a custom Apex class to extract or transform data.
Object-based data mapping is currently available for Web HTML templates. An object-based template is easier to build than a JSON-based template, but it is less flexible in terms of the documents it can generate. This mapping is primarily used for contracts rather than opportunities, quotes, or orders. It allows you to map tokens directly to the SFDC object field. You can select applicable SFDC object data as input, and merge data from these objects into document sections to produce the final document.
Reusable Clauses
A clause is a text-based building block in a contract that provides approved legal language and provisions defined for your organization. Clauses typically specify terms and conditions or other legal statements required in contracts. Find predefined, reusable clauses in the Clause Library or you can create new clauses.
Web Document Templates
Sophia’s team needs an HTML-based contract document template that’s easy to use and customize, has no strict formatting, and doesn’t require a plug-in tool. To this end, Felix designs a web template. These are also called web document templates or web HTML templates.
When you design a web template, you can use CLM features, such as redlining and online version comparison. Use the clause library to find standard, reusable clauses. In addition, you can embed other templates in your new template.
Web document templates can include various sections to hold specific types of content, including, context, images, clauses, signatures, and even embedded templates. For example, a contract document may need a company logo, name, details, payment terms, signature, and a list of products with prices.
Click the section types to learn more.
Clause Creation
Sophia needs to include payment terms in all the contract documents, so Felix creates a reusable, text-based payment clause to use across document templates.
Here’s an example of payment terms with a non-formatted clause.
Follow the steps to create a clause.
- Go to App Launcher, and open Vlocity Document Clauses.
- Click New.
- Enter a Name (1) for the clause, for example,
Payment Terms
.
- Select a Category (2), for example, Services.
- Select a Language (3), for example, English.
- Enter the Clause Content (4).
- Select All Contract Types (5). This allows the clause in all contract types.
- Click Save.
Web Document Template Creation
Let’s create a web document template in the Document Template Designer.
- Go to the App Launcher, and open Document Template Designer.
- Click New. The Start New Template window opens.
- Enter a Name for the template, for example,
Telecom Services Agreement
.
- For Template Type, select Vlocity Web Template.
- For Language, select English.
- For Token Mapping, select Object Based.
- For Usage Type, select Contract.
- For Applicable Objects, select Contract, and for Applicable Item Types, choose ContractLineItem__c.
- Click Save Template Details.
Template Sections
A web document template is an assembly of sections that you arrange in the order that you want them to appear in the resulting document.
Here’s how to create a document section.
- In the Document Template Designer, click Add New Section.
- Choose a Section Type.
For the Telecom Services Agreement template, Felix requires various sections like Image, Clause, Item, Embedded Template, and Signature. Let’s learn how to add each section type.
Image
From the Image section type, click Insert Image to upload an image.
Felix adds the Infiwave logo to the template.
Clause
The list of available clauses is displayed. These are the clauses from the Clause Library.
Felix adds the Payment Terms clause from the clause library.
The clause text becomes part of the new template.
Item
Items are products or services to include in the contract, such as broadband cable service, installation, or an office internet solution.
To add items, click Add Column. The quantity is displayed in tabular format.
Felix creates tokens and maps them to the respective fields.
Embedded Template
To embed an existing template in your new template, click Add New Section. Then select Embedded Template. Only active web templates are listed.
Felix embeds the Telecom Fees & Payments template.
A new section with Fees & Payments is added to the template.
Signature
Use a Signature section to define a signature block and insert tags into the block.
You can add a table as shown in the image or you can just add text using tokens. Felix adds this section as the last section of the contract document.
CLM integrates with DocuSign to manage the eSignature flow. DocuSign recognizes the tags when you send the generated documents to manage the eSignature process.
When you’re finished adding sections, click Save Template Details.
With all these sections added, the web document template is ready.
Resources
-
Documentation: Contract Authoring Concepts
-
Documentation: Document Template Designer
-
Trailhead: OmniStudio Data Mappers
-
Trailhead: OmniScripts
-
Practice Guide: Communications, Media, and Energy: Create Web Document Templates, and Sign Up for the Communications, Media, and Energy Training Org
-
Practice Guide: Health and Insurance: Create Web Document Templates, and Sign Up for the Health and Insurance Training Org