You've built a [Shopify Flow workflow](/content/blog/shopify-flow-guide/index.html) to tag high-value customers, but you quickly hit a wall. Flow's basic conditions can't check if an order total exceeds $100 _and_ the customer is from California _and_ it's their third purchase. You need Liquid.

Liquid is Shopify's templating language that transforms Shopify Flow from a simple automation tool into a powerful workflow engine. While Flow's visual builder handles basic tasks, Liquid lets you access nested data, perform calculations, build complex conditional logic, and create dynamic content—all without leaving Flow's interface.

In this comprehensive guide, you'll learn exactly how to use Liquid in Shopify Flow with 20+ copy-paste examples covering customer segmentation, order processing, inventory management, and advanced [multi-step workflows](/content/blog/shopify-flow-templates/index.html). Whether you're tagging customers based on lifetime value or routing orders by shipping speed, you'll find practical code you can implement today.

This guide is designed for Shopify store owners and developers who are actively using Flow and need to unlock advanced customization. No prior Liquid experience required—we'll start with basics and progress to advanced techniques.

## What is Liquid in Shopify Flow?

### Understanding Liquid

Liquid is Shopify's open-source templating language, originally created by Shopify founder Tobias Lütke in 2006 ( [https://shopify.github.io/liquid/](https://shopify.github.io/liquid/)). While it was initially designed to power Shopify themes and store customization, Shopify extended Liquid's capabilities to Flow in 2019, enabling merchants to build sophisticated automation workflows.

Think of Liquid as the programming layer that sits on top of Flow's visual builder. Where Flow's interface lets you click and select basic options, Liquid gives you direct access to your store's data structure. You can read order details, customer information, product attributes, and metafields—then manipulate that data using filters and conditional logic.

Liquid uses a simple syntax with three main components: objects (your data), filters (functions that transform data), and tags (logic and control flow). For example, `{{ order.total_price }}` is an object that outputs an order's total, while `{{ order.total_price | divided_by: 100 }}` applies a filter to convert Shopify's cent-based pricing to dollars.

The beauty of Liquid in Flow is that it runs server-side during workflow execution, meaning you can access real-time Shopify data without API calls or external integrations.

### Where Liquid appears in Flow

Liquid shows up in three specific places within Shopify Flow's workflow builder, each serving a distinct purpose:

**1. Condition steps (filtering logic)**

Use Liquid to evaluate whether a workflow should continue. For example, to identify high-value customers:

`{{ customer.amountSpent.amount > 10000 }}`

Flow conditions support basic true/false logic so you no longer need to write Liquid in order to control the routes. However, you will need to add as many condition steps as needed for your use case. This can get tedious for complex IF/ELSE logic.

**2. Action inputs (dynamic values)**

Insert Liquid into action fields to create dynamic content. Instead of a static tag like "new-customer," create tags like "3-orders" or "15-orders" automatically:

`{{ customer.ordersCount }}-orders`

**3. Variable definitions (data manipulation)**

Create custom variables using Liquid that you can reference later in your workflow. Calculate totals, format dates, or extract specific data points.

Here's a quick practical example that demonstrates Liquid's power:

`{{ order.totalPrice.amount | divided_by: 100 | round: 2 }}`

This single line of Liquid code converts Shopify's cent-based order total (e.g., 12599) into a readable dollar amount (125.99)—something you simply cannot do with Flow's visual builder alone. Without Liquid, you'd see order totals as "12599" instead of "$125.99" in your tags, emails, or notifications.

### Flow's visual helpers reduce (but don't eliminate) Liquid needs

Before diving into where you'll write Liquid code, it's important to know that the app now offers visual helpers for [common Flow tasks](/content/blog/shopify-flow-templates/index.html). When you click into action fields, you'll see a variable picker that lets you select objects (customer, order, product) from a dropdown menu. You can even apply basic filters visually without writing code.

Flow also includes built-in actions that handle common operations:

- **Count**: Counts items in a list (replaces manual loops for simple counting)
- **Sum**: Calculates totals (replaces manual arithmetic for basic sums)
- **For each**: Loops over items (replaces manual iteration for simple operations)
- **Log output**: Tests variables and Liquid code by adding them to the run log
- **Wait**: Delays workflow execution without complex date calculations

However, these visual helpers only work for straightforward tasks. Once you need complex conditional logic, custom calculations, or data transformations, you'll still need Liquid.

### Important: Flow uses GraphQL syntax

Shopify Flow's Liquid implementation uses GraphQL property names (camelCase), not the REST API syntax (snake_case) you might see in older Shopify documentation or theme Liquid.

What this means:

- ✅ Use `order.totalPrice` (not `order.total_price`)
- ✅ Use `order.lineItems` (not `order.line_items`)
- ✅ Use `customer.ordersCount` (not `customer.orders_count`)

How to find the right syntax: Click in any Flow input field and use the variable picker dropdown—it shows the exact property names Flow expects.

## Why use Liquid in Shopify Flow?

