Managing Template Variables
You can view, add, modify, and delete template variables for each scope defined in the system by using the Settings application.
Template variables can be used for things like Company Name, Trademarks ™, Registered Trademarks ®, and 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.
The Company Name template variable is supplied, as an example, with Orckestra Commerce Cloud by default.
You can view the Company Name template variable contents in Settings > Administration > Template Variables.
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 a specific syntax format 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 are generated by the system and can be dynamic. |
• | Template variables are created by the user and are static. |
The syntax that is used to insert a template variable in a template is as follows: {{Variables.VarName}}
.
For example, if you want to use the variable CompanyName, you would write: {{Variables.CompanyName}}
.
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 |
Variable examples:
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.
You cannot create or manage system variables, they are system internals that cannot be modified.
REFERENCES
• | Viewing Template Variables |
• | Adding Template Variables |
• | Modifying Template Variables |
• | Deleting Template Variables |
• | Template Variables Details Panel |
• | DotLiquid templating system for .net |