EmailTemplate
Email template for automated messaging and communication campaigns.
Defines the structure, content, and configuration for email messages including localized content, recipients, attachments, and dynamic data integration. Used for transactional emails, marketing campaigns, and system notifications.
type EmailTemplate implements IBaseTemplate {
id: String!
contents: [LocalizedTemplateContent!]
names(
language: String
): [LocalizedString!]!
content: String
customQuery: String
queryVariables: String
createdAt: DateTime!
lastModifiedAt: DateTime!
createdBy: Int
lastModifiedBy: Int
subjects(
language: String
): [LocalizedString!]!
from: EmailSender!
tos: [EmailContact!]
ccs: [EmailContact!]
bccs: [EmailContact!]
attachments: [DocumentTemplate!]
}
Fields
EmailTemplate.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.
EmailTemplate.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.
EmailTemplate.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.
EmailTemplate.names.language
● String
scalar
Language code filter for localized names.
ISO 639-1 language code (e.g., 'en', 'nl', 'de') to filter the returned names to a specific language. When omitted, returns names for all available languages.
EmailTemplate.content
● String
scalar
Compiled template content for rendering.
The processed template content ready for variable substitution and message generation, derived from the localized contents based on the target language.
EmailTemplate.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.
EmailTemplate.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.
EmailTemplate.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.
EmailTemplate.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.
EmailTemplate.createdBy
● Int
scalar
Template creator user identifier.
ID of the user who originally created this template, used for ownership tracking and access control.
EmailTemplate.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.
EmailTemplate.subjects
● [LocalizedString!]!
non-null object
Localized email subject lines with dynamic content support.
Email subject text for each language with Handlebars variable support for personalized subject lines based on recipient and context data.
EmailTemplate.subjects.language
● String
scalar
Language code filter for localized subject lines.
ISO 639-1 language code (e.g., 'en', 'nl', 'de') to filter the returned subject lines to a specific language. When omitted, returns subjects for all available languages.
EmailTemplate.from
● EmailSender!
non-null object
Email sender contact information.
Sender details including email address and display name used in the 'From' field of outgoing emails.
EmailTemplate.tos
● [EmailContact!]
list object
Primary email recipient contact information.
List of primary recipients who will receive the email in their main inbox, visible to all recipients.
EmailTemplate.ccs
● [EmailContact!]
list object
Carbon copy email recipient contacts.
List of secondary recipients who will receive a copy of the email, visible to all recipients as CC recipients.
EmailTemplate.bccs
● [EmailContact!]
list object
Blind carbon copy email recipient contacts.
List of hidden recipients who will receive a copy of the email without being visible to other recipients.
EmailTemplate.attachments
● [DocumentTemplate!]
list object
Document templates to include as email attachments.
List of document templates that will be rendered and attached to the email when sent, supporting dynamic document generation.
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
emailTemplateAddAttachment
mutation ● emailTemplateCreate
mutation ● emailTemplateRemoveAttachment
mutation ● emailTemplateUpdate
mutation