【Shopify Flow】ディスカウント別に注文・顧客タグを自動付与する設定方法

[Shopify Flow] How to Automatically Add Order and Customer Tags by Discount Type

Tsunライターチーム

When running a Shopify store, you'll frequently encounter the need to categorize orders and customers based on which discount (coupon code) was used, and to leverage that for future marketing and customer support. For example, you might want to send a follow-up email to customers who used a specific campaign code, or specially manage orders that used a first-purchase-only discount.

Doing this manually requires checking the discount details for every order and adding tags accordingly, which is extremely time-consuming. However, using Shopify Flow, you can fully automate this task.

This article explains in detail how to use Shopify Flow to automatically add order tags and customer tags based on the discount used when an order is placed. Since the setup method differs depending on the combination of the discount's "application method" (automatic discount / discount code) and "discount type" (order / product / shipping), we'll walk through specific steps for each case.

Types of Discounts

Shopify discounts come in the following types.

Application Method

Shopify discounts have two application methods: "automatic discount" and "discount code." Since the condition items (variables) used in Shopify Flow differ depending on the application method, you need to know in advance which application method your discount uses.

  • Automatic discount: An automatic discount is applied automatically once the conditions are met.
  • Discount code: A discount code is applied when the customer directly enters the code into the discount code field on the checkout page after the conditions are met.

The differences between automatic discounts and discount codes are explained in detail in the blog article below. Please use it as a reference.

Discount Type

Shopify discounts have three discount types: "product discount," "order discount," and "shipping discount." Just like the application method, the condition items (variables) used in Shopify Flow differ depending on the discount type, so you need to know this in advance.

  • Order discount: A discount applied to the order itself. This corresponds to discounts created using "Amount off order" on the discount page.
  • Product discount: A discount applied to product pricing. This corresponds to discounts created using "Amount off products" or "Buy X Get Y" on the discount page.
  • Shipping discount: A discount applied to shipping fees. On the discount page, this corresponds to discounts created using "Free shipping."

For more details on discount types, please refer to the blog article below.

How to Add Tags Based on Discounts

In this section, we'll introduce how to use Shopify Flow to "automatically add an order tag or customer tag based on the automatic discount used when an order was placed." If you haven't set up Shopify Flow yet, please read from "Preparation" in order. If you've already set up Shopify Flow, please check from "Step 1."

Preparation: Install Shopify Flow

Source:

Source: Shopify Flow|Shopify App Store

(1) Access the Shopify Flow app page from the Shopify App Store

(2) Click "Install"

What Is Shopify Flow?

Shopify Flow is a Shopify-native app that automates all kinds of tasks and processes that arise in store operations. It used to be available only on the Advanced plan, but since July 2023, it has also become available starting from the Basic plan. Shopify Flow can be installed for free from the Shopify App Store. It's a service similar to automation tools like Zapier and IFTTT.

For more details on Shopify Flow, please refer to the blog article below.

Step 1: Set "Order Created" as the Trigger

Click 'Create workflow'

(1) Open the Shopify Flow app

(2) Click "Create workflow"

Click 'Select trigger'

(3) Click "Select trigger"

Add the 'order created' trigger

(4) Add the "order created" trigger

Step 2: Set the Discount Variable in the Condition

(1) Hover the mouse over the "Order Created" step added in Step 1

(2) Click the "+ (plus) icon"

(3) Click "Condition"

Click 'Add variable'

(4) Click "Add variable"

(5) Add the following variable depending on the "application method" and "discount type"

  • For automatic discount & order discount: Order > discountApplications > AutomaticDiscountApplication > title
  • For automatic discount & product discount: Order > lineItems > discountAllocations > discountApplication > AutomaticDiscountApplication > title
  • For automatic discount & shipping discount: Order > shippingLines > discountAllocations > discountApplication > AutomaticDiscountApplication > title
  • For discount code & order discount: Order > discountApplications > DiscountCodeApplication > code
  • For discount code & product discount: Order > lineItems > discountAllocations > discountApplication > DiscountCodeApplication > code
  • For discount code & shipping discount: Order > shippingLines > discountAllocations > discountApplication > DiscountCodeApplication > code
