This example stops the same customer from purchasing a limited-quantity commemorative item or a first-come, first-served special product a second time. It combines three features: a customer rule, a quantity rule, and Shopify Flow.
If you are on the Full plan, you can set the same limit with a cumulative quantity rule alone. You do not need a customer tag or Shopify Flow. For the steps, see (Use Case) One Per Customer with a Cumulative Quantity Rule.
When all three settings are enabled, whether a customer can purchase the eligible item depends on whether they are logged in and whether they have the purchased tag.
Logged-in customers without the
purchasedtag: Purchase is allowed, up to 1.Logged-in customers with the
purchasedtag: Purchase is not allowed.Guests (not logged in): Purchase is not allowed, because an account is required.
However, if another order is placed before Shopify Flow finishes adding the tag, the limit may not apply (see "Limitations and operation of this method" for details). You can check the behavior on [Demo] Purchase limit: One item per person.
Complete the initial setup for customer limits. If you have not done this yet, see Initial Setup (Customer Limits).
Install Shopify Flow. It is used to add a customer tag to customers after they purchase.
Create a customer rule that blocks purchases by customers with the purchased tag and also blocks purchases by guests.
(1) Open the customer rule creation screen
Open the app admin → "Customer limits", then select "Manage" on the "Customer rules" card → "Create rule".
(2) Enter the settings
"Require account" and the block on the purchased tag are the key settings for this limit.
Field | Value |
|---|---|
Title | Any internal title |
Customer accounts | Check "Require account" |
Customer tags | Add |
Eligible items | The products or collection to limit to one per customer |
Product message | Enter if needed |
Display timing | Cart updated and checkout |
Alert message | Enter if needed |
Note: In this example, keep "Require account" checked. If you uncheck it, not being logged in no longer blocks the purchase, and the display timing is fixed to "Checkout only".
(3) Save and enable it
Select "Save", then select "Enable".
Limit the same product to 1 per order. When "Applicability" is set to "Product", the rule checks the total quantity of the same product, even across different variants.
(1) Open the quantity rule creation screen
Open the app admin → "Quantity limits" → "Quantity rules" → "Add quantity rule".
(2) Enter the settings
Set both "Minimum quantity" and "Maximum quantity" to 1, and set "Applicability" to "Product".
Field | Value |
|---|---|
Title | Any internal title |
Minimum quantity | 1 |
Maximum quantity | 1 |
Increment | Not set |
Applicability | Product |
Eligible items | The same products or collection as in Step 1 |
Product message | Enter if needed |
Display timing | Cart updated and checkout |
Message for maximum order quantity | Enter if needed |
(3) Save and enable it
Select "Save", then select "Enable".
Create a workflow that automatically adds the purchased tag to customers who purchase the eligible item when an order is created.
(1) Create a new workflow
Open Shopify Flow and create a new workflow. For how to create one, see Creating workflows in Shopify Flow in the Shopify Help Center.
(2) Set the trigger, condition, and action
Use the same products as in Steps 1 and 2. Use the same tag name as in Step 1: purchased.
Trigger: "Order created"
Condition: The order includes the eligible item (filter by product ID, product name, product tag, SKU, or similar)
Action: Add
purchasedwith "Add customer tags"
(3) Turn on the workflow
Save the workflow and turn it on. The tag is not added until the workflow is on.
Using a test customer account, check the purchase limit and the Shopify Flow tagging separately.
(1) Check the purchase limit
In the cart and at checkout, confirm the following. You can add or remove the purchased tag on the test account manually from the customer page in the Shopify admin.
Logged in with an account without the
purchasedtag: You can proceed to checkout with 1 eligible item, but not with 2Logged in with an account with the
purchasedtag: You cannot purchase the eligible itemLogged out: You cannot purchase the eligible item
(2) Check the Shopify Flow tagging
With a test account that does not have the purchased tag, order 1 eligible item and confirm that the purchased tag is added to the account automatically. After the tag is added, also confirm that the same account can no longer purchase the eligible item. If your condition filters products, also confirm that ordering a product outside the filter does not add the tag.
Delay before the tag is added: If another order is placed before Shopify Flow finishes adding the tag, that order may get through the limit.
Limiting several products to one per customer independently: Use a separate customer tag, customer rule, and Shopify Flow workflow for each product. If one tag is shared, purchasing any one of the products also blocks the other eligible items.
Purchases from another account: The limit is per customer account. If the same person creates a new account with a different email address, they can purchase again.
The tag stays after cancellation: Canceling an order does not automatically remove the tag added by Shopify Flow. To lift the limit, remove the tag from the customer page in the Shopify admin.