DocumentTemplate
Document template for automated PDF and document generation.
Defines the structure, layout, and content for generating documents such as invoices, quotes, reports, and certificates. Supports localized content, dynamic data integration, and can serve as default templates for specific document types.
type DocumentTemplate implements IBaseTemplate {
id: String!
contents: [LocalizedTemplateContent!]
names(
language: String
): [LocalizedString!]!
content: String
customQuery: String
queryVariables: String
createdAt: DateTime!
lastModifiedAt: DateTime!
createdBy: Int
lastModifiedBy: Int
fileNames: [LocalizedString!]!
isDefaultOrderPdf: Boolean!
isDefaultQuotePdf: Boolean!
}
Fields
DocumentTemplate.id
● String!
non-null scalar
Unique identifier for the message template.
Used to reference and manage specific templates throughout the messaging system for emails, documents, and notifications.
DocumentTemplate.contents
● [LocalizedTemplateContent!]
list object
Handlebars template content for each supported language.
The actual template markup using Handlebars syntax for dynamic content generation, stored per language for localization support.
DocumentTemplate.names
● [LocalizedString!]!
non-null object
Localized template names for different languages.
Human-readable names for the template in various languages, used for template identification and management in multilingual environments.
DocumentTemplate.names.language
● String
scalar
Language filter for localized content selection.
Filter parameter used to retrieve content in specific languages from multilingual template fields.
DocumentTemplate.content
● String
scalar
Compiled template content for document generation.
The processed template content ready for variable substitution and document generation, derived from the localized contents based on the target language.
DocumentTemplate.customQuery
● String
scalar
GraphQL query for additional data enrichment.
Custom query executed before template rendering to fetch supplementary data not included in the original event payload, enabling rich template content.
DocumentTemplate.queryVariables
● String
scalar
Variables for custom GraphQL query execution.
JSON object containing variables used in the custom query, supports Handlebars expressions for dynamic variable generation based on event data.
DocumentTemplate.createdAt
● DateTime!
non-null scalar
Template creation timestamp.
Date and time when this template was initially created in the system, used for auditing and template lifecycle management.
DocumentTemplate.lastModifiedAt
● DateTime!
non-null scalar
Template last modification timestamp.
Date and time when any template content or configuration was last updated, used for change tracking and version control.
DocumentTemplate.createdBy
● Int
scalar
Template creator user identifier.
ID of the user who originally created this template, used for ownership tracking and access control.
DocumentTemplate.lastModifiedBy
● Int
scalar
Template last editor user identifier.
ID of the user who most recently modified this template, used for change attribution and audit trails.
DocumentTemplate.fileNames
● [LocalizedString!]!
non-null object
Dynamic file names for document template outputs.
File naming patterns per language using Handlebars variables to generate contextual file names for generated documents and attachments.
DocumentTemplate.isDefaultOrderPdf
● Boolean!
non-null scalar
Default order document template designation.
Indicates whether this template serves as the default template for generating order-related PDF documents in the system.
DocumentTemplate.isDefaultQuotePdf
● Boolean!
non-null scalar
Default quotation document template designation.
Indicates whether this template serves as the default template for generating quotation-related PDF documents in the system.
Interfaces
IBaseTemplate
interface
Base interface for all message templates in the system.
Defines common properties and functionality shared between email templates and document templates, including content management, localization, data integration, and metadata tracking.
Returned By
documentTemplateCreate
mutation ● documentTemplateUpdate
mutation
Member Of
EmailTemplate
object