You are here:
Creating a Microsoft Word or Microsoft PowerPoint Template
Using Microsoft Word or Microsoft PowerPoint, create documents that contain formatted text, including tables of contents, tables, paragraphs, columns, and images. You can also include tokens, or variables, to merge data from a JSON source when you generate the document.
The ability to use Microsoft Word and Microsoft PowerPoint files as the basis of Vlocity Document Templates has been introduced in Salesforce Industries Communications, Media, and Energy Winter '18, Minor release, Version 101.2.900.151.
To import the data, you can use a Omnistudio Data Mapper or create a custom class using multiple Data Mappers or queries to retrieve large amounts of data (for example, over 1,000 records).
After you complete the document, you create a document template and drag the file into the document template designer. The Document Template object is a container to hold the .docx or .pptx file.
If you include a table of contents in your Microsoft Word document, after Vlocity CLM generates the contract, you can refresh the table of contents in the Microsoft Word file.
To create a Microsoft Word or Microsoft PowerPoint document template:
-
Create a document in Microsoft Word or Microsoft PowerPoint.
To include tokens, see Tokens in Microsoft Word or Microsoft PowerPoint Documents.
To include clause sections or context sections for document reconciliation, see Reconcile Documents for Microsoft Word DOCX Templates.
- Using the App Launcher, go to Vlocity Document Template.
- Click New.
- Enter the Name.
- From the Template Type list, select Microsoft Word .DOCX Template or Microsoft PowerPoint .PPTX Template.
-
From the Language list, select your preferred
language.
Default language is set to English.
- From the Token Mapping list, select JSON Based.
-
From the Token Mapping Method, select one of the
following:
-
Data Mapper: Enter a Mapping Data Mapper Bundle Name.
-
Custom Class: Enter a Custom Class Name. Skip to Step 10. For details about defining a custom class, see Rules For Using a Custom Class in a Microsoft Word or Microsoft PowerPoint Template.
-
- Enter a Mapping Data Mapper Bundle Name to transform data to be used in tokens. For details about creating Data Mappers, see Omnistudio Data Mappers.
- Enter a Data Extract Data Mapper Bundle Name to retrieve Salesforce data to be used in tokens. For details about creating Data Mappers, see Omnistudio Data Mappers
- Optional: Select the Display Unmapped Tokens in Output Document check box. If you use tokens, this setting identifies the unmapped tokens in the generated document. Otherwise, the unmapped tokens are ignored in the generated document.
- Optional: Select the Extract Embedded Template Token check box. If you have embedded templates in this template that use tokens, you must select this checkbox to ensure that those tokens are extracted in the generated document. Otherwise, you receive errors. For details about embedded templates, see Creating an Embedded Template Section in Document Template Designer.
- From the Usage Type list, select what this template is used for such as Contract, Opportunity, Order, Quote, or Asset. For example, to use this template for contracts, select Contract.
- Select the Document Generation Mechanism.
- Select the PDF Generation Mechanism.
-
To restrict a template to specific contract types, follow these
steps:
- Clear the All Contract Types checkbox.
- Search for the appropriate contract type.
- Drag the .docx or .pptx file from your computer into the document template designer, or click Browse to find the .docx or .pptx file.
-
Click Save Template Details.
After you activate the Vlocity Document Template, you can’t delete the Microsoft Word or PowerPoint file associated with it.
-
Optional: If you want to use this template as the default template for
your contracts, complete these steps.
- Using the App Launcher, open Contract Types.
- Click the Default contract type.
- On the Contract Type record detail page, in the Contract Type Settings related list, show all the settings.
- Next to DefaultTemplateName, click
Edit.Note
If you don't see that setting, you can manually add it. Click New, and in the Feature Name field, enter DefaultTemplateName and continue with this procedure.
- In Setup Value, enter the name of the custom document template.
- Click Save.


