NewStore uses customizable document templates to generate digital or print communication for customers during order placement, checkout, shipping, and processing.
In NewStore, you can render templates into 2 types of documents: HTML and text. You can also convert some of these documents into PDF format for printing. For example, financial and fulfillment documents are converted to PDF when a printout is requested.
To generate templates, you can either use the
Templates Editor in
NewStore Omnichannel Manager, or create templates programmatically via an API.
NewStore only supports templates that are less than 1 MB in size. Documents exceeding this size are not generated.
Template types and properties
Depending on the document type to generate from a template, you may have to work with one or more templates. For example, email templates are divided into a subject template and an email body template.
Push notification templates are typically in JSON format and SMS templates are typically a string.
Each template has pre-defined properties. The properties depend on the template type. For example, some templates do not allow you to display the payment method used for an order.
Customizing a template
Once you know the properties and identifiers that you want to update in your template, you can start customizing it.
To update certain documents to be generated correctly, you may have to
update more than one template using the
Templates Editor. For more
information on which templates are to be used or updated to send
specific documents or notifications to customers, see this table .
For example, for emails to be sent to the customer for a successful refund, use or update the following templates:
To update a template:
Templatedrop-down menu, select the template that you want to update.
Output Typedrop-down menu, select if you want the output to be in HTML or PDF format.
Localedrop-down menu, select the
localefor which you want to update the template.
Templatetab of the editor, make any required changes to the content of the template.
Schematab of the editor, check the JSON Schema for validating the data before rendering the template.
To view the properties that the selected template contains, select the
Sample Datatab in the editor. You can use this tab as a reference to make changes in the
Sample Datatab also displays example data for each property that the template contains.
Helper functionstab of the editor, read more about Jinja custom functions and filters for Templates-API.
To preview the template, select the
Previewtab of the editor.
If you have selected
To compare the changes made to the original version of the template with the current version, select the
Show Difftab of the editor.
The changes are displayed as highlighted text in the editor.
To verify the changes you have made to the template, in the
Show Difftab displays the changes in highlighted text. Ensure that you verify the changes made before moving on to the next step.
To publish the new template, in the
Publish new template.Important
Ensure that you know what you are doing. Once the changes to a template are published, you cannot undo them.