Shopify Flow's visual builder handles basic automation like "when order is created, add tag," but real-world ecommerce operations demand more sophistication. Liquid bridges the gap between Flow's simplicity and your business's complex needs. Here are five specific scenarios where Liquid becomes essential:

### 1. Access deeply nested data

Flow's variable picker shows available properties like `order.totalPriceSet.shopMoney.amount`, but you need Liquid to actually use these values in conditions, calculations, or dynamic tags. The visual interface can't combine multiple nested properties or extract specific data from complex objects.

- Access product metafield values for custom routing logic
- Tag orders over $500 from specific states
- Check if line items contain products from premium vendors
- Identify customers whose billing and shipping addresses don't match

### 2. Perform calculations Flow can't handle

While Flow includes Sum and Count actions for basic math, it can't do conditional calculations, percentages, or multi-step formulas. Any scenario requiring "calculate X, then use that result to determine Y" needs Liquid.

- Sum quantities across line items (not just count line item types)
- Calculate what percentage discount a customer received
- Determine average item price in an order
- Count only items matching specific criteria (e.g., items over $50)
- Calculate inventory value (quantity × price)

### 3. Format data for human readability

Shopify stores dates, prices, and other data in system-friendly formats. Liquid transforms these into text that makes sense in emails, Slack messages, and customer-facing content.

- Generate properly formatted addresses for shipping labels
- Convert timestamps to "January 07, 2026 at 2:30 PM"
- Format prices with currency symbols and proper decimals
- Create comma-separated lists of products
- Build readable variant descriptions ("T-Shirt - Large / Blue")

### 4. Build advanced conditional logic

Flow's visual condition builder works for simple checks, but complex multi-factor decisions require Liquid. When you need to evaluate several criteria together and output different results based on combinations, Liquid's if/elsif/else structure is essential.

- Flag orders requiring special handling based on combined factors
- Create dynamic customer tiers based on spend AND order frequency
- Route orders by region with custom shipping speed expectations
- Apply different tags based on multiple product attributes
- Segment customers by behavior patterns across multiple dimensions

### 5. Create dynamic, personalized content

Generate tags, notifications, and messages that include actual data values rather than generic text. This makes automation feel less robotic and more tailored to each customer or order.

- Create tags like "spent-$1,250" instead of generic "high-value"
- Build personalized greetings that change by time of day
- Generate notifications with specific product names and quantities
- Create order summaries with actual item details
- Tag customers with their exact order count ("15-orders")

### Liquid examples summary

These 26 examples cover the most common Shopify Flow automation scenarios. Start with the simpler customer and order examples (1-12), then progress to product inventory (13-16) and advanced techniques (17-25) as you become more comfortable with Liquid syntax.

| # | Use case | Complexity | Where to use it |
| --- | --- | --- | --- |
| 1 | Tag customers by lifetime spend tiers | 🟡 Medium | Add customer tag action |
| 2 | Identify first-time customers | 🟢 Basic | Condition step |
| 3 | Check if customer is from specific region | 🟢 Basic | Condition step |
| 4 | Count customer tags | 🟢 Basic | Condition step |
| 5 | Create personalized greeting by time of day | 🟡 Medium | Email subject line or body |
| 6 | Calculate total item count across order | 🟡 Medium | Condition step or tag value |
| 7 | Check if order contains specific SKU | 🟡 Medium | Condition step |
| 8 | Calculate actual discount percentage applied | 🔴 Expert | Tag orders or analytics export |
| 9 | Identify rush or express shipping | 🟢 Basic | Condition step |
| 10 | Format order date for human reading | 🟢 Basic | Email content, Slack notifications |
| 11 | Multi-condition order tagging | 🟡 Medium | Condition step before tag action |
| 12 | Check if order uses discount code | 🟢 Basic | Condition step |
| 13 | Low stock alert with safety threshold | 🟡 Medium | Condition before Slack/email alert |
| 14 | Calculate total inventory value | 🟡 Medium | Google Sheets export |
| 15 | Check product type for routing | 🟢 Basic | Condition step |
| 16 | Format product variant with title | 🟢 Basic | Custom notifications, reports |
| 17 | Dynamic customer segmentation engine | 🔴 Expert | Customer tag action |
| 18 | Regional shipping speed classification | 🟡 Medium | Order tag action |
| 19 | Calculate days since customer's last order | 🔴 Expert | Condition step for re-engagement |
| 20 | Access product metafield values | 🟢 Basic | Condition step or tag value |
| 21 | Count high-value items in order | 🔴 Expert | Condition step |
| 22 | Check if customer phone number exists | 🟢 Basic | Condition before SMS actions |
| 23 | Extract order number for clean formatting | 🟢 Basic | External integrations, reporting |
| 24 | Check if order has customer notes | 🟢 Basic | Condition step |
| 25 | Calculate average item price in order | 🔴 Expert | Tag orders or analytics |
| 26 | Use Log output action to test your Liquid | 🟢 Basic | Log output action (testing) |

---   
 
**Note**: This content is meant for Shopify store owners and developers who are actively using Flow and need to unlock advanced customization. Liquid is powerful but does require some coding knowledge.
