{"id":17718,"date":"2026-01-09T21:53:06","date_gmt":"2026-01-09T21:53:06","guid":{"rendered":"https:\/\/www.getmesa.com/blog\/?p=17718"},"modified":"2026-03-31T15:14:52","modified_gmt":"2026-03-31T15:14:52","slug":"using-liquid-in-shopify-flow","status":"publish","type":"post","link":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/","title":{"rendered":"How to Use Liquid in Shopify Flow: 20+ Copy-Paste Examples for Real Workflows"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You&#8217;ve built a <a href=\"https:\/\/www.getmesa.com/blog\/shopify-flow-guide\/\" type=\"post\" id=\"17978\">Shopify Flow workflow<\/a> to tag high-value customers, but you quickly hit a wall. Flow&#8217;s basic conditions can&#8217;t check if an order total exceeds $100 <em>and<\/em> the customer is from California <em>and<\/em> it&#8217;s their third purchase. You need Liquid.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Liquid is Shopify&#8217;s templating language that transforms Shopify Flow from a simple automation tool into a powerful workflow engine. While Flow&#8217;s visual builder handles basic tasks, Liquid lets you access nested data, perform calculations, build complex conditional logic, and create dynamic content\u2014all without leaving Flow&#8217;s interface.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-flow-liquid-logic-for-google-sheets-1024x583.png\" alt=\"Liquid code in Shopify Flow condition step accessing order data\" class=\"wp-image-17721\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-liquid-logic-for-google-sheets-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-liquid-logic-for-google-sheets-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-liquid-logic-for-google-sheets-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-liquid-logic-for-google-sheets-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-liquid-logic-for-google-sheets-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In this comprehensive guide, you&#8217;ll learn exactly how to use Liquid in Shopify Flow with 20+ copy-paste examples covering customer segmentation, order processing, inventory management, and advanced <a href=\"https:\/\/www.getmesa.com\/blog\/shopify-flow-templates\/\">multi-step workflows<\/a>. Whether you&#8217;re tagging customers based on lifetime value or routing orders by shipping speed, you&#8217;ll find practical code you can implement today.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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\u2014we&#8217;ll start with basics and progress to advanced techniques.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: While Liquid is powerful, it does require some coding knowledge. If you prefer visual, no-code solutions, we&#8217;ll show you how <a href=\"https:\/\/www.getmesa.com\/blog\/shopify-flow-vs-mesa\/\">Shopify Flow vs MESA comparison<\/a> handles these same workflows without syntax at the end of this article.<\/p>\n\n\n\n<div class=\"wp-block-group inline-cta\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\"><strong>\ud83d\udcd8<\/strong> For a complete overview, see our <strong><a href=\"https:\/\/www.getmesa.com/blog\/shopify-flow-guide\/\" type=\"post\" id=\"17978\">Complete Shopify Flow Guide<\/a><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Related guides in this series:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.getmesa.com/blog\/shopify-flow-examples\/\" type=\"post\" id=\"17840\">Shopify Flow Examples: 15 Workflows to Automate Your Store<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.getmesa.com/blog\/shopify-flow-templates\/\" type=\"post\" id=\"17605\">50+ Best Shopify Flow Templates to Install Right Now<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.getmesa.com/blog\/shopify-flow-triggers\/\" type=\"post\" id=\"17899\">Shopify Flow Triggers: Complete Guide to Every Available Trigger<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.getmesa.com/blog\/how-to-extend-shopify-flow\/\" type=\"post\" id=\"4314\">How to Extend Shopify Flow: Connect Any App in Both Directions<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents:<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#What-is-Liquid-in-Shopify-Flow\" >What is Liquid in Shopify Flow?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Understanding-Liquid\" >Understanding Liquid<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Where-Liquid-appears-in-Flow\" >Where Liquid appears in Flow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Flows-visual-helpers-reduce-but-dont-eliminate-Liquid-needs\" >Flow&#8217;s visual helpers reduce (but don&#8217;t eliminate) Liquid needs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Important-Flow-uses-GraphQL-syntax\" >Important: Flow uses GraphQL syntax<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Why-use-Liquid-in-Shopify-Flow\" >Why use Liquid in Shopify Flow?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#1-Access-deeply-nested-data\" >1. Access deeply nested data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#2-Perform-calculations-Flow-cant-handle\" >2. Perform calculations Flow can&#8217;t handle<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#3-Format-data-for-human-readability\" >3. Format data for human readability<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#4-Build-advanced-conditional-logic\" >4. Build advanced conditional logic<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#5-Create-dynamic-personalized-content\" >5. Create dynamic, personalized content<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#When-Flows-visual-tools-are-enough\" >When Flow&#8217;s visual tools are enough<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#20-practical-Liquid-examples-for-Shopify-Flow\" >20+ practical Liquid examples for Shopify Flow<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Customer-workflows\" >Customer workflows<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Order-workflows\" >Order workflows<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Product-and-inventory-workflows\" >Product and inventory workflows<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Advanced-multi-step-logic\" >Advanced multi-step logic<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#More-popular-examples\" >More popular examples<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Liquid-examples-summary\" >Liquid examples summary<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Common-Liquid-mistakes-in-Shopify-Flow\" >Common Liquid mistakes in Shopify Flow<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Mistake-1-Treating-GraphQL-prices-like-REST-API-prices\" >Mistake #1: Treating GraphQL prices like REST API prices<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Mistake-2-Typing-GraphQL-paths-manually-instead-of-using-variable-picker\" >Mistake #2: Typing GraphQL paths manually instead of using variable picker<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Mistake-3-Case-sensitive-tag-and-text-comparisons\" >Mistake #3: Case-sensitive tag and text comparisons<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Mistake-4-Not-handling-null-or-empty-values\" >Mistake #4: Not handling null or empty values<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Mistake-5-Overly-complex-nested-conditions\" >Mistake #5: Overly complex nested conditions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Mistake-6-Forgetting-GraphQL-uses-edges-and-nodes-for-arrays\" >Mistake #6: Forgetting GraphQL uses edges and nodes for arrays<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Mistake-7-Not-testing-before-going-live\" >Mistake #7: Not testing before going live<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Mistake-8-Confusing-Flows-For-each-variables-with-Liquid-loop-variables\" >Mistake #8: Confusing Flow&#8217;s For each variables with Liquid loop variables<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Test-your-Liquid-code-before-deploying\" >Test your Liquid code before deploying<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#%F0%9F%A7%AA-Liquid-Syntax-Checker\" >\ud83e\uddea Liquid Syntax Checker<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Liquid-limitations-in-Shopify-Flow\" >Liquid limitations in Shopify Flow<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-32\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#What-Liquid-itself-cannot-do\" >What Liquid itself cannot do<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-33\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#How-Flows-built-in-actions-help-but-dont-solve-everything\" >How Flow&#8217;s built-in actions help (but don&#8217;t solve everything)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-34\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Real-world-challenges-that-remain\" >Real-world challenges that remain<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-35\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Testing-and-debugging-limitations\" >Testing and debugging limitations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-36\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Performance-considerations\" >Performance considerations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-37\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#When-these-limitations-matter\" >When these limitations matter<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-38\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#MESA-vs-Shopify-Flow-limitations\" >MESA vs Shopify Flow limitations<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-39\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Frequently-asked-questions\" >Frequently asked questions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-40\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#When-to-use-Liquid-vs-when-to-use-MESA\" >When to use Liquid vs when to use MESA<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-41\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Use-Liquid-in-Flow-when\" >Use Liquid in Flow when:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-42\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Consider-MESA-instead-when\" >Consider MESA instead when:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-43\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Real-customer-experiences\" >Real customer experiences<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-44\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#The-practical-decision-framework\" >The practical decision framework<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-45\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-what-is-liquid-in-shopify-flow\"><span class=\"ez-toc-section\" id=\"What-is-Liquid-in-Shopify-Flow\"><\/span>What is Liquid in Shopify Flow?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<figure class=\"wp-block-post-featured-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1584\" height=\"819\" src=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow.png\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"using liquid in shopify flow\" style=\"object-fit:cover;\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow.png 1584w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow-300x155.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow-1024x529.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow-768x397.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow-1536x794.png 1536w\" sizes=\"auto, (max-width: 1584px) 100vw, 1584px\" \/><\/figure>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-understanding-liquid\"><span class=\"ez-toc-section\" id=\"Understanding-Liquid\"><\/span>Understanding Liquid<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Liquid is Shopify&#8217;s open-source templating language, originally created by Shopify founder Tobias L\u00fctke in 2006 (<a href=\"https:\/\/shopify.github.io\/liquid\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/shopify.github.io\/liquid\/<\/a>). While it was initially designed to power Shopify themes and store customization, Shopify extended Liquid&#8217;s capabilities to Flow in 2019, enabling merchants to build sophisticated automation workflows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of Liquid as the programming layer that sits on top of Flow&#8217;s visual builder. Where Flow&#8217;s interface lets you click and select basic options, Liquid gives you direct access to your store&#8217;s data structure. You can read order details, customer information, product attributes, and metafields\u2014then manipulate that data using filters and conditional logic.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"256\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/diagram-shopify-flow-liquid-1024x256.png\" alt=\"Simple diagram showing &quot;Visual Flow Builder&quot; + &quot;Liquid Code Layer&quot; = &quot;Advanced Automation Capabilities&quot;\" class=\"wp-image-17739\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/diagram-shopify-flow-liquid-1024x256.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/diagram-shopify-flow-liquid-300x75.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/diagram-shopify-flow-liquid-768x192.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/diagram-shopify-flow-liquid-1536x384.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/diagram-shopify-flow-liquid.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">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, <code>{{ order.total_price }}<\/code> is an object that outputs an order&#8217;s total, while <code>{{ order.total_price | divided_by: 100 }}<\/code> applies a filter to convert Shopify&#8217;s cent-based pricing to dollars.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-where-liquid-appears-in-flow\"><span class=\"ez-toc-section\" id=\"Where-Liquid-appears-in-Flow\"><\/span>Where Liquid appears in Flow<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Liquid shows up in three specific places within Shopify Flow&#8217;s workflow builder, each serving a distinct purpose:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Condition steps (filtering logic)<\/strong><br>Use Liquid to evaluate whether a workflow should continue. For example, to identify high-value customers: <br><code>{{ customer.amountSpent.amount &gt; 10000 }}<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/flow-condition-fields-1024x583.png\" alt=\"flow conditions step with field showing how liquid is used\" class=\"wp-image-17751\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-condition-fields-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-condition-fields-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-condition-fields-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-condition-fields-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-condition-fields-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Action inputs (dynamic values)<\/strong><br>Insert Liquid into action fields to create dynamic content. Instead of a static tag like &#8220;new-customer,&#8221; create tags like &#8220;3-orders&#8221; or &#8220;15-orders&#8221; automatically: <br><code>{{ customer.ordersCount }}-orders<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-flow-dynamic-values-1024x583.png\" alt=\"Screenshot showing a Flow condition step with Liquid code in the condition field\" class=\"wp-image-17726\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-dynamic-values-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-dynamic-values-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-dynamic-values-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-dynamic-values-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-dynamic-values-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Variable definitions (data manipulation)<\/strong><br>Create custom variables using Liquid that you can reference later in your workflow. Calculate totals, format dates, or extract specific data points.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s a quick practical example that demonstrates Liquid&#8217;s power:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>{{ order.totalPrice.amount | divided_by: 100 | round: 2 }}<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This single line of Liquid code converts Shopify&#8217;s cent-based order total (e.g., 12599) into a readable dollar amount (125.99)\u2014something you simply cannot do with Flow&#8217;s visual builder alone. Without Liquid, you&#8217;d see order totals as &#8220;12599&#8221; instead of &#8220;$125.99&#8221; in your tags, emails, or notifications.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/flow-liquid-variable-definitions-1024x583.png\" alt=\"flow liquid variable definitions\" class=\"wp-image-17795\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-liquid-variable-definitions-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-liquid-variable-definitions-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-liquid-variable-definitions-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-liquid-variable-definitions-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-liquid-variable-definitions-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-flow-s-visual-helpers-reduce-but-don-t-eliminate-liquid-needs\"><span class=\"ez-toc-section\" id=\"Flows-visual-helpers-reduce-but-dont-eliminate-Liquid-needs\"><\/span>Flow&#8217;s visual helpers reduce (but don&#8217;t eliminate) Liquid needs<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before diving into where you&#8217;ll write Liquid code, it&#8217;s important to know that the app now offers visual helpers for <a href=\"https:\/\/www.getmesa.com\/blog\/shopify-flow-templates\/\">common Flow tasks<\/a>. When you click into action fields, you&#8217;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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-flow-liquid-fields-1024x583.png\" alt=\"Screenshot showing the variable picker dropdown UI in Flow\" class=\"wp-image-17743\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-liquid-fields-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-liquid-fields-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-liquid-fields-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-liquid-fields-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-liquid-fields-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Flow also includes built-in actions that handle common operations:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Count<\/strong>: Counts items in a list (replaces manual loops for simple counting)<\/li>\n\n\n\n<li><strong>Sum<\/strong>: Calculates totals (replaces manual arithmetic for basic sums)<\/li>\n\n\n\n<li><strong>For each<\/strong>: Loops over items (replaces manual iteration for simple operations)<\/li>\n\n\n\n<li><strong>Log output<\/strong>: Tests variables and Liquid code by adding them to the run log<\/li>\n\n\n\n<li><strong>Wait<\/strong>: Delays workflow execution without complex date calculations<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">However, these visual helpers only work for straightforward tasks. Once you need complex conditional logic, custom calculations, or data transformations, you&#8217;ll still need Liquid.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Important-Flow-uses-GraphQL-syntax\"><\/span><strong>Important: Flow uses GraphQL syntax<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Shopify Flow&#8217;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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What this means:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 Use <code>order.totalPrice<\/code> (not <code>order.total_price<\/code>)<\/li>\n\n\n\n<li>\u2705 Use <code>order.lineItems<\/code> (not <code>order.line_items<\/code>)<\/li>\n\n\n\n<li>\u2705 Use <code>customer.ordersCount<\/code> (not <code>customer.orders_count<\/code>)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">How to find the right syntax: Click in any Flow input field and use the variable picker dropdown\u2014it shows the exact property names Flow expects.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/flow-variable-picker-1024x583.png\" alt=\"Screenshot showing Flow's variable picker with GraphQL camelCase properties highlighted\" class=\"wp-image-17816\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-variable-picker-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-variable-picker-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-variable-picker-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-variable-picker-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-variable-picker-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why-use-Liquid-in-Shopify-Flow\"><\/span>Why use Liquid in Shopify Flow?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Shopify Flow&#8217;s visual builder handles basic automation like &#8220;when order is created, add tag,&#8221; but real-world ecommerce operations demand more sophistication. Liquid bridges the gap between Flow&#8217;s simplicity and your business&#8217;s complex needs. Here are five specific scenarios where Liquid becomes essential:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-access-deeply-nested-data\"><span class=\"ez-toc-section\" id=\"1-Access-deeply-nested-data\"><\/span>1. Access deeply nested data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Flow&#8217;s variable picker shows available properties like <code>order.totalPriceSet.shopMoney.amount<\/code>, but you need Liquid to actually use these values in conditions, calculations, or dynamic tags. The visual interface can&#8217;t combine multiple nested properties or extract specific data from complex objects.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access product metafield values for custom routing logic<\/li>\n\n\n\n<li>Tag orders over $500 from specific states<\/li>\n\n\n\n<li>Check if line items contain products from premium vendors<\/li>\n\n\n\n<li>Identify customers whose billing and shipping addresses don&#8217;t match<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-perform-calculations-flow-can-t-handle\"><span class=\"ez-toc-section\" id=\"2-Perform-calculations-Flow-cant-handle\"><\/span>2. Perform calculations Flow can&#8217;t handle<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">While Flow includes Sum and Count actions for basic math, it can&#8217;t do conditional calculations, percentages, or multi-step formulas. Any scenario requiring &#8220;calculate X, then use that result to determine Y&#8221; needs Liquid.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sum quantities across line items (not just count line item types)<\/li>\n\n\n\n<li>Calculate what percentage discount a customer received<\/li>\n\n\n\n<li>Determine average item price in an order<\/li>\n\n\n\n<li>Count only items matching specific criteria (e.g., items over $50)<\/li>\n\n\n\n<li>Calculate inventory value (quantity \u00d7 price)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-format-data-for-human-readability\"><span class=\"ez-toc-section\" id=\"3-Format-data-for-human-readability\"><\/span>3. Format data for human readability<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Generate properly formatted addresses for shipping labels<\/li>\n\n\n\n<li>Convert timestamps to &#8220;January 07, 2026 at 2:30 PM&#8221;<\/li>\n\n\n\n<li>Format prices with currency symbols and proper decimals<\/li>\n\n\n\n<li>Create comma-separated lists of products<\/li>\n\n\n\n<li>Build readable variant descriptions (&#8220;T-Shirt &#8211; Large \/ Blue&#8221;)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-build-advanced-conditional-logic\"><span class=\"ez-toc-section\" id=\"4-Build-advanced-conditional-logic\"><\/span>4. Build advanced conditional logic<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Flow&#8217;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&#8217;s if\/elsif\/else structure is essential.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Flag orders requiring special handling based on combined factors<\/li>\n\n\n\n<li>Create dynamic customer tiers based on spend AND order frequency<\/li>\n\n\n\n<li>Route orders by region with custom shipping speed expectations<\/li>\n\n\n\n<li>Apply different tags based on multiple product attributes<\/li>\n\n\n\n<li>Segment customers by behavior patterns across multiple dimensions<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-5-create-dynamic-personalized-content\"><span class=\"ez-toc-section\" id=\"5-Create-dynamic-personalized-content\"><\/span>5. Create dynamic, personalized content<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create tags like &#8220;spent-$1,250&#8221; instead of generic &#8220;high-value&#8221; <\/li>\n\n\n\n<li>Build personalized greetings that change by time of day <\/li>\n\n\n\n<li>Generate notifications with specific product names and quantities <\/li>\n\n\n\n<li>Create order summaries with actual item details <\/li>\n\n\n\n<li>Tag customers with their exact order count (&#8220;15-orders&#8221;)<\/li>\n<\/ul>\n\n\n\n<p class=\"inline-cta wp-block-paragraph\"><strong>Love Liquid?<\/strong> Be sure to check out Karl Meisterheim&#8217;s <a href=\"https:\/\/liquidweekly.com\/?ref=getmesa\" target=\"_blank\" rel=\"noreferrer noopener\">LiquidWeekly.com<\/a> for his email newsletter and podcast about all things Shopify Liquid.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When-Flows-visual-tools-are-enough\"><\/span>When Flow&#8217;s visual tools are enough<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You don&#8217;t always need Liquid. Flow&#8217;s visual builder handles simple operations well:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Basic tagging (add or remove single tag)<\/li>\n\n\n\n<li>Simple routing (if A then B)<\/li>\n\n\n\n<li>Flow&#8217;s For each action for identical operations on all items<\/li>\n\n\n\n<li>Sending standard notification text<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Use Liquid when you need:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Multiple data points combined in one decision<\/li>\n\n\n\n<li>Math beyond simple addition<\/li>\n\n\n\n<li>Conditional logic inside loops<\/li>\n\n\n\n<li>Human-readable formatting<\/li>\n\n\n\n<li>Dynamic content with actual data values<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"287\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/infographic-liquid-use-cases-1024x287.png\" alt=\"Infographic showing 5 icons representing each use case with one-line benefit statements\" class=\"wp-image-17738\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/infographic-liquid-use-cases-1024x287.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/infographic-liquid-use-cases-300x84.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/infographic-liquid-use-cases-768x215.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/infographic-liquid-use-cases.png 1500w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The following sections teach you Liquid&#8217;s syntax and provide 25+ copy-paste examples for these exact scenarios.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"20-practical-Liquid-examples-for-Shopify-Flow\"><\/span>20+ practical Liquid examples for Shopify Flow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Copy these examples directly into your Flow workflows. Each includes the exact code you need, where to paste it, and what it accomplishes. Start with customer and order examples, then progress to advanced techniques.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Customer-workflows\"><\/span>Customer workflows<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/flow-tag-customer-by-lifetime-spend-tiers-1024x583.png\" alt=\"Flow: tag customer by lifetime spend tiers\" class=\"wp-image-17800\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-tag-customer-by-lifetime-spend-tiers-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-tag-customer-by-lifetime-spend-tiers-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-tag-customer-by-lifetime-spend-tiers-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-tag-customer-by-lifetime-spend-tiers-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-tag-customer-by-lifetime-spend-tiers-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 1: Tag customers by lifetime spend tiers<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign customer_spent = customer.amountSpent.amount %}\n\n{% if customer_spent &gt; 1000 %}\n  platinum-customer\n{% elsif customer_spent &gt; 500 %}\n  gold-customer\n{% elsif customer_spent &gt; 100 %}\n  silver-customer\n{% else %}\n  standard-customer\n{% endif %}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Add customer tag action<\/li>\n\n\n\n<li><strong>Result<\/strong>: Automatically assigns tier tags based on lifetime spend<\/li>\n<\/ul>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>tag-shopify-customers-at-lifetime-spending-milestone<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"tag-shopify-customers-at-lifetime-spending-milestone\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\t\t<style>.mesa-template-backend {\n    background: rgba(139, 139, 150, 0.1);\n    padding: 22px;\n}\n\n.mesa-template-backend h5,\n.mesa-template-backend p {\n    margin: 0 0 5px;\n}\n\n.mesa-template-backend p {\n    font-size: 16px;\n}\n\n.mesa-template-backend p:last-child {\n    display: inline-block;\n    background: #fff;\n    padding: 5px 10px;\n}\n\n.mesa-template-backend p strong {\n    font-size: 12px;\n}<\/style>\n\t\t\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 2: Identify first-time customers<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ customer.ordersCount == 1 }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step (returns true or false)<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Trigger welcome workflows or first-purchase offers<\/li>\n<\/ul>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>create-unique-discount-codes-for-new-shopify-customers<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"create-unique-discount-codes-for-new-shopify-customers\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 3: Check if customer is from specific region<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ customer.defaultAddress.provinceCode == \"CA\" }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step<\/li>\n\n\n\n<li><strong>Combine with<\/strong>: Order value checks for regional VIP programs<\/li>\n<\/ul>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>tag-local-customers-by-store-proximity<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"tag-local-customers-by-store-proximity\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 4: Count customer tags<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ customer.tags | size }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step (e.g., check if <code>&gt; 5<\/code> tags)<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Flag over-tagged customers for cleanup<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 5: Create personalized greeting by time of day<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign hour = \"now\" | date: \"%H\" | plus: 0 %}\n{% if hour &lt; 12 %}\n  Good morning, {{ customer.firstName }}!\n{% elsif hour &lt; 18 %}\n  Good afternoon, {{ customer.firstName }}!\n{% else %}\n  Good evening, {{ customer.firstName }}!\n{% endif %}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Email subject or body (if Flow supports email actions)<\/li>\n\n\n\n<li><strong>Note<\/strong>: Time is UTC, not customer&#8217;s local timezone<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-order-workflows\"><span class=\"ez-toc-section\" id=\"Order-workflows\"><\/span>Order workflows<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/flow-order-workflow-liquid-logic-1024x583.png\" alt=\"flow workflow: order logic\" class=\"wp-image-17802\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-order-workflow-liquid-logic-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-order-workflow-liquid-logic-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-order-workflow-liquid-logic-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-order-workflow-liquid-logic-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-order-workflow-liquid-logic-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 6: Calculate total item quantity across order<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign total_quantity = 0 %}\n{% for edge in order.lineItems.edges %}\n  {% assign item = edge.node %}\n  {% assign total_quantity = total_quantity | plus: item.quantity %}\n{% endfor %}\n{{ total_quantity }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step or tag value<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Tag bulk orders with &#8220;10+ items&#8221; for special handling<\/li>\n\n\n\n<li><strong>Note<\/strong>: This counts total units ordered, not line item types<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 7: Check if order contains specific SKU<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign has_sku = false %}\n{% for edge in order.lineItems.edges %}\n  {% assign item = edge.node %}\n  {% if item.sku == \"PREMIUM-001\" %}\n    {% assign has_sku = true %}\n    {% break %}\n  {% endif %}\n{% endfor %}\n{{ has_sku }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Route orders with premium products to priority fulfillment<\/li>\n<\/ul>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>tag-shopify-customer-on-specific-product-purchase<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"tag-shopify-customer-on-specific-product-purchase\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 8: Calculate discount percentage applied<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign subtotal = order.subtotalPriceSet.shopMoney.amount %}\n{% assign total = order.totalPriceSet.shopMoney.amount %}\n{% assign discount = subtotal | minus: total %}\n{% assign percentage = discount | times: 100 | divided_by: subtotal %}\n{{ percentage | round }}%<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Tag orders or analytics export<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Track discount effectiveness, identify high-discount orders<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 9: Identify rush or express shipping<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ order.shippingLine.title contains \"Express\" or order.shippingLine.title contains \"Rush\" }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step for priority fulfillment<\/li>\n\n\n\n<li><strong>Customize<\/strong>: Adjust &#8220;Express&#8221; and &#8220;Rush&#8221; to match your shipping method names<\/li>\n<\/ul>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>tag-expedited-shipping-orders-shopify<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"tag-expedited-shipping-orders-shopify\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 10: Format order date for human reading<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ order.createdAt | date: \"%B %d, %Y at %I:%M %p\" }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Email content, Slack notifications, Google Sheets exports<\/li>\n\n\n\n<li><strong>Output<\/strong>: &#8220;January 07, 2026 at 02:30 PM&#8221;<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 11: Multi-condition order tagging<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign order_total = order.totalPriceSet.shopMoney.amount %}\n{% assign customer_tags = customer.tags %}\n{% assign country = order.shippingAddress.countryCode %}\n\n{% if order_total &gt; 100 and customer_tags contains \"wholesale\" and country == \"US\" %}\n  wholesale-bulk-domestic\n{% endif %}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step before adding tag<\/li>\n\n\n\n<li><strong>Combines<\/strong>: Order value + customer type + shipping destination<\/li>\n<\/ul>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>update-tax-exempt-status-on-company-location-from-customer-tag<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"update-tax-exempt-status-on-company-location-from-customer-tag\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 12: Check if order uses discount code<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ order.discountApplications | size &gt; 0 }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Track discount usage, flag orders for profitability review<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Product-and-inventory-workflows\"><\/span>Product and inventory workflows<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/flow-inventory-workflow-liquid-logic-1024x583.png\" alt=\"flow inventory liquid logic\" class=\"wp-image-17804\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-inventory-workflow-liquid-logic-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-inventory-workflow-liquid-logic-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-inventory-workflow-liquid-logic-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-inventory-workflow-liquid-logic-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-inventory-workflow-liquid-logic-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 13: Low stock alert with safety threshold<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign inventory = product.variants.edges.first.node.inventoryQuantity %}\n{% if inventory &lt; 10 and inventory &gt; 0 %}\n  true\n{% endif %}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition before Slack\/email notification<\/li>\n\n\n\n<li><strong>Prevents<\/strong>: Alerts for out-of-stock items (only alerts for 1-9 units)<\/li>\n<\/ul>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>send-slack-message-when-shopify-inventory-runs-low<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"send-slack-message-when-shopify-inventory-runs-low\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 14: Calculate inventory value<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign variant = product.variants.edges.first.node %}\n{% assign inventory = variant.inventoryQuantity %}\n{% assign price = variant.price %}\n{% assign value = inventory | times: price %}\n${{ value }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Google Sheets for inventory valuation reporting<\/li>\n\n\n\n<li><strong>Note<\/strong>: Works for single-variant products<\/li>\n<\/ul>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>shopify-product-inventory-google-sheets<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"shopify-product-inventory-google-sheets\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 15: Check product type for routing<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ product.productType == \"Apparel\" }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step for type-specific workflows<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Route apparel vs electronics to different fulfillment centers<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 16: Format product variant with title<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ product.title }} - {{ product.variants.edges.first.node.title }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Custom notifications, inventory reports<\/li>\n\n\n\n<li><strong>Output<\/strong>: &#8220;Classic T-Shirt &#8211; Large \/ Blue&#8221;<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Advanced-multi-step-logic\"><\/span>Advanced multi-step logic<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/flow-advanced-liquid-logic-1024x583.png\" alt=\"flow step: advanced liquid logic\" class=\"wp-image-17806\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-advanced-liquid-logic-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-advanced-liquid-logic-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-advanced-liquid-logic-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-advanced-liquid-logic-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-advanced-liquid-logic-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 17: Dynamic customer segmentation engine<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign spent = customer.amountSpent.amount %}\n{% assign orders = customer.ordersCount %}\n\n{% if spent &gt; 1000 and orders &gt; 20 %}\n  vip-frequent-buyer\n{% elsif spent &gt; 1000 %}\n  vip-whale\n{% elsif orders &gt; 20 %}\n  frequent-buyer\n{% elsif spent &gt; 100 %}\n  growing-customer\n{% else %}\n  standard-customer\n{% endif %}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Customer tagging workflow<\/li>\n\n\n\n<li><strong>Creates<\/strong>: Six distinct segments based on spend and frequency<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 18: Regional shipping speed classification<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign state = order.shippingAddress.provinceCode %}\n\n{% if state == \"CA\" or state == \"NV\" or state == \"OR\" or state == \"WA\" %}\n  west-coast-1-2-days\n{% elsif state == \"NY\" or state == \"NJ\" or state == \"CT\" or state == \"MA\" %}\n  east-coast-1-2-days\n{% elsif state == \"TX\" or state == \"AZ\" or state == \"NM\" %}\n  southwest-2-3-days\n{% else %}\n  standard-3-5-days\n{% endif %}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Order tagging for shipping expectations<\/li>\n\n\n\n<li><strong>Customize<\/strong>: Adjust states based on your warehouse locations<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 19: Calculate days since last order<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign last_order_date = customer.lastOrder.createdAt | date: \"%s\" %}\n{% assign current_date = \"now\" | date: \"%s\" %}\n{% assign seconds_diff = current_date | minus: last_order_date %}\n{% assign days = seconds_diff | divided_by: 86400 %}\n{{ days }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step (e.g., check if <code>&gt; 90<\/code> days)<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Trigger win-back campaigns for dormant customers<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 20: Access product metafield values<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ product.metafield.namespace.key }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step or tag value<\/li>\n\n\n\n<li><strong>Prerequisite<\/strong>: Metafield must exist in your store<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Route products based on custom priority levels<\/li>\n<\/ul>\n\n\n<div class=\"mesa-template-backend frontend-hidden\">\n    <p><strong>MESA Template ID<\/strong><\/p>\n    <p>add-customer-metafields-to-shopify-order-notes<\/p>\n<\/div>\n\n<div class=\"mesa-template\" data-template=\"add-customer-metafields-to-shopify-order-notes\"><\/div>\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 21: Count high-value items in order<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign high_value_count = 0 %}\n{% for edge in order.lineItems.edges %}\n  {% assign item = edge.node %}\n  {% assign item_price = item.originalTotalSet.shopMoney.amount %}\n  {% if item_price &gt; 100 %}\n    {% assign high_value_count = high_value_count | plus: 1 %}\n  {% endif %}\n{% endfor %}\n{{ high_value_count }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step (check if <code>&gt; 0<\/code>)<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Require signature confirmation, add insurance<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-more-popular-examples\"><span class=\"ez-toc-section\" id=\"More-popular-examples\"><\/span>More popular examples<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 22: Check if customer phone exists<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% if customer.phone != blank %}\n  true\n{% else %}\n  false\n{% endif %}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition before SMS notifications<\/li>\n\n\n\n<li><strong>Prevents<\/strong>: Errors from texting customers without phone numbers<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 23: Extract order number without prefix<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ order.name | remove: \"#\" }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: External system integrations<\/li>\n\n\n\n<li><strong>Converts<\/strong>: &#8220;#1001&#8221; to &#8220;1001&#8221;<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 24: Check if order has customer notes<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ order.note != blank }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Condition step to flag orders needing attention<\/li>\n\n\n\n<li><strong>Follow-up<\/strong>: Access note content with <code>{{ order.note }}<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 25: Calculate average item price in order<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign item_count = order.lineItems.edges | size %}\n{% assign order_total = order.totalPriceSet.shopMoney.amount %}\n{% assign avg_price = order_total | divided_by: item_count %}\n${{ avg_price | round: 2 }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Tag orders or analytics<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Segment orders by price tier for different fulfillment SLAs<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example 26: Test Liquid with Log output action<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Order: {{ order.name }}\nTotal: ${{ order.totalPriceSet.shopMoney.amount }}\nCustomer: {{ customer.firstName }} {{ customer.lastName }}\nItems: {{ order.lineItems.edges | size }}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use in<\/strong>: Flow&#8217;s &#8220;Log output&#8221; action<\/li>\n\n\n\n<li><strong>How<\/strong>: Add Log output step, paste code, check run history<\/li>\n\n\n\n<li><strong>Use case<\/strong>: Test your Liquid before using in actual tags or actions<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-liquid-examples-summary\"><span class=\"ez-toc-section\" id=\"Liquid-examples-summary\"><\/span>Liquid examples summary<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>#<\/th><th>Use case<\/th><th>Complexity<\/th><th>Where to use it<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>Tag customers by lifetime spend tiers<\/td><td>\ud83d\udfe1 Medium<\/td><td>Add customer tag action<\/td><\/tr><tr><td>2<\/td><td>Identify first-time customers<\/td><td>\ud83d\udfe2 Basic<\/td><td>Condition step<\/td><\/tr><tr><td>3<\/td><td>Check if customer is from specific region<\/td><td>\ud83d\udfe2 Basic<\/td><td>Condition step<\/td><\/tr><tr><td>4<\/td><td>Count customer tags<\/td><td>\ud83d\udfe2 Basic<\/td><td>Condition step<\/td><\/tr><tr><td>5<\/td><td>Create personalized greeting by time of day<\/td><td>\ud83d\udfe1 Medium<\/td><td>Email subject line or body<\/td><\/tr><tr><td>6<\/td><td>Calculate total item count across order<\/td><td>\ud83d\udfe1 Medium<\/td><td>Condition step or tag value<\/td><\/tr><tr><td>7<\/td><td>Check if order contains specific SKU<\/td><td>\ud83d\udfe1 Medium<\/td><td>Condition step<\/td><\/tr><tr><td>8<\/td><td>Calculate actual discount percentage applied<\/td><td>\ud83d\udd34 Expert<\/td><td>Tag orders or analytics export<\/td><\/tr><tr><td>9<\/td><td>Identify rush or express shipping<\/td><td>\ud83d\udfe2 Basic<\/td><td>Condition step<\/td><\/tr><tr><td>10<\/td><td>Format order date for human reading<\/td><td>\ud83d\udfe2 Basic<\/td><td>Email content, Slack notifications<\/td><\/tr><tr><td>11<\/td><td>Multi-condition order tagging<\/td><td>\ud83d\udfe1 Medium<\/td><td>Condition step before tag action<\/td><\/tr><tr><td>12<\/td><td>Check if order uses discount code<\/td><td>\ud83d\udfe2 Basic<\/td><td>Condition step<\/td><\/tr><tr><td>13<\/td><td>Low stock alert with safety threshold<\/td><td>\ud83d\udfe1 Medium<\/td><td>Condition before Slack\/email alert<\/td><\/tr><tr><td>14<\/td><td>Calculate total inventory value<\/td><td>\ud83d\udfe1 Medium<\/td><td>Google Sheets export<\/td><\/tr><tr><td>15<\/td><td>Check product type for routing<\/td><td>\ud83d\udfe2 Basic<\/td><td>Condition step<\/td><\/tr><tr><td>16<\/td><td>Format product variant with title<\/td><td>\ud83d\udfe2 Basic<\/td><td>Custom notifications, reports<\/td><\/tr><tr><td>17<\/td><td>Dynamic customer segmentation engine<\/td><td>\ud83d\udd34 Expert<\/td><td>Customer tag action<\/td><\/tr><tr><td>18<\/td><td>Regional shipping speed classification<\/td><td>\ud83d\udfe1 Medium<\/td><td>Order tag action<\/td><\/tr><tr><td>19<\/td><td>Calculate days since customer&#8217;s last order<\/td><td>\ud83d\udd34 Expert<\/td><td>Condition step for re-engagement<\/td><\/tr><tr><td>20<\/td><td>Access product metafield values<\/td><td>\ud83d\udfe2 Basic<\/td><td>Condition step or tag value<\/td><\/tr><tr><td>21<\/td><td>Count high-value items in order<\/td><td>\ud83d\udd34 Expert<\/td><td>Condition step<\/td><\/tr><tr><td>22<\/td><td>Check if customer phone number exists<\/td><td>\ud83d\udfe2 Basic<\/td><td>Condition before SMS actions<\/td><\/tr><tr><td>23<\/td><td>Extract order number for clean formatting<\/td><td>\ud83d\udfe2 Basic<\/td><td>External integrations, reporting<\/td><\/tr><tr><td>24<\/td><td>Check if order has customer notes<\/td><td>\ud83d\udfe2 Basic<\/td><td>Condition step<\/td><\/tr><tr><td>25<\/td><td>Calculate average item price in order<\/td><td>\ud83d\udd34 Expert<\/td><td>Tag orders or analytics<\/td><\/tr><tr><td>26<\/td><td>Use Log output action to test your Liquid<\/td><td>\ud83d\udfe2 Basic<\/td><td>Log output action (testing)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Remember: every example here can be combined with others. For instance, Example 1 (customer tiers) + Example 11 (multi-condition tagging) creates powerful segmentation. The real power of Liquid comes from mixing and matching these building blocks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the next section, we&#8217;ll cover the most common mistakes people make when implementing these examples\u2014and how to avoid them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Common-Liquid-mistakes-in-Shopify-Flow\"><\/span>Common Liquid mistakes in Shopify Flow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Even experienced developers make these mistakes when first using Liquid in Flow. Learn from these common errors to save hours of debugging.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mistake-1-Treating-GraphQL-prices-like-REST-API-prices\"><\/span>Mistake #1: Treating GraphQL prices like REST API prices<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;ve worked with Shopify&#8217;s REST API or theme Liquid before, you&#8217;re used to prices stored in cents. Flow&#8217;s GraphQL uses decimal format instead.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2705 Right: {% if order.totalPriceSet.shopMoney.amount &gt; 100 %}\n\u274c Wrong: {% if order.totalPriceSet.shopMoney.amount &gt; 10000 %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Why the first is right: GraphQL returns <code>125.99<\/code> for a $125.99 order. Comparing to <code>100<\/code> checks if the order exceeds $100.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The wrong version checks if the order is over $10,000 (treating the decimal as if it were 10,000 cents).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When this matters: Any price comparison in conditions\u2014order totals, customer lifetime spend, product prices, line item prices.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mistake-2-Typing-GraphQL-paths-manually-instead-of-using-variable-picker\"><\/span>Mistake #2: Typing GraphQL paths manually instead of using variable picker<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Flow&#8217;s GraphQL syntax is verbose. Typing <code>order.totalPriceSet.shopMoney.amount<\/code> by hand invites typos.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u274c Wrong (typo): {{ order.totalPrice.shopMoney.amount }}\n\u2705 Right: {{ order.totalPriceSet.shopMoney.amount }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">How to avoid: Always use Flow&#8217;s variable picker dropdown. Click in any field, browse to the property you need, and Flow inserts the exact syntax automatically.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/shopify-flow-variable-selector-1024x583.png\" alt=\"shopify flow variable picker\" class=\"wp-image-17734\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-variable-selector-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-variable-selector-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-variable-selector-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-variable-selector-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/shopify-flow-variable-selector-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Pro tip: For complex Liquid with multiple references to the same property, assign it to a simple variable name once:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign order_total = order.totalPriceSet.shopMoney.amount %}\n{% assign customer_spent = customer.amountSpent.amount %}\n\n{% if order_total &gt; 100 and customer_spent &gt; 1000 %}\n  vip-order\n{% endif %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This keeps your code readable and reduces typo risk.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mistake-3-Case-sensitive-tag-and-text-comparisons\"><\/span>Mistake #3: Case-sensitive tag and text comparisons<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Liquid comparisons are case-sensitive. &#8220;VIP&#8221; does not equal &#8220;vip&#8221; or &#8220;Vip&#8221;.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u274c Wrong: {% if customer.tags contains \"VIP\" %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Problem: Won&#8217;t match if the actual tag is &#8220;vip&#8221;, &#8220;Vip&#8221;, or &#8220;V.I.P.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Solution 1 &#8211; Check multiple variations:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2705 Right: {% if customer.tags contains \"VIP\" or customer.tags contains \"vip\" %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Solution 2 &#8211; Convert to lowercase first:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2705 Right: {% assign tags_lower = customer.tags | join: \",\" | downcase %}\n{% if tags_lower contains \"vip\" %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When this matters: Tag checking, product type comparisons, vendor names, SKU matching, any text comparison.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mistake-4-Not-handling-null-or-empty-values\"><\/span>Mistake #4: Not handling null or empty values<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Missing data causes workflow failures when you try to use it without checking first.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u274c Wrong: Send SMS to {{ customer.phone }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Problem: Fails if <code>customer.phone<\/code> is null\/empty.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Solution for output (provide fallback):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2705 Right: {{ customer.phone | default: \"No phone provided\" }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Solution for conditions (check before using):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2705 Right: {% if customer.phone != blank %}\n  Send SMS to {{ customer.phone }}\n{% endif %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Common null fields: <code>customer.phone<\/code>, <code>order.note<\/code>, <code>customer.note<\/code>, product metafields, <code>order.shippingAddress.company<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mistake-5-Overly-complex-nested-conditions\"><\/span>Mistake #5: Overly complex nested conditions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Cramming too much logic into one condition makes it unreadable, error-prone, and impossible to debug.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u274c Too complex:\n{% if customer.tags contains \"wholesale\" and order.totalPriceSet.shopMoney.amount &gt; 100 and order.lineItems.edges | size &gt; 5 and order.shippingAddress.countryCode == \"US\" and customer.ordersCount &gt; 10 %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Problems:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hard to read and understand<\/li>\n\n\n\n<li>Difficult to debug which condition is failing<\/li>\n\n\n\n<li>One typo breaks the entire check<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Better approach: Break into multiple condition steps in Flow, or simplify the logic.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2705 Better: \n{% assign order_total = order.totalPriceSet.shopMoney.amount %}\n{% assign is_wholesale = customer.tags contains \"wholesale\" %}\n{% assign is_us = order.shippingAddress.countryCode == \"US\" %}\n\n{% if is_wholesale and order_total &gt; 100 and is_us %}\n  &lt;!-- Then add second condition step for remaining criteria --&gt;\n{% endif %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Or use separate Flow condition steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>First condition: Check customer is wholesale AND order over $100<\/li>\n\n\n\n<li>Second condition: Check order has 5+ items AND ships to US<\/li>\n\n\n\n<li>Third condition: Check customer has 10+ orders<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mistake-6-Forgetting-GraphQL-uses-edges-and-nodes-for-arrays\"><\/span>Mistake #6: Forgetting GraphQL uses edges and nodes for arrays<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When looping through collections like line items, you must access the nested GraphQL structure correctly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u274c Wrong: {% for item in order.lineItems %}\n           {{ item.title }}\n         {% endfor %}\n\n\u2705 Right: {% for edge in order.lineItems.edges %}\n            {% assign item = edge.node %}\n            {{ item.title }}\n          {% endfor %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Why it matters: GraphQL wraps collections in <code>edges<\/code>, and each edge contains a <code>node<\/code> with the actual data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Exception: When using Flow&#8217;s &#8220;For each loop&#8221; action, Flow creates simplified variables like <code>lineItemsForeachitem.title<\/code> automatically. This mistake only applies to raw Liquid loops.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mistake-7-Not-testing-before-going-live\"><\/span>Mistake #7: Not testing before going live<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Flow has no true sandbox environment. Every workflow runs on live data, which means untested Liquid code can cause real problems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Common consequences:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Orders tagged incorrectly<\/li>\n\n\n\n<li>Notifications sent to wrong recipients<\/li>\n\n\n\n<li>Failed workflows that should have succeeded<\/li>\n\n\n\n<li>Customers seeing error messages<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">How to avoid:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Use Flow&#8217;s Log output action (Example 26):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Testing price: ${{ order.totalPriceSet.shopMoney.amount }}\nTesting condition result: {% if order.totalPriceSet.shopMoney.amount &gt; 100 %}PASS{% else %}FAIL{% endif %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2. Use Flow&#8217;s Preview function:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select a past order\/customer\/product<\/li>\n\n\n\n<li>See which path your workflow would take<\/li>\n\n\n\n<li>Verify conditions pass\/fail as expected<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">3. Test with harmless actions first:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use &#8220;add tag: test&#8221; instead of real actions<\/li>\n\n\n\n<li>Verify tag appears correctly<\/li>\n\n\n\n<li>Update to production action only after confirmation<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/flow-log-output-1024x583.png\" alt=\"Screenshot showing Log output action results in Flow's run history\" class=\"wp-image-17817\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-log-output-1024x583.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-log-output-300x171.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-log-output-768x437.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-log-output-1536x875.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/flow-log-output-2048x1166.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mistake-8-Confusing-Flows-For-each-variables-with-Liquid-loop-variables\"><\/span>Mistake #8: Confusing Flow&#8217;s For each variables with Liquid loop variables<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Flow&#8217;s &#8220;For each loop (iterate)&#8221; action creates special variables that only work within that action context.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u274c Wrong (in raw Liquid loop):\n{% for item in order.lineItems %}\n  {{ lineItemsForeachitem.title }}\n{% endfor %}\n\n\u2705 Right (in Flow's For each action):\nUse Flow's action, then reference:\n{{ lineItemsForeachitem.title }}\n\n\u2705 Right (in raw Liquid loop):\n{% for edge in order.lineItems.edges %}\n  {% assign item = edge.node %}\n  {{ item.title }}\n{% endfor %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When each syntax works:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>lineItemsForeachitem.*<\/code> \u2192 Only inside Flow&#8217;s For each action<\/li>\n\n\n\n<li><code>edge.node.*<\/code> \u2192 Only in raw Liquid loops<\/li>\n\n\n\n<li>They&#8217;re not interchangeable<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-dots\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Test-your-Liquid-code-before-deploying\"><\/span>Test your Liquid code before deploying<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before adding Liquid code to your live workflows, use this syntax checker to catch common errors. While it can&#8217;t test against your actual store data (use Flow&#8217;s Log output action for that), it identifies basic syntax mistakes, Flow-specific issues, and potential problems that cause workflow failures.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Paste your code below to check for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Missing closing tags (<code>{% endif %}<\/code>, <code>{% endfor %}<\/code>)<\/li>\n\n\n\n<li>Mismatched curly braces<\/li>\n\n\n\n<li>Theme syntax vs Flow&#8217;s GraphQL syntax<\/li>\n\n\n\n<li>Common mistakes like treating decimals as cents<\/li>\n\n\n\n<li>Null values without proper checks<\/li>\n<\/ul>\n\n\n\n<div id=\"liquid-checker-widget\">\n  <style>\n    #liquid-checker-widget {\n      background: #fff;\n      border: 1px solid #e1e4e8;\n      border-radius: 8px;\n      padding: 24px;\n      margin: 32px 0;\n      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n      box-shadow: 0 2px 10px rgba(0,0,0,.10);\n    }\n    \n    #liquid-checker-widget h3 {\n      margin: 0 0 16px 0;\n      color: #1f2937;\n      font-size: 20px;\n      font-weight: 600;\n    }\n    \n    #liquid-checker-widget p {\n      margin: 0 0 16px 0;\n      color: #4b5563;\n      font-size: 14px;\n      line-height: 1.5;\n    }\n    \n    .liquid-input-container {\n      position: relative;\n      margin-bottom: 16px;\n    }\n    \n    #liquid-code-input {\n      width: 100%;\n      min-height: 150px;\n      padding: 12px;\n      border: 2px solid #d1d5db;\n      border-radius: 6px;\n      font-family: 'Courier New', monospace;\n      font-size: 14px;\n      line-height: 1.5;\n      resize: vertical;\n      transition: border-color 0.2s;\n      box-sizing: border-box;\n    }\n    \n    #liquid-code-input:focus {\n      outline: none;\n      border-color: #3b82f6;\n    }\n    \n    #check-liquid-btn {\n      background: #3b82f6;\n      color: white;\n      border: none;\n      padding: 12px 24px;\n      border-radius: 6px;\n      font-size: 14px;\n      font-weight: 600;\n      cursor: pointer;\n      transition: background 0.2s;\n    }\n    \n    #check-liquid-btn:hover {\n      background: #2563eb;\n    }\n    \n    #check-liquid-btn:active {\n      background: #1d4ed8;\n    }\n    \n    .liquid-results {\n      margin-top: 16px;\n      padding: 16px;\n      border-radius: 6px;\n      display: none;\n    }\n    \n    .liquid-results.success {\n      background: #dcfce7;\n      border: 1px solid #22c55e;\n      display: block;\n    }\n    \n    .liquid-results.error {\n      background: #fee2e2;\n      border: 1px solid #ef4444;\n      display: block;\n    }\n    \n    .liquid-results.warning {\n      background: #fef3c7;\n      border: 1px solid #f59e0b;\n      display: block;\n    }\n    \n    .liquid-results h4 {\n      margin: 0 0 12px 0 !important;\n      font-size: 16px !important;\n      font-weight: 600 !important;\n    }\n    \n    .liquid-results.success h4 {\n      color: #15803d;\n    }\n    \n    .liquid-results.error h4 {\n      color: #991b1b;\n    }\n    \n    .liquid-results.warning h4 {\n      color: #b45309;\n    }\n    \n    .liquid-results ul {\n      margin: 8px 0 0 0;\n      padding-left: 20px;\n    }\n    \n    .liquid-results li {\n      margin: 6px 0;\n      color: #374151;\n      font-size: 14px;\n      line-height: 1.5;\n    }\n    \n    .issue-line {\n      font-family: 'Courier New', monospace;\n      background: rgba(0,0,0,0.05);\n      padding: 2px 6px;\n      border-radius: 3px;\n      font-size: 13px;\n    }\n    \n    .liquid-examples {\n      margin-top: 16px;\n      padding: 12px;\n      background: #EDFAFA;\n      border-radius: 6px;\n      border-left: 4px solid #16BDCA;\n    }\n    \n    .liquid-examples h5 {\n      margin: 0 0 8px 0;\n      color: #05505C;\n      font-size: 14px;\n      font-weight: 600;\n    }\n    \n    .liquid-examples button {\n      background: white;\n      border: 1px solid #AFECEF;\n      padding: 6px 12px;\n      margin: 4px 4px 4px 0;\n      border-radius: 4px;\n      font-size: 12px;\n      cursor: pointer;\n      transition: all 0.2s;\n    }\n    \n    .liquid-examples button:hover {\n      background: #AFECEF;\n      border-color: #16BDCA;\n    }\n  <\/style>\n  \n  <h3><span class=\"ez-toc-section\" id=\"%F0%9F%A7%AA-Liquid-Syntax-Checker\"><\/span>\ud83e\uddea Liquid Syntax Checker<span class=\"ez-toc-section-end\"><\/span><\/h3>\n  <p>Paste your Shopify Flow Liquid code below to check for common syntax errors and Flow-specific issues.<\/p>\n  \n  <div class=\"liquid-input-container\">\n    <textarea id=\"liquid-code-input\" placeholder=\"Paste your Liquid code here...\"><\/textarea>\n  <\/div>\n  \n  <button id=\"check-liquid-btn\">Check Syntax<\/button>\n  \n  <div id=\"liquid-results\" class=\"liquid-results\"><\/div>\n  \n  <div class=\"liquid-examples\">\n    <h5>Quick test examples:<\/h5>\n    <button class=\"example-btn\" data-example=\"simple\">Simple condition<\/button>\n    <button class=\"example-btn\" data-example=\"loop\">Loop through items<\/button>\n    <button class=\"example-btn\" data-example=\"calculation\">Price calculation<\/button>\n    <button class=\"example-btn\" data-example=\"error\">Common error<\/button>\n  <\/div>\n  \n  <script>\n    (function() {\n      var examples = {\n        simple: '{% if customer.ordersCount > 5 %}\\n  loyal-customer\\n{% endif %}',\n        loop: '{% for edge in order.lineItems.edges %}\\n  {% assign item = edge.node %}\\n  {{ item.title }}: {{ item.quantity }}\\n{% endfor %}',\n        calculation: '{% assign order_total = order.totalPriceSet.shopMoney.amount %}\\n{% if order_total > 100 %}\\n  {{ order_total | round: 2 }}\\n{% endif %}',\n        error: '{% if customer.tags contains \"VIP\"\\n  vip-customer\\n{% endif %}'\n      };\n      \n      var exampleBtns = document.querySelectorAll('.example-btn');\n      exampleBtns.forEach(function(btn) {\n        btn.addEventListener('click', function() {\n          var exampleType = this.getAttribute('data-example');\n          document.getElementById('liquid-code-input').value = examples[exampleType];\n        });\n      });\n      \n      document.getElementById('check-liquid-btn').addEventListener('click', function() {\n        var code = document.getElementById('liquid-code-input').value.trim();\n        var resultsDiv = document.getElementById('liquid-results');\n        \n        if (!code) {\n          resultsDiv.className = 'liquid-results warning';\n          resultsDiv.innerHTML = '<h4>\u26a0\ufe0f No code to check<\/h4><p>Please paste some Liquid code in the text area above.<\/p>';\n          return;\n        }\n        \n        var issues = checkLiquidSyntax(code);\n        \n        if (issues.errors.length === 0 && issues.warnings.length === 0) {\n          resultsDiv.className = 'liquid-results success';\n          resultsDiv.innerHTML = '<h4>\u2705 No obvious syntax errors detected!<\/h4><p>Your Liquid code looks good. Remember to test it in Flow using the Log output action before deploying to production.<\/p>';\n        } else if (issues.errors.length > 0) {\n          var html = '<h4>\u274c Syntax errors found<\/h4><ul>';\n          issues.errors.forEach(function(error) {\n            html += '<li>' + error + '<\/li>';\n          });\n          html += '<\/ul>';\n          \n          if (issues.warnings.length > 0) {\n            html += '<h4 style=\"margin-top: 12px;\">\u26a0\ufe0f Potential issues<\/h4><ul>';\n            issues.warnings.forEach(function(warning) {\n              html += '<li>' + warning + '<\/li>';\n            });\n            html += '<\/ul>';\n          }\n          \n          resultsDiv.className = 'liquid-results error';\n          resultsDiv.innerHTML = html;\n        } else {\n          var html = '<h4>\u26a0\ufe0f Potential issues detected<\/h4><ul>';\n          issues.warnings.forEach(function(warning) {\n            html += '<li>' + warning + '<\/li>';\n          });\n          html += '<\/ul>';\n          html += '<p style=\"margin-top: 12px;\">These are warnings, not necessarily errors. Test in Flow to confirm.<\/p>';\n          \n          resultsDiv.className = 'liquid-results warning';\n          resultsDiv.innerHTML = html;\n        }\n      });\n      \n      function checkLiquidSyntax(code) {\n        var errors = [];\n        var warnings = [];\n        \n        var ifCount = (code.match(\/{%\\s*if\\s\/g) || []).length;\n        var endifCount = (code.match(\/{%\\s*endif\\s*%}\/g) || []).length;\n        var forCount = (code.match(\/{%\\s*for\\s\/g) || []).length;\n        var endforCount = (code.match(\/{%\\s*endfor\\s*%}\/g) || []).length;\n        \n        if (ifCount !== endifCount) {\n          if (ifCount > endifCount) {\n            errors.push('Missing <span class=\"issue-line\">{% endif %}<\/span> tag (found ' + ifCount + ' if statements but only ' + endifCount + ' endif tags)');\n          } else {\n            errors.push('Extra <span class=\"issue-line\">{% endif %}<\/span> tag (found ' + ifCount + ' if statements but ' + endifCount + ' endif tags)');\n          }\n        }\n        \n        if (forCount !== endforCount) {\n          if (forCount > endforCount) {\n            errors.push('Missing <span class=\"issue-line\">{% endfor %}<\/span> tag (found ' + forCount + ' for loops but only ' + endforCount + ' endfor tags)');\n          } else {\n            errors.push('Extra <span class=\"issue-line\">{% endfor %}<\/span> tag (found ' + forCount + ' for loops but ' + endforCount + ' endfor tags)');\n          }\n        }\n        \n        if (code.indexOf('order.total_price') !== -1 || code.indexOf('order.line_items') !== -1 || code.indexOf('customer.total_spent') !== -1) {\n          warnings.push('Detected snake_case properties. Flow uses camelCase GraphQL syntax like <span class=\"issue-line\">order.totalPriceSet.shopMoney.amount<\/span>');\n        }\n        \n        if (code.match(\/>\\s*10000\/) || code.match(\/>\\s*50000\/) || code.match(\/>\\s*100000\/)) {\n          warnings.push('Large number comparison detected. Remember: Flow prices are decimals, not cents. Use > 100 for $100, not > 10000');\n        }\n        \n        if (code.indexOf('customer.phone') !== -1 && code.indexOf('!= blank') === -1 && code.indexOf('default') === -1) {\n          warnings.push('<span class=\"issue-line\">customer.phone<\/span> used without null check. Consider using <span class=\"issue-line\">!= blank<\/span> or <span class=\"issue-line\">| default<\/span> filter');\n        }\n        \n        var openDouble = (code.match(\/{{\/g) || []).length;\n        var closeDouble = (code.match(\/}}\/g) || []).length;\n        var openPercent = (code.match(\/{%\/g) || []).length;\n        var closePercent = (code.match(\/%}\/g) || []).length;\n        \n        if (openDouble !== closeDouble) {\n          errors.push('Mismatched <span class=\"issue-line\">{{ }}<\/span> braces (' + openDouble + ' opening, ' + closeDouble + ' closing)');\n        }\n        \n        if (openPercent !== closePercent) {\n          errors.push('Mismatched <span class=\"issue-line\">{% %}<\/span> braces (' + openPercent + ' opening, ' + closePercent + ' closing)');\n        }\n        \n        if (code.indexOf('else if') !== -1) {\n          errors.push('Found <span class=\"issue-line\">else if<\/span> - Liquid uses <span class=\"issue-line\">elsif<\/span> (one word, no space)');\n        }\n        \n        if (code.indexOf('order.lineItems') !== -1 && code.indexOf('for') !== -1 && code.indexOf('.edges') === -1 && code.indexOf('lineItemsForeachitem') === -1) {\n          warnings.push('Looping over <span class=\"issue-line\">order.lineItems<\/span> without <span class=\"issue-line\">.edges<\/span>. Should use: <span class=\"issue-line\">{% for edge in order.lineItems.edges %}<\/span>');\n        }\n        \n        return { errors: errors, warnings: warnings };\n      }\n    })();\n  <\/script>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Remember: This tool catches syntax errors, not logic errors. Always test your Liquid in Flow using the Log output action (Example 26) with real trigger data before deploying to production workflows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next section covers testing strategies to catch these mistakes before they cause problems in production.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Liquid-limitations-in-Shopify-Flow\"><\/span>Liquid limitations in Shopify Flow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While Liquid is powerful, it has inherent constraints that affect what you can build in Flow. Understanding these limitations helps you know when to use Flow&#8217;s other tools\u2014or when to consider alternatives.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What-Liquid-itself-cannot-do\"><\/span>What Liquid itself cannot do<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>No custom functions or imports<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Liquid is limited to Shopify&#8217;s built-in <a href=\"https:\/\/shopify.dev\/docs\/api\/liquid\/filters\" target=\"_blank\" rel=\"noreferrer noopener\">filters<\/a>. You cannot:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create custom functions<\/li>\n\n\n\n<li>Import JavaScript libraries<\/li>\n\n\n\n<li>Use date\/time libraries like Moment.js<\/li>\n\n\n\n<li>Add third-party utilities or helpers<\/li>\n\n\n\n<li>Define reusable code blocks<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Complex calculations become unwieldy<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While basic math works (<code>plus<\/code>, <code>minus<\/code>, <code>times<\/code>, <code>divided_by<\/code>), complex formulas get messy:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign margin_dollars = product.priceRangeV2.maxVariantPrice.amount | minus: product.cost %}\n{% assign margin_percent = margin_dollars | divided_by: product.priceRangeV2.maxVariantPrice.amount | times: 100 %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This calculates profit margin, but multi-step financial calculations or statistical analysis become unreadable quickly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Limited string manipulation<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Liquid provides basic text filters (<code>upcase<\/code>, <code>downcase<\/code>, <code>split<\/code>, <code>replace<\/code>), but lacks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Regular expressions (regex)<\/li>\n\n\n\n<li>Advanced pattern matching<\/li>\n\n\n\n<li>Complex text parsing<\/li>\n\n\n\n<li>Substring extraction with start\/end positions<\/li>\n\n\n\n<li>Character encoding conversions<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Read-only data access<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Liquid can access and display data, but cannot modify underlying objects. You can&#8217;t:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Update customer tags within Liquid (need separate action)<\/li>\n\n\n\n<li>Change product properties mid-workflow<\/li>\n\n\n\n<li>Build new objects to pass between steps<\/li>\n\n\n\n<li>Store calculated values for later use (except in variables within same step)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How-Flows-built-in-actions-help-but-dont-solve-everything\"><\/span>How Flow&#8217;s built-in actions help (but don&#8217;t solve everything)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>HTTP request enables external data access<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Flow&#8217;s &#8220;Send HTTP request&#8221; action lets you call external APIs, addressing one major Liquid limitation. However:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Requires endpoint setup and authentication<\/li>\n\n\n\n<li>Limited error handling<\/li>\n\n\n\n<li>No retry logic for failed requests<\/li>\n\n\n\n<li>Response parsing can be complex<\/li>\n\n\n\n<li>Rate limiting concerns with external APIs<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For each loop handles simple iteration<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Flow&#8217;s &#8220;For each loop (iterate)&#8221; action processes lists visually, but:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cannot perform conditional iteration (skip items based on criteria)<\/li>\n\n\n\n<li>Limited to Flow&#8217;s predefined actions inside loop<\/li>\n\n\n\n<li>No loop metadata access (index, first\/last flags)<\/li>\n\n\n\n<li>Cannot accumulate values across iterations without workarounds<\/li>\n\n\n\n<li>Can&#8217;t break out of loop early when condition met<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Count and Sum actions for basic aggregation<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Flow includes visual Count and Sum actions, but:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Count: Cannot count conditionally (only items matching criteria)<\/li>\n\n\n\n<li>Sum: Cannot sum conditionally (only items over certain value)<\/li>\n\n\n\n<li>Neither can perform calculations during aggregation<\/li>\n\n\n\n<li>No average, median, or other statistical functions<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Log output for debugging<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Flow&#8217;s &#8220;Log output&#8221; action helps test Liquid, but:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Requires running workflow on real\/historical data<\/li>\n\n\n\n<li>No step-through debugging<\/li>\n\n\n\n<li>Can&#8217;t inspect variables mid-execution<\/li>\n\n\n\n<li>Limited to viewing final output<\/li>\n\n\n\n<li>Must check run history after execution<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Run code action for advanced logic<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8220;<a href=\"https:\/\/help.shopify.com\/en\/manual\/shopify-flow\/reference\/actions\/run-code\">Run code<\/a>&#8221; action lets merchants write JavaScript:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What it enables:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Full JavaScript syntax and features<\/li>\n\n\n\n<li>Complex data transformations<\/li>\n\n\n\n<li>Advanced conditional logic<\/li>\n\n\n\n<li>API calls with full control<\/li>\n\n\n\n<li>Mathematical calculations<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Major limitations:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cannot import external libraries (no npm packages)<\/li>\n\n\n\n<li>Limited execution time (may timeout)<\/li>\n\n\n\n<li>Requires JavaScript knowledge<\/li>\n\n\n\n<li>Less documented than Liquid<\/li>\n\n\n\n<li>Debugging still challenging<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Real-world-challenges-that-remain\"><\/span>Real-world challenges that remain<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Date math is painful<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Calculating time differences requires converting dates to Unix timestamps:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign last_order = customer.lastOrder.createdAt | date: \"%s\" %}\n{% assign now = \"now\" | date: \"%s\" %}\n{% assign diff = now | minus: last_order %}\n{% assign days = diff | divided_by: 86400 %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This works, but there&#8217;s no simple <code>days_between()<\/code> function. Every date calculation requires manual timestamp math.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conditional aggregation requires loops<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Want to sum quantities only for items over $50? You need a full loop:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{% assign conditional_sum = 0 %}\n{% for edge in order.lineItems.edges %}\n  {% assign item = edge.node %}\n  {% assign item_price = item.originalTotalSet.shopMoney.amount %}\n  {% if item_price &gt; 50 %}\n    {% assign conditional_sum = conditional_sum | plus: item.quantity %}\n  {% endif %}\n{% endfor %}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Flow&#8217;s Sum action can&#8217;t handle the conditional logic. Flow&#8217;s For each action can&#8217;t accumulate values easily.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>No built-in error handling<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If Liquid encounters an error (null value, division by zero, invalid property), the workflow fails. There&#8217;s no try\/catch:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{%- comment -%} This fails if phone is null {%- endcomment -%}\n{{ customer.phone | upcase }}\n\n{%- comment -%} Must use default filter {%- endcomment -%}\n{{ customer.phone | default: \"N\/A\" | upcase }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Every potential null must be manually handled with <code>default<\/code> filters or <code>!= blank<\/code> checks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>GraphQL&#8217;s nested structure adds complexity<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Accessing simple data requires navigating multiple levels:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{{ order.totalPriceSet.shopMoney.amount }}\n{{ order.lineItems.edges.first.node.title }}\n{{ customer.defaultAddress.provinceCode }}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">While Flow&#8217;s variable picker helps, the verbosity makes code harder to read and debug.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>No way to persist data between workflow runs<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each workflow execution is isolated. You cannot:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Track cumulative totals across orders<\/li>\n\n\n\n<li>Build running calculations<\/li>\n\n\n\n<li>Store state for future triggers<\/li>\n\n\n\n<li>Create custom databases or logs<\/li>\n\n\n\n<li>Reference data from previous runs<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Testing-and-debugging-limitations\"><\/span>Testing and debugging limitations<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Flow provides limited testing capabilities:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What Flow offers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Preview function (shows workflow path)<\/li>\n\n\n\n<li>Log output action (requires real trigger data)<\/li>\n\n\n\n<li>Run history (shows errors after they happen)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">What&#8217;s missing:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>True sandbox environment<\/li>\n\n\n\n<li>Step-through debugger<\/li>\n\n\n\n<li>Variable inspector mid-workflow<\/li>\n\n\n\n<li>Ability to test with mock data<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Performance-considerations\"><\/span>Performance considerations<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Liquid loops can be slow:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Processing 100+ line items with complex logic takes time<\/li>\n\n\n\n<li>Nested loops multiply execution time<\/li>\n\n\n\n<li>Flow may timeout on very complex calculations<\/li>\n\n\n\n<li>No way to optimize or profile performance<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">No caching:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Same calculation repeated in multiple conditions runs each time<\/li>\n\n\n\n<li>Cannot cache API responses<\/li>\n\n\n\n<li>Cannot store intermediate results for reuse<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When-these-limitations-matter\"><\/span>When these limitations matter<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;re fine with Liquid + Flow if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Working only with Shopify data<\/li>\n\n\n\n<li>Workflows have 5 or fewer conditions<\/li>\n\n\n\n<li>Basic math operations (add, subtract, multiply, divide)<\/li>\n\n\n\n<li>You&#8217;re comfortable debugging code<\/li>\n\n\n\n<li>Simple date formatting (not complex date math)<\/li>\n\n\n\n<li>Small to medium data volumes (&lt; 50 line items typically)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Consider alternatives when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Connecting multiple external systems beyond Shopify<\/li>\n\n\n\n<li>Complex data transformations with nested calculations<\/li>\n\n\n\n<li>Team members aren&#8217;t technical or don&#8217;t want to learn Liquid<\/li>\n\n\n\n<li>Need robust testing before deploying workflows<\/li>\n\n\n\n<li>Require detailed debugging and error logs<\/li>\n\n\n\n<li>Need to persist data between workflow runs<\/li>\n\n\n\n<li>Want conditional aggregations (sum\/count with criteria)<\/li>\n\n\n\n<li>Processing high volumes requiring performance optimization<\/li>\n\n\n\n<li>Not on Shopify Plus and need logic beyond Liquid&#8217;s capabilities<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The pricing consideration:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Flow is free, making it attractive for simple automation. However, consider time costs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hours debugging Liquid syntax errors<\/li>\n\n\n\n<li>Workflow failures affecting real orders<\/li>\n\n\n\n<li>Limited testing causing production issues<\/li>\n\n\n\n<li>Ongoing maintenance as workflows grow complex<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes a paid alternative with better tooling saves more than the subscription costs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"MESA-vs-Shopify-Flow-limitations\"><\/span><strong>MESA vs Shopify Flow limitations<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Challenge<\/th><th>Shopify Flow + Liquid<\/th><th>MESA<\/th><\/tr><\/thead><tbody><tr><td>External API calls<\/td><td>Requires HTTP request setup<\/td><td>100+ pre-built integrations<\/td><\/tr><tr><td>Complex calculations<\/td><td>Manual Liquid code<\/td><td>Visual calculation builder<\/td><\/tr><tr><td>Date math<\/td><td>Unix timestamp workarounds<\/td><td>Built-in date functions<\/td><\/tr><tr><td>Conditional loops<\/td><td>Requires Liquid<\/td><td>Visual loop with conditions<\/td><\/tr><tr><td>Error handling<\/td><td>Workflow fails<\/td><td>Try\/catch logic available<\/td><\/tr><tr><td>AI integrations<\/td><td>None<\/td><td>Native + ChatGPT, Claude, Perplexity, Gemini connectors<\/td><\/tr><tr><td>Advanced logic<\/td><td>Run code (Plus only)<\/td><td>Available on all plans<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.getmesa.com\/blog\/shopify-flow-vs-mesa\/\"><strong>See how MESA handles these challenges \u2192<\/strong><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The bottom line: Liquid is powerful for Shopify-native automation, but has clear boundaries. Flow&#8217;s visual actions address some gaps, and the Run code action helps Shopify Plus merchants, but fundamental limitations remain for complex workflows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-frequently-asked-questions\"><span class=\"ez-toc-section\" id=\"Frequently-asked-questions\"><\/span>Frequently asked questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1767982627304\"><strong class=\"schema-faq-question\">Do I need to know Liquid to use Shopify Flow?<\/strong> <p class=\"schema-faq-answer\"><strong>No, you don&#8217;t need to know Liquid to use Shopify Flow.<\/strong> Flow&#8217;s visual builder, variable picker, and built-in actions handle common automation tasks without code. You only need Liquid for advanced scenarios like:<br\/><br\/>\u2022\u00a0Complex conditional logic combining multiple factors<br\/>\u2022\u00a0Custom calculations beyond basic math<br\/>\u2022\u00a0Conditional loops that filter or accumulate data<br\/>\u2022\u00a0Dynamic content with formatted output<br\/><br\/>Most merchants use Flow successfully without ever writing Liquid code.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1767982643732\"><strong class=\"schema-faq-question\">What is Liquid in Shopify Flow?<\/strong> <p class=\"schema-faq-answer\"><strong>Liquid in Shopify Flow is a templating language that lets you access and manipulate store data for advanced automation.<\/strong> It enables you to:<br\/><br\/>\u2022\u00a0Read deeply nested data (order totals, customer details, product properties)<br\/>\u2022\u00a0Perform calculations and comparisons<br\/>\u2022\u00a0Build conditional logic with if\/else statements<br\/>\u2022\u00a0Loop through collections like line items<br\/>\u2022\u00a0Format data for human-readable output<br\/><br\/>Flow uses GraphQL-based Liquid syntax, which differs from theme Liquid.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1767982773136\"><strong class=\"schema-faq-question\">How do I write Liquid code in Shopify Flow?<\/strong> <p class=\"schema-faq-answer\"><strong>To write Liquid in Shopify Flow, click in any condition or action field and either use the variable picker or type Liquid code directly.<\/strong> Follow these steps:<br\/><br\/>\u2022 <strong>Click the input field<\/strong> where you want to add Liquid<br\/>\u2022 <strong>Use the variable picker<\/strong> to browse available objects and properties<br\/><strong>\u2022 Or type manually<\/strong> using double curly braces: <code>{{ object.property }}<\/code><br\/><strong>\u2022 For logic, use<\/strong> curly braces with percent signs: <code>{% if condition %}<\/code><br\/><strong>\u2022 Test your code<\/strong> using Flow&#8217;s &#8220;Log output&#8221; action before going live<br\/><br\/>Always use the variable picker to avoid syntax errors.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1767982773933\"><strong class=\"schema-faq-question\">What&#8217;s the difference between Liquid in themes vs Flow?<\/strong> <p class=\"schema-faq-answer\">In themes, Liquid generates HTML for your storefront. In Flow, Liquid evaluates data to make decisions (conditions) or create dynamic values (action inputs). The syntax is the same, but the context and available objects differ.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1767982774594\"><strong class=\"schema-faq-question\">How do I test Liquid code in Shopify Flow?<\/strong> <p class=\"schema-faq-answer\"><strong>Test Liquid code in Flow using the &#8220;Log output&#8221; action.<\/strong> Here&#8217;s the process:<br\/><br\/>\u2022\u00a0Add a &#8220;Log output&#8221; action to your workflow<br\/>\u2022\u00a0Paste your Liquid code into the log field<br\/>\u2022\u00a0Run the workflow with a real or historical trigger<br\/>\u2022\u00a0Check the workflow run history to see the output<br\/>\u2022\u00a0Verify the results match your expectations<br\/><br\/>Alternatively, use Flow&#8217;s Preview function to see which workflow path a specific order\/customer would take, though it won&#8217;t show actual Liquid output values.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1767982821977\"><strong class=\"schema-faq-question\">How do I access order total in Shopify Flow Liquid?<\/strong> <p class=\"schema-faq-answer\"><strong>Access order total in Flow using <code>{{ order.totalPriceSet.shopMoney.amount }}<\/code><\/strong>. This returns the order total as a decimal (e.g., 125.99 for a $125.99 order).<br\/><br\/>For conditions checking if order exceeds $100:<br\/><br\/><code>{% if order.totalPriceSet.shopMoney.amount > 100 %} high-value-order {% endif %}<\/code><br\/><br\/>Note: Flow uses decimals, not cents. Don&#8217;t divide by 100 or you&#8217;ll get incorrect values.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1767982822787\"><strong class=\"schema-faq-question\">Can I use Liquid to access metafields in Flow?<\/strong> <p class=\"schema-faq-answer\">Yes! Use syntax like {{ product.metafields.namespace.key }} or {{ customer.metafields.custom.field_name }}. Make sure metafields are set up in your store first. Flow only accesses existing metafields, it cannot create new ones.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1767982863348\"><strong class=\"schema-faq-question\">Do I need Shopify Plus to use Liquid in Flow?<\/strong> <p class=\"schema-faq-answer\">No, Liquid is available in Flow on all Shopify plans (Starter, Basic, Shopify, Advanced, Plus). However, some Flow features like &#8220;Run code&#8221; action are Plus-only.<\/p> <\/div> <\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"When-to-use-Liquid-vs-when-to-use-MESA\"><\/span>When to use Liquid vs when to use MESA<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The choice between mastering Liquid in Flow or switching to MESA depends on your workflow complexity, team skills, and how much time you want to invest in automation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Use-Liquid-in-Flow-when\"><\/span>Use Liquid in Flow when:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 <strong>You only need Shopify data<\/strong> &#8211; No external apps or systems to connect<br>\u2705 <strong>Workflows are relatively simple<\/strong> &#8211; Fewer than 5 conditions, basic logic<br>\u2705 <strong>You&#8217;re comfortable with code<\/strong> &#8211; You or your team can write and debug Liquid<br>\u2705 <strong>You&#8217;re already on Shopify Plus<\/strong> &#8211; Flow is included, no additional cost<br>\u2705 <strong>Basic internal automation<\/strong> &#8211; Order tagging, customer segmentation, inventory alerts<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Flow + Liquid works well for: Auto-tagging orders by value, flagging VIP customers, routing orders based on shipping address, basic inventory notifications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Consider-MESA-instead-when\"><\/span>Consider MESA instead when:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u274c <strong>You need external app integrations<\/strong> &#8211; Google Sheets, Slack, CRMs, ERPs, marketing tools<br>\u274c <strong>Your team isn&#8217;t technical<\/strong> &#8211; No one wants to learn Liquid syntax<br>\u274c <strong>Complex data transformations<\/strong> &#8211; Multi-step calculations, date math, conditional aggregations<br>\u274c <strong>AI-powered automation<\/strong> &#8211; Need Yedric for intelligent routing and content generation<br>\u274c <strong>Scheduled workflows<\/strong> &#8211; Need workflows that run on time schedules, not just triggers<br>\u274c <strong>Detailed debugging required<\/strong> &#8211; Need clear error messages and step-by-step logs<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"951\" src=\"https:\/\/www.getmesa.com\/blog\/wp-content\/uploads\/workflow-cancel-refund-amazon-orders-1-1024x951.png\" alt=\"visual, no-code workflow builder in MESA\" class=\"wp-image-17814\" srcset=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-cancel-refund-amazon-orders-1-1024x951.png 1024w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-cancel-refund-amazon-orders-1-300x278.png 300w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-cancel-refund-amazon-orders-1-768x713.png 768w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-cancel-refund-amazon-orders-1-1536x1426.png 1536w, https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/workflow-cancel-refund-amazon-orders-1-2048x1901.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">MESA&#8217;s visual workflow builder<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Real-customer-experiences\"><\/span>Real customer experiences<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">After shopping the market and <strong>outgrowing Shopify Flow<\/strong>, MESA was the only solution that could handle our complex requirements for managing our store. <\/p>\n<cite>\u2b50\u2b50\u2b50\u2b50\u2b50 Madhappy<\/cite><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Amazing app, that basically <strong>takes Shopify Flow idea to the next level<\/strong>, with a very simple graphical interface and a ton of functionality. <\/p>\n<cite>\u2b50\u2b50\u2b50\u2b50\u2b50 Reinhard Frans<\/cite><\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The-practical-decision-framework\"><\/span>The practical decision framework<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Start with Flow if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You&#8217;re testing automation for the first time<\/li>\n\n\n\n<li>Budget is extremely tight<\/li>\n\n\n\n<li>Workflows are simple and Shopify-only<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Switch to MESA when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You&#8217;ve hit Flow&#8217;s limitations (external integrations, testing, complexity)<\/li>\n\n\n\n<li>Automation is business-critical and needs reliability<\/li>\n\n\n\n<li>Time spent debugging Liquid exceeds cost of MESA subscription<\/li>\n\n\n\n<li>You need expert support from Shopify automation specialists<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Many stores use both: Flow for simple internal tasks, MESA for complex workflows connecting external systems. You don&#8217;t have to choose just one.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Liquid transforms Shopify Flow from a basic automation tool into a powerful workflow engine capable of handling sophisticated ecommerce scenarios. While Flow&#8217;s visual builder handles simple tasks, Liquid unlocks the ability to access nested data, perform complex calculations, build multi-factor conditional logic, and create dynamic, personalized content that makes automation feel less robotic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The 26 examples in this guide cover the most common Shopify automation scenarios\u2014from customer segmentation and order routing to inventory management and conditional tagging. Start with beginner examples (like first-time customer detection or date formatting), test thoroughly using Flow&#8217;s Log output action, then progress to advanced techniques as your confidence grows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Remember the key principles:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always use Flow&#8217;s variable picker to avoid syntax errors<\/li>\n\n\n\n<li>Flow uses GraphQL decimals for prices, not cents<\/li>\n\n\n\n<li>Test with Log output action before deploying to production<\/li>\n\n\n\n<li>Assign complex paths to simple variable names for readability<\/li>\n\n\n\n<li>Break overly complex conditions into multiple Flow steps<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Your next steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Start small: Pick one example that solves an immediate business need<\/li>\n\n\n\n<li>Test safely: Use Log output action or Flow&#8217;s Preview function<\/li>\n\n\n\n<li>Iterate: Once it works, expand to more complex scenarios<\/li>\n\n\n\n<li>Bookmark this guide: Reference the examples as you build new workflows<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>When Flow + Liquid isn&#8217;t enough:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you find yourself spending hours debugging syntax errors, hitting Flow&#8217;s limitations with external integrations, or wishing for a proper testing sandbox, it might be time to explore alternatives. MESA offers the same automation capabilities with a visual interface, built-in testing, 100+ pre-built integrations, and expert support from Shopify automation specialists.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.getmesa.com\/templates\">MESA template library<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.getmesa.com\/blog\/shopify-flow-vs-mesa\/\">Shopify Flow vs MESA comparison<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.getmesa.com\/blog\/how-to-extend-shopify-flow\/\">How to Extend Shopify Flow<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.getmesa.com\/blog\/shopify-flow-templates\/\">50+ Shopify Flow Templates<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.getmesa.com/blog\/shopify-flow-guide\/\" type=\"post\" id=\"17978\">Shopify Flow: Complete Guide<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Whether you master Liquid in Flow or switch to a visual platform, the important thing is that you&#8217;re automating. Every workflow you build frees up time for strategic work that actually grows your business.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ready to build your first Liquid workflow? Pick an example from this guide, open Flow, and start automating.<\/p>\n\n\n\n<div class=\"card-next-steps\">\n\t<div class=\"card__content\">\n\t\t<h4>What to do next&#8230;<\/h4>\n<p>The fastest way to see automation working in your store is to start with a single workflow.<\/p>\n<ol>\n<li><a href=\"https:\/\/www.getmesa.com\/pricing\"><strong>Try MESA free<\/strong><\/a> \u2014 start a 7-day free trial and get your first workflow running.<\/li>\n<li><a href=\"https:\/\/www.getmesa.com\/templates\"><strong>Browse the template library<\/strong><\/a> \u2014 pre-built workflows for the most common Shopify automation tasks.<\/li>\n<li><a href=\"https:\/\/www.getmesa.com\/yedric\"><strong>Talk to Yedric<\/strong><\/a> \u2014 describe what you want to automate, and let our AI assistant build it for you.<\/li>\n<li><a href=\"https:\/\/www.getmesa.com\/support\"><strong>Get free workflow setup<\/strong><\/a> \u2014 MESA&#8217;s team will build your first workflow at no cost.<\/li>\n<\/ol>\n\t<\/div><!-- \/.card__content -->\n\n\t\n<div class=\"socials card__socials\">\n\t<ul>\n\t\t\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/twitter.com\/getmesa\" target=\"_blank\">\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/twitter-icon.svg\" class=\"attachment-small size-small\" alt=\"icon: twitter\" \/>\t\t\t\t<\/a>\n\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/www.youtube.com\/@getmesa\" target=\"_blank\">\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/youtube-icon.svg\" class=\"attachment-small size-small\" alt=\"icon: youtube\" \/>\t\t\t\t<\/a>\n\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t<a href=\"https:\/\/www.linkedin.com\/company\/9754608\/\" target=\"_blank\">\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/linkedin-icon.svg\" class=\"attachment-small size-small\" alt=\"linkedin icon\" \/>\t\t\t\t<\/a>\n\t\t\t<\/li>\n\t\t\t<\/ul>\n<\/div><!-- \/.socials -->\n<\/div><!-- \/.card-next-steps -->\n","protected":false},"excerpt":{"rendered":"<p>You&#8217;ve built a Shopify Flow workflow to tag high-value customers, but you quickly hit a wall. Flow&#8217;s basic conditions can&#8217;t&#8230;<\/p>\n","protected":false},"author":1,"featured_media":17719,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[444],"tags":[190],"class_list":["post-17718","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-shopify-automation-guides","tag-shopify-flow"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Shopify Flow Liquid: How to Use It (with 20+ Copy-Paste Examples)<\/title>\n<meta name=\"description\" content=\"Unlock Shopify Flow&#039;s full potential with Liquid. This guide covers syntax, filters, and 20+ copy-paste examples for customer segmentation, order tagging, inventory alerts, and more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Shopify Flow Liquid: How to Use It (with 20+ Copy-Paste Examples)\" \/>\n<meta property=\"og:description\" content=\"Unlock Shopify Flow&#039;s full potential with Liquid. This guide covers syntax, filters, and 20+ copy-paste examples for customer segmentation, order tagging, inventory alerts, and more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/\" \/>\n<meta property=\"og:site_name\" content=\"MESA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/web.facebook.com\/mesabyshoppad\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-09T21:53:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-31T15:14:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1584\" \/>\n\t<meta property=\"og:image:height\" content=\"819\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ryan ODonnell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@getmesa\" \/>\n<meta name=\"twitter:site\" content=\"@getmesa\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ryan ODonnell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/\"},\"author\":{\"name\":\"Ryan ODonnell\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#\\\/schema\\\/person\\\/37dc9b968192b2be49af3950022179cc\"},\"headline\":\"How to Use Liquid in Shopify Flow: 20+ Copy-Paste Examples for Real Workflows\",\"datePublished\":\"2026-01-09T21:53:06+00:00\",\"dateModified\":\"2026-03-31T15:14:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/\"},\"wordCount\":5357,\"publisher\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/using-liquid-in-shopify-flow.png\",\"keywords\":[\"shopify flow\"],\"articleSection\":[\"Shopify Automation Guides\"],\"inLanguage\":\"en-US\"},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/\",\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/\",\"name\":\"Shopify Flow Liquid: How to Use It (with 20+ Copy-Paste Examples)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/using-liquid-in-shopify-flow.png\",\"datePublished\":\"2026-01-09T21:53:06+00:00\",\"dateModified\":\"2026-03-31T15:14:52+00:00\",\"description\":\"Unlock Shopify Flow's full potential with Liquid. This guide covers syntax, filters, and 20+ copy-paste examples for customer segmentation, order tagging, inventory alerts, and more.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982627304\"},{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982643732\"},{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982773136\"},{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982773933\"},{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982774594\"},{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982821977\"},{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982822787\"},{\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982863348\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/using-liquid-in-shopify-flow.png\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/using-liquid-in-shopify-flow.png\",\"width\":1584,\"height\":819,\"caption\":\"using liquid in shopify flow\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use Liquid in Shopify Flow: 20+ Copy-Paste Examples for Real Workflows\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/\",\"name\":\"MESA\",\"description\":\"Discover how to automate your Shopify growth\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#organization\",\"name\":\"MESA - AI automation Platform\",\"url\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/mesa-shoppad.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.getmesa.com/blog\\\/wp-content\\\/uploads\\\/mesa-shoppad.jpeg\",\"width\":225,\"height\":225,\"caption\":\"MESA - AI automation Platform\"},\"image\":{\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/web.facebook.com\\\/mesabyshoppad\\\/\",\"https:\\\/\\\/x.com\\\/getmesa\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/shoppad\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCqsf_WhcGEsZMvms1idivyw\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.getmesa.com\\\/blog\\\/#\\\/schema\\\/person\\\/37dc9b968192b2be49af3950022179cc\",\"name\":\"Ryan ODonnell\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g\",\"caption\":\"Ryan ODonnell\"},\"sameAs\":[\"https:\\\/\\\/www.getmesa.com\"]},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982627304\",\"position\":1,\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982627304\",\"name\":\"Do I need to know Liquid to use Shopify Flow?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"<strong>No, you don't need to know Liquid to use Shopify Flow.<\\\/strong> Flow's visual builder, variable picker, and built-in actions handle common automation tasks without code. You only need Liquid for advanced scenarios like:<br\\\/><br\\\/>\u2022\u00a0Complex conditional logic combining multiple factors<br\\\/>\u2022\u00a0Custom calculations beyond basic math<br\\\/>\u2022\u00a0Conditional loops that filter or accumulate data<br\\\/>\u2022\u00a0Dynamic content with formatted output<br\\\/><br\\\/>Most merchants use Flow successfully without ever writing Liquid code.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982643732\",\"position\":2,\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982643732\",\"name\":\"What is Liquid in Shopify Flow?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"<strong>Liquid in Shopify Flow is a templating language that lets you access and manipulate store data for advanced automation.<\\\/strong> It enables you to:<br\\\/><br\\\/>\u2022\u00a0Read deeply nested data (order totals, customer details, product properties)<br\\\/>\u2022\u00a0Perform calculations and comparisons<br\\\/>\u2022\u00a0Build conditional logic with if\\\/else statements<br\\\/>\u2022\u00a0Loop through collections like line items<br\\\/>\u2022\u00a0Format data for human-readable output<br\\\/><br\\\/>Flow uses GraphQL-based Liquid syntax, which differs from theme Liquid.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982773136\",\"position\":3,\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982773136\",\"name\":\"How do I write Liquid code in Shopify Flow?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"<strong>To write Liquid in Shopify Flow, click in any condition or action field and either use the variable picker or type Liquid code directly.<\\\/strong> Follow these steps:<br\\\/><br\\\/>\u2022 <strong>Click the input field<\\\/strong> where you want to add Liquid<br\\\/>\u2022 <strong>Use the variable picker<\\\/strong> to browse available objects and properties<br\\\/><strong>\u2022 Or type manually<\\\/strong> using double curly braces: {{ object.property }}<br\\\/><strong>\u2022 For logic, use<\\\/strong> curly braces with percent signs: {% if condition %}<br\\\/><strong>\u2022 Test your code<\\\/strong> using Flow's \\\"Log output\\\" action before going live<br\\\/><br\\\/>Always use the variable picker to avoid syntax errors.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982773933\",\"position\":4,\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982773933\",\"name\":\"What's the difference between Liquid in themes vs Flow?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"In themes, Liquid generates HTML for your storefront. In Flow, Liquid evaluates data to make decisions (conditions) or create dynamic values (action inputs). The syntax is the same, but the context and available objects differ.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982774594\",\"position\":5,\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982774594\",\"name\":\"How do I test Liquid code in Shopify Flow?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"<strong>Test Liquid code in Flow using the \\\"Log output\\\" action.<\\\/strong> Here's the process:<br\\\/><br\\\/>\u2022\u00a0Add a \\\"Log output\\\" action to your workflow<br\\\/>\u2022\u00a0Paste your Liquid code into the log field<br\\\/>\u2022\u00a0Run the workflow with a real or historical trigger<br\\\/>\u2022\u00a0Check the workflow run history to see the output<br\\\/>\u2022\u00a0Verify the results match your expectations<br\\\/><br\\\/>Alternatively, use Flow's Preview function to see which workflow path a specific order\\\/customer would take, though it won't show actual Liquid output values.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982821977\",\"position\":6,\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982821977\",\"name\":\"How do I access order total in Shopify Flow Liquid?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"<strong>Access order total in Flow using {{ order.totalPriceSet.shopMoney.amount }}<\\\/strong>. This returns the order total as a decimal (e.g., 125.99 for a $125.99 order).<br\\\/><br\\\/>For conditions checking if order exceeds $100:<br\\\/><br\\\/>{% if order.totalPriceSet.shopMoney.amount > 100 %} high-value-order {% endif %}<br\\\/><br\\\/>Note: Flow uses decimals, not cents. Don't divide by 100 or you'll get incorrect values.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982822787\",\"position\":7,\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982822787\",\"name\":\"Can I use Liquid to access metafields in Flow?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Yes! Use syntax like {{ product.metafields.namespace.key }} or {{ customer.metafields.custom.field_name }}. Make sure metafields are set up in your store first. Flow only accesses existing metafields, it cannot create new ones.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982863348\",\"position\":8,\"url\":\"https:\\\/\\\/www.getmesa.com/blog\\\/using-liquid-in-shopify-flow\\\/#faq-question-1767982863348\",\"name\":\"Do I need Shopify Plus to use Liquid in Flow?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No, Liquid is available in Flow on all Shopify plans (Starter, Basic, Shopify, Advanced, Plus). However, some Flow features like \\\"Run code\\\" action are Plus-only.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Shopify Flow Liquid: How to Use It (with 20+ Copy-Paste Examples)","description":"Unlock Shopify Flow's full potential with Liquid. This guide covers syntax, filters, and 20+ copy-paste examples for customer segmentation, order tagging, inventory alerts, and more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/","og_locale":"en_US","og_type":"article","og_title":"Shopify Flow Liquid: How to Use It (with 20+ Copy-Paste Examples)","og_description":"Unlock Shopify Flow's full potential with Liquid. This guide covers syntax, filters, and 20+ copy-paste examples for customer segmentation, order tagging, inventory alerts, and more.","og_url":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/","og_site_name":"MESA","article_publisher":"https:\/\/web.facebook.com\/mesabyshoppad\/","article_published_time":"2026-01-09T21:53:06+00:00","article_modified_time":"2026-03-31T15:14:52+00:00","og_image":[{"width":1584,"height":819,"url":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow.png","type":"image\/png"}],"author":"Ryan ODonnell","twitter_card":"summary_large_image","twitter_creator":"@getmesa","twitter_site":"@getmesa","twitter_misc":{"Written by":"Ryan ODonnell","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#article","isPartOf":{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/"},"author":{"name":"Ryan ODonnell","@id":"https:\/\/www.getmesa.com\/blog\/#\/schema\/person\/37dc9b968192b2be49af3950022179cc"},"headline":"How to Use Liquid in Shopify Flow: 20+ Copy-Paste Examples for Real Workflows","datePublished":"2026-01-09T21:53:06+00:00","dateModified":"2026-03-31T15:14:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/"},"wordCount":5357,"publisher":{"@id":"https:\/\/www.getmesa.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#primaryimage"},"thumbnailUrl":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow.png","keywords":["shopify flow"],"articleSection":["Shopify Automation Guides"],"inLanguage":"en-US"},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/","url":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/","name":"Shopify Flow Liquid: How to Use It (with 20+ Copy-Paste Examples)","isPartOf":{"@id":"https:\/\/www.getmesa.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#primaryimage"},"image":{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#primaryimage"},"thumbnailUrl":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow.png","datePublished":"2026-01-09T21:53:06+00:00","dateModified":"2026-03-31T15:14:52+00:00","description":"Unlock Shopify Flow's full potential with Liquid. This guide covers syntax, filters, and 20+ copy-paste examples for customer segmentation, order tagging, inventory alerts, and more.","breadcrumb":{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982627304"},{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982643732"},{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982773136"},{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982773933"},{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982774594"},{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982821977"},{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982822787"},{"@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982863348"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#primaryimage","url":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow.png","contentUrl":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/using-liquid-in-shopify-flow.png","width":1584,"height":819,"caption":"using liquid in shopify flow"},{"@type":"BreadcrumbList","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.getmesa.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use Liquid in Shopify Flow: 20+ Copy-Paste Examples for Real Workflows"}]},{"@type":"WebSite","@id":"https:\/\/www.getmesa.com\/blog\/#website","url":"https:\/\/www.getmesa.com\/blog\/","name":"MESA","description":"Discover how to automate your Shopify growth","publisher":{"@id":"https:\/\/www.getmesa.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.getmesa.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.getmesa.com\/blog\/#organization","name":"MESA - AI automation Platform","url":"https:\/\/www.getmesa.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.getmesa.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/mesa-shoppad.jpeg","contentUrl":"https:\/\/www.getmesa.com/blog\/wp-content\/uploads\/mesa-shoppad.jpeg","width":225,"height":225,"caption":"MESA - AI automation Platform"},"image":{"@id":"https:\/\/www.getmesa.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/web.facebook.com\/mesabyshoppad\/","https:\/\/x.com\/getmesa","https:\/\/www.linkedin.com\/company\/shoppad\/","https:\/\/www.youtube.com\/channel\/UCqsf_WhcGEsZMvms1idivyw"]},{"@type":"Person","@id":"https:\/\/www.getmesa.com\/blog\/#\/schema\/person\/37dc9b968192b2be49af3950022179cc","name":"Ryan ODonnell","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/62bb965c979cc1de4c6f046fb47a28a57bc194da441ebe43b3dfbe2f2f893563?s=96&d=mm&r=g","caption":"Ryan ODonnell"},"sameAs":["https:\/\/www.getmesa.com"]},{"@type":"Question","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982627304","position":1,"url":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982627304","name":"Do I need to know Liquid to use Shopify Flow?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"<strong>No, you don't need to know Liquid to use Shopify Flow.<\/strong> Flow's visual builder, variable picker, and built-in actions handle common automation tasks without code. You only need Liquid for advanced scenarios like:<br\/><br\/>\u2022\u00a0Complex conditional logic combining multiple factors<br\/>\u2022\u00a0Custom calculations beyond basic math<br\/>\u2022\u00a0Conditional loops that filter or accumulate data<br\/>\u2022\u00a0Dynamic content with formatted output<br\/><br\/>Most merchants use Flow successfully without ever writing Liquid code.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982643732","position":2,"url":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982643732","name":"What is Liquid in Shopify Flow?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"<strong>Liquid in Shopify Flow is a templating language that lets you access and manipulate store data for advanced automation.<\/strong> It enables you to:<br\/><br\/>\u2022\u00a0Read deeply nested data (order totals, customer details, product properties)<br\/>\u2022\u00a0Perform calculations and comparisons<br\/>\u2022\u00a0Build conditional logic with if\/else statements<br\/>\u2022\u00a0Loop through collections like line items<br\/>\u2022\u00a0Format data for human-readable output<br\/><br\/>Flow uses GraphQL-based Liquid syntax, which differs from theme Liquid.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982773136","position":3,"url":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982773136","name":"How do I write Liquid code in Shopify Flow?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"<strong>To write Liquid in Shopify Flow, click in any condition or action field and either use the variable picker or type Liquid code directly.<\/strong> Follow these steps:<br\/><br\/>\u2022 <strong>Click the input field<\/strong> where you want to add Liquid<br\/>\u2022 <strong>Use the variable picker<\/strong> to browse available objects and properties<br\/><strong>\u2022 Or type manually<\/strong> using double curly braces: {{ object.property }}<br\/><strong>\u2022 For logic, use<\/strong> curly braces with percent signs: {% if condition %}<br\/><strong>\u2022 Test your code<\/strong> using Flow's \"Log output\" action before going live<br\/><br\/>Always use the variable picker to avoid syntax errors.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982773933","position":4,"url":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982773933","name":"What's the difference between Liquid in themes vs Flow?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"In themes, Liquid generates HTML for your storefront. In Flow, Liquid evaluates data to make decisions (conditions) or create dynamic values (action inputs). The syntax is the same, but the context and available objects differ.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982774594","position":5,"url":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982774594","name":"How do I test Liquid code in Shopify Flow?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"<strong>Test Liquid code in Flow using the \"Log output\" action.<\/strong> Here's the process:<br\/><br\/>\u2022\u00a0Add a \"Log output\" action to your workflow<br\/>\u2022\u00a0Paste your Liquid code into the log field<br\/>\u2022\u00a0Run the workflow with a real or historical trigger<br\/>\u2022\u00a0Check the workflow run history to see the output<br\/>\u2022\u00a0Verify the results match your expectations<br\/><br\/>Alternatively, use Flow's Preview function to see which workflow path a specific order\/customer would take, though it won't show actual Liquid output values.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982821977","position":6,"url":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982821977","name":"How do I access order total in Shopify Flow Liquid?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"<strong>Access order total in Flow using {{ order.totalPriceSet.shopMoney.amount }}<\/strong>. This returns the order total as a decimal (e.g., 125.99 for a $125.99 order).<br\/><br\/>For conditions checking if order exceeds $100:<br\/><br\/>{% if order.totalPriceSet.shopMoney.amount > 100 %} high-value-order {% endif %}<br\/><br\/>Note: Flow uses decimals, not cents. Don't divide by 100 or you'll get incorrect values.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982822787","position":7,"url":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982822787","name":"Can I use Liquid to access metafields in Flow?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Yes! Use syntax like {{ product.metafields.namespace.key }} or {{ customer.metafields.custom.field_name }}. Make sure metafields are set up in your store first. Flow only accesses existing metafields, it cannot create new ones.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982863348","position":8,"url":"https:\/\/www.getmesa.com/blog\/using-liquid-in-shopify-flow\/#faq-question-1767982863348","name":"Do I need Shopify Plus to use Liquid in Flow?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"No, Liquid is available in Flow on all Shopify plans (Starter, Basic, Shopify, Advanced, Plus). However, some Flow features like \"Run code\" action are Plus-only.","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/posts\/17718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/comments?post=17718"}],"version-history":[{"count":60,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/posts\/17718\/revisions"}],"predecessor-version":[{"id":18560,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/posts\/17718\/revisions\/18560"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/media\/17719"}],"wp:attachment":[{"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/media?parent=17718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/categories?post=17718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.getmesa.com/blog\/wp-json\/wp\/v2\/tags?post=17718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}