The ./settings.json
file in the project root directory stores the email template settings. Depending on the email template type, the default configuration of the settings.json
file can vary.
Consider the settings.json
file structure of the scaffolding and master email templates.
Scaffolding email template settings
When initializing the scaffolding email template, you can find the following default configuration of the settings.json
file:
{ "name": "email", "id": "125bee40-fc9d-4ffb-adaf-2b047168843a", "localization": { "current": "eng", "original": "", "langs": [ "eng" ] }, "browserslist": ["last 2 versions"],}
Field | Description |
| The email template name. |
| The unique ID of the created email. |
| Information about the email template localization and current language, which is automatically set as English. |
| The settings for the email template compatibility with the email client versions. For more information, see the Browserslist configuration syntax. |
Master email template settings
You can create the email template for a specific brand, language, country, and target system. For this, add the relevant fields to the settings.json
file and set the required values.
For example, let's create a Viseven email template with the following configuration:
{ "name": "Viseven Default eMail", "id": "41bddf687d7b3691a68f180bd999ddc3", "metadata": { "purpose": { "default": "invitation", "current": "follow-up" } }, "localization": { "current": "deu", "original": "eng", "langs": ["eng"], "country": "Germany" }, "browserslist": ["last 2 versions"], "screenshoter": { "asImageInPdf": true }, "app": "./App.vue", "targetCLM": { "name": "Veeva Vault", "code": "veeva" }, "theme": "Viseven", "templateType": "Broadcast", "templateSubType": "SFMC", "assetsGroup": { "blocks": "Viseven", "components": "broadcast" }, "writeFrameworkVersion": false, "content": { "automaticLink": false }, "fonts": { "alternative": "Helvetica, sans-serif", "external": [ "Arial", { "name": "Custom Font", "fontFamily": "Noto Sans", "alternative": "" } ] }, "optimization": { "maxImageWidth": 640, "minifyClassesFilter": [ "block", "break-columns", "button-container", "button-text", "wiz-title", "root" ] }, "uncss": { "ignore": [ "/\\.block/", "/\\.break-columns/", "/\\.button-container/", "/\\.root/" ] }, "information": { "brand": "5e78d93f5555f900088d5990" } }
Field | Description |
| The purpose of the email. It defines the display of default blocks in the email template. |
| Information about the email template languages and localizations. In this email template, German ( |
| The settings for the email template compatibility with the email client versions. For more information, see the Browserslist configuration syntax. |
| Set to |
| Information about the email template country. Here, the value is set to |
| The path to |
| Information about the target system of the email template. In this example, it's set to |
| Information about the current theme. The theme configurations are stored in the |
| The deprecated field that indicated the email template type. The |
| The deprecated field that indicated the target system of the email template. The |
| Information about configuration of blocks, components, and modules in the |
| The manually created list of classes with the names that must remain unchanged after the email build optimization. The list of classes can be updated by eWizard.js when exporting a Veeva Vault build. For more information, see Optimize an email Veeva Vault build |
| Specify the image width in pixels to reduce its size in the resulting email build. By default, eWizard.js reduces the image width to 1400 pixels. |
| A list of classes that are required for the Veeva Vault build. For more information, see Optimize an email Veeva Vault build |
| Information about the brand of the email template. |
| Set to |
| Set to |
| The settings for the custom fonts to be available in the eWizard Editor text properties. Use the |
TIP: The name
, localization
, country
, targetCLM
, and brand
values match the email metadata selected in the Create new pop-up in eWizard Library.
For more information about the general email template settings stored in the .ewizard/settings.json
file, see Directory structure.
Settings API in the theme settings
In the email projects that don't use dynamic themes, you can use the settings API getRaw method to pass the fields from the ./settings.json
file. This method ensures the email theme settings use the specified fields from the ./settings.json
file without rebuilding the email project.
Usage example
For example, you can return the value of the target system code
field in the email theme index.js
file. Then, you can use this value for the tokens
field settings.
// ./themes/theme1/index.jsimport theme from './theme.scss';export default function({ settings: SettingsAPI }) { const settings = SettingsAPI.getRaw();const template = { subType: settings.targetCLM.code ? settings.targetCLM.code : 'oce-sales', theme: settings.theme, country: settings.country }; const tokens = { recipientFirstnameTokens: { "sfmc": "#", "oce-sales": "#{{recipient.firstname}}", "veeva": "#{{accFname}}", "mailchimp": "#" } };const links = { recipientFirstnameTokens: tokens.recipientFirstnameTokens[template.subType] } }
V: -pre eWizard.js uses recipientFirstnameTokens
depending on the target system. For the oce-sales
target system, use the #{{recipient.firstname}}
value. When you add this token to the wiz-text
component in the email App.vue
file, you see the first name of the email recipient in the resulting HTML output.
The getRaw
method returns the non-interpolated values (tokens) from the ./settings.json
file. You can change the target system code in the ./settings.json
file or select another target system in the email details in eWizard.
For more information, see Merge tags and Settings API.