Liquid Script
Liquid Script is an open source scripting language that can be used to personalize content in an email. You can use any data point within Blueshift to conditionally hide, show, or modify content in an email allowing you to create campaigns that dynamically adapt to the customer.
For more information beyond the basics covered here, visit the Liquid Script External Wiki.
Topics
Personalization
Date
{{Â "now"| date:Â "%m/%d/%Y"Â }}Â
Note: For additional options visit http://strftime.net/Â
Default
{{ Object | default: "My Default" }}Â
First, Last, & Email
{{ user.firstname }}
{{ user.lastname }}
{{ user.email }}
User Transactions (Advantage Data Objects)
Note: For a list of available advantage data objects, please see the Data Object Map.
Whitespace Control
Assigning a Value to a Variable
Output:Â Â
This is some value
Template and Shared Asset Logic
The following markup examples are shown using the list_code data object mapped from Advantage to Blueshift. You can use any data object available to create dynamic content within a template. You can also use values assigned to variables within other liquid script markup. Liquid script values can be passed between templates and shared assets in both directions. You can also pass values from one shared asset to another as long as both are used within the same template.
Note:Â When using transaction data in your logic, the list, publication, or product you have starred in your advanced segment will be referenced. For more information, please see Creating Advanced Segments.Â
Using IF Statements
Using SWITCH Statements
Using CAPTURE Statements
Output:Â Â
Hi Jane,
Thank you for subscribing. To login, visit our website.