Skip to main content
Define Variable Node

The Define Variable Node lets you create custom variable with incoming data payloads using Shopify's Liquid Template Language

Updated today

What is this new node for?

The Define Variable node is a powerful new feature that lets you manipulate flow data in a much more flexible way than previously possible. Using the Liquid template language, you can modify or combine multiple existing variables (e.g. coming from a trigger) into new ones. For concrete examples and use cases, please read the section below.

Creating & configuring the Define Variable Node

To create a Define Variable Node, open the context menu and select "Define Variable". Similar to how the Condition Node lets you define 1-many rules, the Define Variable node lets you define 1-many variables.

First, give your Variables a name. This name lets you identify them easily later when you want to access them in message or webhook nodes. Next, click on "Add variable".

In the modal that appears, you can now type your Liquid code expression.

Once you hit save, we validate your Liquid code and display any syntax errors your code might have. If there are none, you are good to go 🤩.

🤓 We know this is a feature for power users, so if you need assistance with writing your Liquid code, please refer to the official documentation here, or contact your Customer Success manager. They are happy to help you ☺️

You can define an arbitrary amount of variables. If you want to remove one, simply click the trash bin icon in the gray box of the variable.

⚠️ The defined variables are only accessible in the scope of the flow in which they are created. If you want to persist them, please use the "Update contact" node to store it on a customer profile or use an outgoing webhook to send them to a third-party system.

Examples & Use Cases

Now, let's look at some real life examples to showcase the capabilities of this node type.

Accessing data in an array

Text & number modifications

Did this answer your question?