ClauseCatgConfiguration
ContextUseCaseMapping
ContractType
DocumentTemplate
ESignatureConfig
ESignatureEnvelopeConfig
ExternalDocStorageConfig
Flow for Salesforce Contracts
Previous Versions
Represents the document template definitions that enable dynamic document generation from templates within Salesforce organizations.
Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.
Important
This type extends the MetadataWithContent metadata type and inherits its content and fullName fields.
DocumentTemplate components have the suffix .dt and are stored in the documentTemplates folder.
DocumentTemplate components are available in API version 59.0 and later.
Type: string
Description: Context service definition that describes the relationship between node structures within a context. Available in API version 65.0 and later.
Type: string
Description: The name of the context filter that extracts records in the Context Service token mapping type. For example, filter Line Items with Total Price greater than 1000 and sort by Quantity in descending order. This is optional and applicable only for context token mapping. Available in API version 66.0 and later.
Type: string
Description: Context service mapping that defines the mapping of attributes and nodes to related objects. Available in API version 65.0 and later.
Type: string
Description: Name of the context transformation used in the Context Service token mapping type. Applicable only for context token mapping. Available in API version 67.0 and later.
Type: string
Description: Custom class to process document template operations and transformations.
Type: string
Description: Default font styling applied to the document template content.
Type: string
Description: Conversion resource reference used for transforming document content between formats.
Type: DocumentGenerationMechanism (enumeration of type string)
Description: Specifies how documents are generated from the template, defining the generation mechanism and processing approach.
Valid values are ClientSide or ServerSide. The default value is ClientSide.
Type: string
Description: Data extraction transform name for OmniStudio integration, enabling extraction of data from various sources for template processing.
Type: string
Description: Output file format extension for documents generated from this template.
Type: boolean
Description: Indicates whether the template supports batch processing of sections ( true) or not ( false). The default value is false.
Type: boolean
Description: Indicates whether the template is active and available for document generation ( true) or not ( false). The default value is false.
Type: boolean
Description: Indicates whether sections are processed in the template ( true) or not ( false). The default value is false.
Type: string
Description: Last processed section key for embedded template processing, used for tracking template section processing state.
Type: string
Description: Data mapping transform name for OmniStudio integration, enabling mapping of data between different formats and structures. Available in API version 56.0 and later.
Type: string
Description: Display label for the template that appears in the user interface.
Type: string
Description: Internal name used to identify the template within the system.
Type: string
Description: Package namespace for the template used in managed package deployments.
Type: string
Description: Header font styling applied to section headers within the document template.
Type: string
Description: Header font values and properties for section header styling configuration.
Type: boolean
Description: Indicates whether unmapped tokens must be displayed in the generated document ( true) or not ( false). The default value is false.
Type: boolean
Description: Indicates whether embedded template tokens must be extracted during processing ( true) or not ( false). The default value is false.
Type: DocumentTemplateStatus (enumeration of type string)
Description: Template status that indicates the current state and availability of the document template.
Valid values are Active, Archived, or Draft
Type: TargetTokenItemObject (enumeration of type string)
Description: Target item object for token mapping, defining specific item-level token replacement rules and configurations.
Valid values are OPPORTUNITY_LINE_ITEM, ORDER_LINE_ITEM, or QUOTE_LINE_ITEM
Type: TargetTokenObject (enumeration of type string)
Description: Target object for token mapping, defining the primary object used for token replacement and data binding.
Valid values are CONTRACT, OPPORTUNITY, ORDER, or QUOTE
Type: string
Description: List of available tokens that can be used within the template for dynamic content generation.
Type: TokenMappingMethodType (enumeration of type string)
Description: Token mapping method that defines the approach used for mapping tokens to data values.
Valid values are ContextService, CustomClass, or OmniDataTransform. The default value is ContextService.
Type: TokenMappingType (enumeration of type string)
Description: Required.
Defines how tokens are mapped within the template, specifying the token mapping strategy and configuration.
Valid values are:
JSONSalesforceObjectType: DocumentTemplateType (enumeration of type string)
Description: Required.
Type of document template, defining the category and intended use case of the template.
Valid values are:
HTMLArchiveMicrosoft365WordMicrosoftPowerpointMicrosoftWordWebType: string
Description: Unique ID of the template, ensuring template uniqueness across the organization.
Type: DocumentTemplateUsageType (enumeration of type string)
Description: Defines how the template is used within the system, specifying the usage context and application scenarios.
Valid values are Contract_Lifecycle_Management or Revenue_Lifecycle_Management
Type: string
Description: Template version number to track template revisions and changes over time.
Type: string
Description: Relationship metadata in XML format that defines connections and dependencies between template components.
This is an example of a DocumentTemplate component.
1<?xml version="1.0" encoding="UTF-8"?>
2<DocumentTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
3 <customClassName></customClassName>
4 <defaultFontStyle>'Times New Roman', times, serif</defaultFontStyle>
5 <documentConversionResourceName></documentConversionResourceName>
6 <documentGenerationMechanism>ClientSide</documentGenerationMechanism>
7 <type>MicrosoftWord</type>
8 <usageType>Contract_Lifecycle_Management</usageType>
9 <extractOmniDataTransformName>extractorv1</extractOmniDataTransformName>
10 <mapperOmniDataTransformName>mapperv1</mapperOmniDataTransformName>
11 <fileExtension>docx</fileExtension>
12 <hasBatchableSection>false</hasBatchableSection>
13 <isActive>false</isActive>
14 <isSectionProcessed>false</isSectionProcessed>
15 <lastEmbeddedTmplSectionKey></lastEmbeddedTmplSectionKey>
16 <name>Sample</name>
17 <namespace></namespace>
18 <sectionHeaderFontStyle></sectionHeaderFontStyle>
19 <sectionHeaderFontStyleValue></sectionHeaderFontStyleValue>
20 <shouldDisplayUnmappedToken>false</shouldDisplayUnmappedToken>
21 <shouldExtractEmbeddedTmplToken>false</shouldExtractEmbeddedTmplToken>
22 <status>Draft</status>
23 <tokenList></tokenList>
24 <tokenMappingMethodType>OmniDataTransform</tokenMappingMethodType>
25 <tokenMappingType>JSON</tokenMappingType>
26 <targetTokenItemObject>OPPORTUNITY_LINE_ITEM</targetTokenItemObject>
27 <targetTokenObject>CONTRACT</targetTokenObject>
28 <uniqueName>Sample_1</uniqueName>
29 <versionNumber>1</versionNumber>
30 <xmlRelationshipMetadata></xmlRelationshipMetadata>
31 <masterLabel>Sample_1</masterLabel>
32</DocumentTemplate>This is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>*</members>
5 <name>DocumentTemplate</name>
6 </types>
7 <version>68.0</version>
8</Package>This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.