Shopify Liquid support in Flow

Shopify Flow supports the use of Shopify Liquid in its many of its workflow actions. You can add template variables to any text field that contains the Add template variable link in Flow. Workflow actions that contain such text fields include Send email message, Send Slack message, Send HTTP request, and Update order note.

However, there are some gaps in parity between the Liquid objects, variables, and tags that are supported by Flow, which are described here. To learn more about template variables, see the examples page. If you have any questions, contact your Merchant Success Manager.

Template variable support

Template variables in Shopify Flow are roughly equivalent to the same named attributes of the Shopify Liquid objects. We recommend that you use the template variables that are listed on the Add template variable dialog.

Support for Shopify Liquid conditional and iteration tags

You can use Liquid variable tags in your workflows. For example, those experienced with Liquid can use a for loop object to iterate through a list of objects, such as line items for an order.

This means that if you use an email or Slack action for a workflow, then you can list details like product title, SKU, price, and quantity for each line item within the message and eliminate the need for the recipient to view the order within your Shopify admin.

Flow supports all Shopify Liquid conditional (or control flow) tags:

Flow also supports all Shopify Liquid iteration tags:

Line item template variables

If you're familiar with Shopify Liquid, then you might want to use advanced features like Liquid tags in your workflows.If you are familiar with Shopify Liquid, you might want to take advantage of such advanced features such as tags. For example you can use a for loop tag to list line item details, such as the name of each product order as well as its SKU and price. To do this, you also need to use the lineitems object. The lineitems object that Flow supports is slightly different from the one that is described in the Shopify Liquid documentation.

The following table describes the current template variables that are supported for the lineItems object:

Template variable Data type Description
canRestock Boolean Whether the item ordered in the line item can be restocked if it is returned or the order is canceled.
discountedTotal Money Amount of the discount applied to the line item.
discountedUnitPrice Money Unit price of the product variant after its per-unit discount had been applied.
fulfillableQuantity Integer Number of product variants that still need to be fulfilled. This value is based on quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity - open_fulfilled_quantity.
fulfillmentStatus String How far along an order is in terms line items fulfilled. Valid values: fulfilled, null or partial.
name String Name of the ordered product.
nonFulfillableQuantity Integer Number of line items that cannot be fulfilled.
originalTotal Money Total price (without discounts) of the line item, based on the original unit price of the variant multiplied by the quantity ordered.
originalUnitPrice Money Variant price without any discounts applied.
Quantity Number Number of variant items ordered.
refundableQuantity Integer Number of items in the line item that can be refunded.
requiresShipping Boolean Whether physical shipping is required for the variant.
SKU String Variant SKU number.
taxable Boolean Whether the variant is taxable.
title String Title of the product or variant (this field only applies to custom line items).
totalDiscount Money Total amount discounted from the order. Includes line item and order-level discounts.
unfulfilledDiscountedTotal Money
unfulfilledOriginalTotal Money
unfulfilledQuantity Integer
variantTitle String Name of the variant.
vendor String Name of the vendor who made the variant.

Customer template variables

The following list contains the template variables related to customers:

  • Accepts marketing - Shows True when the customer has agreed to accept marketing materials. Otherwise shows False.
  • Average order amount - Shows the average amount ordered.
  • Can delete
  • Display name
  • Email
  • First name
  • Has note
  • Has timeline comment
  • ID
  • Last name
  • Lifetime duration
  • Note
  • Phone
  • State
  • Tax exempt
  • Total spent
  • Verified email
  • Default address address 1
  • Default address address 2
  • Default address city
  • Default address company
  • Default address country
  • Default address country code
  • Default address first name
  • Default address formatted area
  • Default address last name
  • Default address latitude
  • Default address longitude
  • Default address name
  • Default address phone
  • Default address province
  • Default address province code
  • Default address zip
  • Image alt text
  • Last order billing address matches shipping address
  • Last order buyer accepts marketing
  • Last order can mark as paid
  • Last order cancel reason
  • Last order capturable
  • Last order cart discount amount
  • Last order closed
  • Last order confirmed
  • Last order currency code
  • Last order customer locale
  • Last order discount code
  • Last order display financial status
  • Last order email
  • Last order fulfillable
  • Last order fully paid
  • Last order has timeline comment
  • Last order landing page display text
  • Last order name
  • Last order net payment
  • Last order phone
  • Last order referral code
  • Last order referrer display text
  • Last order refundable
  • Last order requires shipping
  • Last order risk level
  • Last order subtotal price
  • Last order taxes included
  • Last order test
  • Last order total capturable
  • Last order total discounts
  • Last order total price
  • Last order total received
  • Last order total refunded
  • Last order total shipping price
  • Last order total tax
  • Last order unpaid

Order template variables