Enter the Code (or Title)

(6) Enter the following Code (or Title) for the variable added in (5)

  • Automatic discount: Enter the discount title into the variable's Title
  • Discount code: Enter the discount code into the variable's Code

Step 3: Set Up Tagging as the Action

(1) Hover the mouse over the condition added in Step 2

(2) Click "True"

(3) Click "Action"

(4) Add the action for the tag you want to apply

  • To add an order tag: Add the "Add order tags" action
  • To add a customer tag: Add the "Add customer tags" action
Add the tag you want to apply to the action's Tags field

(5) Add the tag you want to apply to the Tags field of the action added in (4)

Step 4: Turn the Workflow On

Click 'Turn on workflow'

(1) Once you've completed the settings through Step 3, click "Turn on workflow"

Step 5: Test the Behavior

An order using a discount code

(1) Place an order using a discount

The customer tag has been added

(2) Check that the tag has been added as intended

Once you've confirmed the tag was added as intended, the setup is complete.

ℹ️ In this article, we set up a workflow that automatically adds the "TEST" tag to the customer when the discount code "TEST_CODE" (an order discount applied via a discount code) is used.

In Closing

This article introduced how to use Shopify Flow to automatically add order tags and customer tags based on discounts.

The variable referenced in Flow differs depending on the combination of the discount's application method (automatic discount / discount code) and discount type (order / product / shipping). Before setting things up, it's important to check which type the target discount falls under.

This automation allows you to efficiently manage and segment customers who use discounts, improving the quality of subsequent marketing initiatives and customer support.

Shopify Flow has many other templates and use cases available. Be sure to use it to streamline your store operations.

👆️目次はShopifyアプリ「RuffRuff 目次作成」を利用

👆️Table of contents by the Shopify app RuffRuff Table of Contents

Back to blog
  • Shopifyに棚卸し機能が登場!管理画面・POSでの操作手順を解説

    Shopify Introduces Stock Counts: How to Use The...

    Tsun ライターチーム

    Use Shopify's built-in stock counts to count inventory by location. Learn how to create a count and approve stock discrepancies in the Shopify admin, and how to count stock in...

    Shopify Introduces Stock Counts: How to Use The...

    Tsun ライターチーム

    Use Shopify's built-in stock counts to count inventory by location. Learn how to create a count and approve stock discrepancies in the Shopify admin, and how to count stock in...

  • Shopify Flowで商品の価格・タグ・メタフィールドの変更を検知する方法

    How to detect changes to product prices, tags, ...

    Tsun ライターチーム

    Use Shopify Flow’s Product updated trigger to detect changes to prices, tags, and metafields. See how to tag products for review when prices change and how to test the workflow.

    How to detect changes to product prices, tags, ...

    Tsun ライターチーム

    Use Shopify Flow’s Product updated trigger to detect changes to prices, tags, and metafields. See how to tag products for review when prices change and how to test the workflow.

  • Shopifyのファイル管理を徹底解説|対応形式・容量上限・フォルダ整理の方法

    Shopify File Management: Formats, Storage Limit...

    Tsun ライターチーム

    Learn how to manage images, videos, and PDFs in the Shopify admin. Check supported file formats and plan limits, then learn to create folders, move files, search, and delete.

    Shopify File Management: Formats, Storage Limit...

    Tsun ライターチーム

    Learn how to manage images, videos, and PDFs in the Shopify admin. Check supported file formats and plan limits, then learn to create folders, move files, search, and delete.

  • Shopifyと連携できる外部AI7選!対応機能・接続方法を比較

    7 AI Tools That Connect to Shopify: Features an...

    Tsun ライターチーム

    Compare seven AI tools that connect to Shopify. See which ones fit tasks like adding product images, analyzing sales, and working with Microsoft 365, and check the permissions and limits...

    7 AI Tools That Connect to Shopify: Features an...

    Tsun ライターチーム

    Compare seven AI tools that connect to Shopify. See which ones fit tasks like adding product images, analyzing sales, and working with Microsoft 365, and check the permissions and limits...

  • Shopifyのストア分析・レポートを画像付きで解説|使い方からカスタマイズまで

    A visual guide to Shopify Analytics and reports...

    Tsun ライターチーム

    Learn how to break down sales and sessions in Shopify Analytics, compare data across the session measurement update, and use bubble maps, custom data, and annotations.

    A visual guide to Shopify Analytics and reports...

    Tsun ライターチーム

    Learn how to break down sales and sessions in Shopify Analytics, compare data across the session measurement update, and use bubble maps, custom data, and annotations.

  • Shopifyで1つのバリエーションに複数のバーコードを登録する方法

    Shopifyで1つのバリエーションに複数のバーコードを登録する方法

    Tsun ライターチーム

    Shopifyでは、1つの商品やバリエーションに最大20個のバーコードを登録できます。管理画面とCSVでの登録手順、SKUとの違い、Shopify POSでの活用方法、外部サービス連携時の注意点を解説します。

    Shopifyで1つのバリエーションに複数のバーコードを登録する方法

    Tsun ライターチーム

    Shopifyでは、1つの商品やバリエーションに最大20個のバーコードを登録できます。管理画面とCSVでの登録手順、SKUとの違い、Shopify POSでの活用方法、外部サービス連携時の注意点を解説します。

