Shopify Flow - Use assign, capture, and map in Liquid

Published

This summary was written by ShopDigest AI from Shopify Changelog’s report. Read the full story ↗

In fields that allow Liquid in Flow, you can now make full use of the tags assign and capture to set variables. You can use the map filter to creat…

Overview

Shopify Flow now supports the Liquid tags assign and capture, along with the map filter, in fields that allow Liquid. These features enable more complex logic and variable manipulation within Flow workflows.

Key Details

  • assign allows complex math and string manipulations, and can use output from one tag in another.
  • capture lets you write complex logic and capture the output to a variable for reuse.
  • map creates an array of values from a property of items in a list, which can be combined with assign.

Frequently asked questions

What Liquid tags are now available in Shopify Flow?

Shopify Flow now supports the Liquid tags assign and capture in fields that allow Liquid. These tags let you set variables and capture output for reuse in workflows.

How can I use the map filter in Shopify Flow?

The map filter creates an array of values from a specific property of items in a list. For example, you can use it to output all product titles in a collection, and combine it with assign to store the result.

What can I do with the assign tag in Shopify Flow?

The assign tag allows you to perform complex math and string manipulations on a single field or list. It also lets you use the output of one set of tags in another, such as generating a random number.

How does the capture tag work in Shopify Flow?

The capture tag lets you write complex logic and strings, then capture the output of a block of Liquid to a variable. This allows you to define functions in one place and use the variable in simplified Liquid elsewhere.

About this story

Topics covered
Published
9 Aug 2022
Originally published at