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.