Shared assets provides a convenient way to reuse snippets of code across multiple email templates. Re-using shared assets such as headers or footers across emails, allows you easily manage changes or updates while also simplifying template logic.
Common use-cases for shared assets include:
- Product Grids
- Promotion banners
You can define the shared asset once and reuse it across multiple templates. Each shared asset has its own unique tag, which can be used to reference a shared asset from the template.
Sample reference tag:
<shared_asset> header </shared_asset>
You can access shared assets here: https://app.getblueshift.com/dashboard#/app/shared_asset/index
This page lists all the shared assets. Against each shared-asset you can also see the list of templates where its being used:
Here is an example for building a Footer:
Simply enter the asset name, pick the asset type and enter the HTML. You would see a preview of HTML pasted. You can use user or recommendation variables, as well as Liquid logic within the shared asset.
Once you create the shared asset, note the "reference tag", which is used to refer the shared asset in email templates.
- You can create an email template which is composed of multiple shared assets.
- Shared assets support Liquid macros including user and recommendation variables.
- A shared asset cannot be deleted if it is being referenced in any templates.
removeoption on the shared asset listing page provides an option to delete a shared asset.
As an owner of a shared asset or an admin user, you can lock the asset so that other users can’t accidentally edit it. Other users can request edit access to your assets and you can unlock them as and when appropriate.
The functionality to lock/ unlock assets is available both on the shared asset index page and the shared assets detail page.
Contact email@example.com to enable this feature for your account.