Document Template
# Introduction
We have created a templating feature where you can save document templates (docx, xlsx, pptx). You are also able to define template language and conditions under which this document will be fetched.
# Where to find email templates
The document templates are located in TALXIS Admin App -> Look & Feel Area -> Templates
# Template fields
Name | Type | Description |
---|---|---|
Name | Text | Name of the template. |
Entity Name | Text | Name of the entity where filter will be applied. |
Language Code | Text | Language Code in LCID format. |
File | File | HTML file produced by email designer. |
Query | Text | FetchXML query produced by query designer. |
Template ID (Deprecated) | Text | FetchXML query produced by query designer. |
Note
You need to enter entity name before saving the form for filtering to work correctly !
# Making templates
Before using templates you would first need to make them. We prepared documentation on that topic so please visit this pages:
- For excel templates visit Fill Excel Reapter Template and Fill Excel Template
- For word templates visit Fill Word Template
# Getting template from flow
There is child flow named talxis_getdocumentfigurationidandtemplates which gets recordId, entityName. Based on these parameters, template, where sent record (recordID you sent) suits query inside of it, will be returned.
If you get back template, you will get templateConfigurationId, fileFromTemplateIdField and fileFromDocumentFileField. fileFromDocumentFileField is encoded with Base64 so in order to get file content you will need to decode it to get pure HTML.
(Optional) If you have liquid tags in document to populate, you will need to use custom connector action. Depending on document type, approaches differentiate.
Once everything is done, you will have document ready
Note
If you are using liquid tags, check Shopify's docs (opens new window) to see what is possible to do with tags, but be aware that we are using DotLiquid (opens new window) and it doesn't have all Shopify's features implemented. To counter this, we have added DotLiquid.Extras (opens new window) filters, which should substitute missing functionalities.