What are Template Properties?
The Template Properties feature in Webpower helps you to maintain generic properties that can be seamlessly integrated into your email template(s). This powerful capability allows you to define and reuse dynamic content elements across different levels: license, brand, and campaign. It is possible to maintain these properties, and therefore indirectly your template, via API.
How to Set Up Template Properties?
GUI Setup:
To set up Template Properties, your user Role should have the corresponding role rights.
- Navigate to "Setup-> Properties".
- Click on Insert.
- Choose the desired level (license, brand, or campaign) for the property.
- Give the Property a name. This is the name that is referred to in the template code.
- Give the Property a value
- Click Ok
API Setup:
- In our API documentation, navigate to Property
- Utilize the provided API calls to add, update, or retrieve properties on License, Brand or Campaign level.
How to Use Template Properties?
Email Template Integration:
- In your email template, insert a property using the Twig syntax:
{{[level].[propertyname]}}
. - Webpower dynamically replaces the syntax with the corresponding property value based on the specified level.
Twig Examples:
License-level Property:
Welcome to {{license.company_name}}!
Our latest offer is {{license.special_offer}}.
Brand-level Property:
Discover the new {{brand.product_name}} collection!
Available now at {{brand.store_location}}.
Campaign-level Property:
Limited-time offer: {{campaign.discount_percentage}} off on all purchases!
Use code {{campaign.promo_code}} at checkout.
These examples showcase how easily you can personalize your email content using Template Properties at different levels. These properties can be adjusted over time using our API.
It is also possible to insert HTML code via a Property. In that case, you should refer to the Property in your Twig code including the |raw
filter. For example if your campaign Property value for homepage is:
<a href="https://www.spotler.com">Spotler Home Page</a>
You can use the following code in your template to display Spotler Home Page:
{{campaign.homepage|raw}}
For further details and more advanced use cases, consult your Account Manager or our Customer Success team.