Managing Template Variables
You can view, add, modify, and delete template variables for each scope defined in the system by using the Settings application in the Template Variables section. Template variables can be used for things like Company Name, Trademarks ™, Registered Trademarks ®, Copyright © statements, Sender details, and Newsletters. This is particularly useful when you need to set up variables that can be used by scope, language, or for legal variations in different countries or cultures.
When supporting multiple brands through different scopes, use variables to customize your brands.
Using template variables in an email template
You can use variables in templates by inserting place holders in the content of a template. These place holders must comply with DotLiquid templating system for .NET and refer to the variable name.
When the system uses a template, the system replaces the place holder with the content of the variable.
There are two types of variables:
• | System variables that are generated by the system and can be dynamic |
• | Template variables that are created by the user and are static |
The syntax that is used to insert a template variable is as follows: {{Variables.VarName}}
.
For example, if you want to use the variable CompanyName, you would write: {{Variables.CompanyName}}
.
Important: using a system or template variable inside another template variable is not supported
The variable value is determined by the scope, language, and inheritance of the variable. The value that is used is determined by using these criteria in the following order:
• | Scope and language |
• | Scope default language |
• | Parent scope language |
• | Parent scope default language |
Here are some example variables as they might be seen when viewed in email templates:
Sender Display Name{{Variables.CompanyName}}
- This is a template variable.
Receiver Display Name {{Customer.FirstName}} {{Customer.LastName}}
- This is a Orckestra Commerce Cloud system variable.
Important: you cannot create or manage system variables, they are system internals that cannot be modified
Viewing Template Variables
You can view the variables your templates can use in the Template Variables section of the Settings application. To find a variable, you can look for it by name in the search bar at the top of the page.
Note: you can change the scope you are searching for the variable in at the top right of the page
Adding Template Variables
To add a new template variable click the Add Variable button in the top-right of the Template Variables section.
Once done, click the Save.
Modifying Template Variables
To modify an existing template variable you must first select it from the Template Variables section of the Settings application. This will open a new tab showing all fields of that variable which you'll be able to edit. After you've made your changes, click Save.
Deleting Template Variables
Important: you cannot delete template variables
REFERENCES
• | About Templates |
• | Managing Email Templates |