Skip to main content

Liquid (to create conditions)

Thanks to Liquid language, you can customize 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 Shipup are to trigger a specific message:

  • By carrier

  • By country or city

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

🎥 The video to the left will give you a quick tutorial!


Add variables

These will be automatically replaced by their true attributes.

Examples:

  • By adding the "carrier.code" variable, the name of the carrier you've 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" %} BLAH BLAH {% endif %}

    👉 If the carrier is UPS, then the text "BLAH BLAH" will be displayed (and only if the shipment is UPS).

Using operators

No, we're not talking about phone operators, but logical operators! These 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 "=="