The following list contains the template variables related to orders:

  • Billing address matches shipping address
  • Buyer accepts marketing
  • Can mark as paid
  • Cancel reason
  • Capturable
  • Cart discount amount
  • Closed
  • Confirmed
  • Currency code
  • Customer locale
  • Discount code
  • Display financial status
  • Email
  • Fulfillable
  • Fully paid
  • Has timeline comment
  • ID
  • Landing page display text
  • Name
  • Net payment
  • Note
  • Phone
  • Referral code
  • Referrer display text
  • Refundable
  • Requires shipping
  • Risk level
  • Subtotal price
  • Taxes included
  • Test
  • Total capturable
  • Total discounts
  • Total price
  • Total received
  • Total refunded
  • Total shipping price
  • Total tax
  • Unpaid
  • Billing address address 1
  • Billing address address 2
  • Billing address city
  • Billing address company
  • Billing address country
  • Billing address country code
  • Billing address first name
  • Billing address formatted area
  • Billing address last name
  • Billing address latitude
  • Billing address longitude
  • Billing address name
  • Billing address phone
  • Billing address province
  • Billing address province code
  • Billing address zip
  • Channel handle
  • Channel name
  • Customer accepts marketing
  • Customer average order amount
  • Customer can delete
  • Customer display name
  • Customer email
  • Customer first name
  • Customer has note
  • Customer has timeline comment
  • Customer last name
  • Customer lifetime duration
  • Customer note
  • Customer phone
  • Customer state
  • Customer tax exempt
  • Customer total spent
  • Customer verified email
  • Customer journey customer order index
  • Customer journey days to conversion
  • Display address address 1
  • Display address address 2
  • Display address city
  • Display address company
  • Display address country
  • Display address country code
  • Display address first name
  • Display address formatted area
  • Display address last name
  • Display address latitude
  • Display address longitude
  • Display address name
  • Display address phone
  • Display address province
  • Display address province code
  • Display address zip
  • Marketing attribution campaign
  • Marketing attribution content
  • Marketing attribution medium
  • Marketing attribution source
  • Marketing attribution term
  • Physical location is primary
  • Physical location name
  • Shipping address address 1
  • Shipping address address 2
  • Shipping address city
  • Shipping address company
  • Shipping address country
  • Shipping address country code
  • Shipping address first name
  • Shipping address formatted area
  • Shipping address last name
  • Shipping address latitude
  • Shipping address longitude
  • Shipping address name
  • Shipping address phone
  • Shipping address province
  • Shipping address province code
  • Shipping address zip
  • Shipping line custom
  • Shipping line price
  • Shipping line shipping rate handle
  • Shipping line title
  • Suggested refund amount
  • Suggested refund maximum refundable
  • Suggested refund subtotal
  • Suggested refund total taxes

Product template variables

The following list contains the template variables related to products:

  • Available product count
  • Description
  • Handle
  • Has only default variant
  • Has out of stock variants
  • ID
  • Is gift card
  • Product type
  • Publication count
  • Template suffix
  • Title
  • Total variants
  • Tracks inventory
  • Vendor
  • Feedback summary

Product variant template variables

The following list contains the template variables related to product variants:

  • Available for sale
  • Barcode
  • Compare at price
  • Harmonized system code
  • ID
  • Inventory management
  • Inventory policy
  • Inventory quantity
  • Inventory quantity prior
  • Position
  • Price
  • Requires shipping
  • SKU
  • Taxable
  • Title - The
  • Weight
  • Weight unit
  • Fulfillment service handle
  • Fulfillment service inventory management
  • Fulfillment service inventory management
  • Fulfillment service product based
  • Fulfillment service service name
  • Image alt text
  • Product available publication count
  • Product description
  • Product handle
  • Product has only default variant
  • Product has out of stock variants
  • Product is gift card
  • Product product type
  • Product publication count
  • Product template suffix
  • Product title
  • Product total inventory
  • Product total variants
  • Product tracks inventory
  • Product vendor

Store template variables

The following list contains the template variables related to your store:

  • Channel count
  • Checkout API supported
  • Currency code
  • Customer accounts
  • Description
  • Email
  • IANA timezone
  • Myshopify domain
  • Name
  • Pending order count
  • Setup required
  • Tax shipping
  • Taxes included
  • Weight unit
  • Billing address address 1
  • Billing address address 2
  • Billing address city
  • Billing address company
  • Billing address country
  • Billing address country code
  • Billing address first name
  • Billing address formatted area
  • Billing address last name
  • Billing address latitude
  • Billing address longitude
  • Billing address name
  • Billing address phone
  • Billing address province
  • Billing address province code
  • Billing address zip
  • Features storefront
  • Primary domain host
  • Primary domain SSL enabled

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free