You are here:
Using Object-Based or JSON-Based Document Templates
There are two types of contract document templates, based on how token mapping occurs: object-based and JSON-based. Templates based on Microsoft Word and Microsoft PowerPoint documents must be JSON-based.
Characteristic | Object-Based Mapping Document Template | JSON-Based Mapping Document Template |
|---|---|---|
Usage |
Use to create documents from Contract, Quote, Opportunity, and Order objects that map fields into the template. For Opportunity, Order, and Quote objects, only PDF documents are supported. |
Use to create document from JSON data input. This template is data source agnostic. Data can come from any Salesforce object or data that is captured elsewhere, such as in an Omniscript. |
Design |
Users with functional skillsets, such as business analysts, product managers, and legal analysts, can build object-based templates. |
Users with functional skillsets, such as business analysts, product managers, and legal analysts, can build object-based templates, but knowledge of Omnistudio Data Mapper, Omniscript, or other JSON sources is required. |
Item section |
An item section can pull data from line items and display it in a grid. Rows in the grid cannot be filtered. An item section can display only line item information and cannot display product attributes. |
An item section can pull data from any data source, line items, pricing tables, contract lists, and so on. Using declarative mappings, item sections can display product attributes from line items. |
Repeating content section |
Not available |
A repeating content section can pull data from any data source, line items, pricing tables, contract lists, and so on. Using declarative mappings, item sections can display product attributes from line items. You can filter section lines using formulas. |
Conditional template sections |
Conditionalize content based on products or entity filters. |
Conditionalize content based on formulas. Define conditional sections and repeating content display filters. |
Using Document Generation in Vlocity, you cannot use object-based templates. You must use JSON-based templates. Object-based templates apply only to specific objects, such as Contract, Opportunity, Order, and Quote.
- Conditionalizing Line Items Using Formulas
You can include line items in a repeating content section or an item section in a contract only if certain criteria are met. In JSON-based mapping document templates, you can use formulas to display or hide line items in a repeating content or in an item section.

