Skip to main content

Types of templates

There are two kinds of templates: EmailTemplates and DocumentTemplates.

Both templates share a set of common fields:

FieldDescription
IDThe ID of the template, UUID v7 format
NamesThe display name of the template, per given language
ContentsA Handlebars template which outputs the HTML for the template, per given language
Custom QueryA custom GraphQL query that you can use to enrich the event payload data
Query variablesVariables used to execute the custom query. Supports Handlebars variables. The final result after rendering with Handlebars should be valid JSON. This is the only Handlebars field that is rendered only with the original event payload. Any other field with Handlebars support also includes the data fetched by the custom query

EmailTemplates

Email templates send an email based on the event payload and can be linked directly to an Event Action.

Email templates include additional fields:

FieldDescription
SubjectThe subject of the email, per given language. Supports Handlebars variables
FromThe sender of the email. Consists of an email address and a name (the name can be translated into multiple languages)
TosAn array of EmailContacts
CcsAn array of EmailContacts
BccsAn array of EmailContacts
AttachmentsAn array of document templates that will be rendered and attached as PDFs to the email

EmailContact

FieldDescription
EmailThe email address of the contact. Supports Handlebars variables
Name(optional) The display name of the contact. Supports Handlebars variables

DocumentTemplates

Document templates generate PDF documents based on the event payload. They can be added to an EmailTemplate as an attachment or generated from dedicated mutations like orderGetPDF and quoteGetPDF. These methods select the document template with isDefaultOrderPdf or isDefaultQuotePdf respectively.

FieldDescription
FileNamesThe proposed file name for the generated PDF document, per given language. Used as the file name when attached to an EmailTemplate and can be used in the Content-Disposition header when loading the template in the frontend
isDefaultOrderPdfIndicates this template will be used when generating an order PDF in the Propeller Backoffice or when calling the orderGetPDF mutation in the API
isDefaultQuotePdfIndicates this template will be used when generating a quote PDF in the Propeller Backoffice or when calling the quoteGetPDF mutation in the API