1 of 6
  • AI仮想顧客の改善ツール「SimGym」を使ったら売上はどうなった?実行から3か月後までの記録

    What Happened to Sales After Using SimGym, an A...

    テキサス・アユミ

    A record of trying SimGym on the miso specialty store ドットミソ, from checking the proposals through carrying out changes to the look-back three months later. It covers how the order...

    What Happened to Sales After Using SimGym, an A...

    テキサス・アユミ

    A record of trying SimGym on the miso specialty store ドットミソ, from checking the proposals through carrying out changes to the look-back three months later. It covers how the order...

  • 【ストアインタビュー後編】やりながら育てるShopify。「野菜をMOTTO」の試行錯誤:モンマルシェ株式会社 河野雄士さん

    [Store Interview, Part 2] Building and Growing ...

    テキサス・アユミ

    "Even when e-commerce is the main battlefield, e-commerce isn't the goal." An in-depth look at our interview with Yuji Kono of Mon Marché, whose brand "Yasai wo MOTTO" grew its...

    [Store Interview, Part 2] Building and Growing ...

    テキサス・アユミ

    "Even when e-commerce is the main battlefield, e-commerce isn't the goal." An in-depth look at our interview with Yuji Kono of Mon Marché, whose brand "Yasai wo MOTTO" grew its...

  • 【ストアインタビュー前編】 ECが主戦場でも、ECが目的ではない。「野菜をMOTTO」が貫くEC戦略:モンマルシェ株式会社 河野雄士さん

    [Store Interview, Part 1] Even When E-Commerce ...

    テキサス・アユミ

    "Even when e-commerce is the main battlefield, e-commerce isn't the goal." Part 1 of our interview with Yuji Kono of Mon Marché, whose brand "Yasai wo MOTTO" grew its e-commerce...

    [Store Interview, Part 1] Even When E-Commerce ...

    テキサス・アユミ

    "Even when e-commerce is the main battlefield, e-commerce isn't the goal." Part 1 of our interview with Yuji Kono of Mon Marché, whose brand "Yasai wo MOTTO" grew its e-commerce...

1 of 3
  • Our Editorial Process

    For readers new to e-commerce and Shopify, we write our articles with care to explain difficult commerce and marketing terms, along with how everything works from building a store through to selling, as “gently,” “clearly,” and “accurately” as we can.

    Learn more 
  • About the information on this site

    The information published here is based on Tsun Inc.’s own experience and research. While we make every effort to publish information that is as “current” and “accurate” as possible, we cannot fully guarantee its contents. Tsun Inc. accepts no liability whatsoever for any damages arising from this site. If you find an error in the information published here, we would be grateful if you would contact Tsun Inc.