Skip to main content

Liquid

The Liquid language allows you to customise all your notifications by integrating variables such as {{shop.name}} or {{carrier.code}}, as triggers, or to display their values.

The most frequent uses of Liquid in ZigZag are to trigger a specific message:

  • By carrier
  • By country or city
  • By shipping method, such as multi-package or click & collect

Where to use Liquid

Liquid can be integrated into any text field featuring the 💧 icon.
  • Notifications (subject, title and body)
  • Email templates (promotional/incident banners, text, and footer)
  • Tracking page (promotional banner widgets with text content)
  • SMS(SMS content)
  • Zendesk or Gorgias ticket (subject, content of the internal note, and tags)
  • Klaviyo and Customer.io channels (subject, title, and body)

Add variables

These will be automatically replaced by their true attributes.
Examples:

  • By adding the carrier.code variable, the name of the carrier you have specified will be displayed in the notification content.
  • By adding the order.first_name variable, the first name of the person who placed the order will be displayed.

Add conditions

Conditional tags determine which block of code is to be executed.
Example:

  • Using the condition: {% if carrier.code == "ups" %} DISPLAY TEXT {% endif %} If the carrier is UPS, then the text "DISPLAY TEXT" will be displayed (and only if the shipment is UPS).

Using operators

Logical operators are used to define the logic within conditional tags.
Example:

  • In the example used in Add conditions, we had to indicate that the value carrier.code should be equal to "ups" The operator is what makes it possible to say "is equal to".
    "Is equal to" is written "=="