All things Shopify and commerce
Our store has a member discount and frequently offers member discounts on special events. Is there a way to tag certain customers as a member, then have an item automatically discounted? Discount codes distributed to members only frustrates them if they can't find/remember the code, and could also be passed to non-members or wind up on some on-line coupon list.
Hi Tobe, this looks promising and very reasonably priced. I had a couple questions after going through the demo.
1) In the demo when you get to checkout the discount code field with the apply button is showing. If you don't have any normal discounts set up would this be hidden like it is normally? And if not, would it still be hidden for any customer who is not tagged with the discount?
We like to keep this field hidden as it just prompts people to go look for a discount and hurts conversion, so we're looking for a way to offer a discount to specific customers without showing the field.
2) What are the options for applying a discount to a customer? Mainly interested in if it can it be set up for one-time use (get 10% off your next order) and will just stay in their account until they use it, and then go away after that.
Thanks!
Would your app be able to take a dollar amount from a Meta Field to apply the discount?
Tobe,
Awesome work! I see that Shopify has a similar built now but shows the discount in the cart only. Would this work with subscriptions?
Actually I now realize the option to use tags is only available for coupons, not for automatic discounts....omg.
Sorry for replying to an older thread, but I am stuck...
I'm looking to use Metafields to have the dicounted price of the product and when a customer with a specific tag logs in, they are presented with the pricing from the MetField. Is that possible with Functions?
Guess what guys!? It works like a charm! Your selected tagged customers and your auto discount! Thank you Regios Technology!!
Note that the customer.tags code given here loads from the CART, ON CLICK of the CHECK OUT BUTTON. So to test it, you can’t just refresh the Checkout page. You need to back out to the Cart and reload, then click the Check Out button to to load it into the Checkout.
That right there was a couple hours of frustration for me, so thought I'd spare someone else that pain!
I would like to add my vote for support in this becoming a native feature, and frankly, I was very surprised to find it wasn't already. I actually can't believe the official response from Shopify was to 'buy an app'. You are genuinely suggesting your customers spend upwards of $30USD a month for an external app to simply tag specific customer groups for automatic discounts? Shopify, are you serious? That's extortion.
Please add this feature @Shopify.
Add it. Wake up and add it. Do it now. Make it native to the software. Do it. Do it. Do it. now.
I'm just building my store now. Researched every possible method of doing a wholesale part of my website. And somehow I am now just coming across the most simple option, which is to allow automatic discounts for tagged customers or specific customers. Discount codes have specific customers, but automatic discounts do not, because of course this would directly enable the wholesale part of your website.
This isn't like my little 'Instafeed' app, for example. This should be a core function of Shopify.
And most wholesale apps cost at least the same MONTHLY price as Shopify itself, at least doubling your website cost? Get out of here.
Anyone have any alternatives to Shopify to have a simple price reduction for certain customers?
This is really annoying me. I have put so much time into adapting this website to how I want it to, adding some things that I thought should already be there. This is really the final straw. I'm looking at alternatives to @Shopify now.
This would be an awesome and simple feature. Maybe with Shopify stock down 70% YTD they will listen to what their customers want.
I'm blown away that after this long Shopify still does not bother to bake in functionality that almost all of its user-base would utilize.
As @nathanhelloari mentioned, Customer Segments are currently available for Discount Codes! It's much more powerful than customer tags, so that's much appreciated, BUT WE NEED IT FOR AUTOMATIC DISCOUNTS.
Shopify has been on a good path with new features like Customer Segments and Merge Customers. I am hopeful that much-needed, long-overdue features like this will be added in short order.
Still not able to do this. I could really use this! I'm actually surprised we can't tag customers for a private discount
Adding my support for this feature as well 👍 We have a customer segment that we want discounts applied to automatically rather than requiring them to add them themselves.
Hey, Ryan, this is almost possible now with Shopify Functions. You can't check whether a customer is in a segment, but you can at least check whether a customer has a given tag, and apply a discount accordingly.
https://shopify.dev/docs/api/functions/reference/order-discounts/graphql/common-objects/customer
That's what I ended up using in my automatic discount app. Not sure what your setup is, but I reached out to the Shopify Functions developers today to ask if there are any plans to add support for segments soon. No response yet, but hopefully they have something in the works!
CRAZY that this function isn't available yet. Apps don't even offer this functionality.
Hi @sjmet
Isn't this just part of Shopify? I was able to create discounts that are tagged and had no issues creating new products and attaching the discount codes to that products.
Please explain what exactly the issue is here. It seems it's been fixed now... is it?
Hi @iccagus , I think you are referring to discounting a tagged product. We are refurring to discount to a tagged customer. You cannot tag a customer group, say VIP, and give a discount to only your VIP customers.
Hi @Denise-in-NZ But there's a huge caveat in that.
So, let's assume:
You have a VIP customer A. Their email ID is: john@example.com for example.
(Since all the customers are identified in Shopify via their email)
Now if they come back another day, and use their email - well they should get a discount. That's the expected behaviour. It's good.
But, what if someone else simply puts in John's email for whatever reason? Well, then they will get the discount on John's behalf.
That's a huge security flaw. And, one of the ways to bypass this is by verifying if John is the one utilizing the discount, and no one is impersonating them through his email.
Hope this helps!
Please let me know if I missed something.
Cheers!
Not if accounts require login...
Our devs were able to overcome this challenge using Shopify scripts alongside tagging. This obviously only applies if you, or your client, is on Shopify Plus.
We've implemented this for a client and it's been working well now for the past 3-4 weeks alongside discount codes and gift cards. Everything is 100% native.
The client we speak of was on Wholesale Gorilla for about a year. We then tried out Shopify B2B for about 6-months but gave up on that due to all sorts of bugs.
Sharing is caring...
Big surprise, another blatantly obvious missing feature which SHOULD be part of the platform and people have been BEGGING for it for years, and Shopify does nothing about it. I can create a discount code and filter customer eligibility by things like Specific Customer Segments or Specific Customers, but when I select Automatic Discount that option goes away. WHY? WHY? WHY!?! That makes absolutely no damn sense.
Check out the app ADG -- Discount & Gifts.
It fills that space for now, until Shopify implements this very basic feature.
Hey, I'm working on a new app to solve this problem. It'll be free for early adopters, so send me a DM if you're interested.
Now that Shopify Functions are available for all stores, it's possible to create discounts with practically unlimited logic, that will load fast as well. So if you're not wanting to use an app, you should use Functions on your store directly.
Not sure if you are still looking (cause it has only been 4 years) but give this new app a go... works for me and does everything I think we were looking for https://apps.shopify.com/regios-automatic-discounts
FINALLY A SOLUTION! Thank you
Can't the app work using only the Shopify Customer ID? Why does it ask for the customer's name and email data?
Personally, I don't want to share my customers' data with a third-party app. This feature should be built into Shopify.
Hi Ram, I'm Tobe, the developer of Regios Automatic Discounts.
The customer's name and email data is not stored on the app servers at all. It is only used for the "Search customers" functionality, as shown in these screenshots:
The actual data associated with the discount is sent to Shopify via their GraphQL API, and stored on their servers.
I’ll check it out. Thnx
Reply in this thread if you have any further questions, and I'll be happy to answer!
I have no intentions to ever retain stores' customer data on my server. Doing so would be a privacy and security minefield.
If anything, I'm lucky that Shopify Functions allow metafield configuration - this is the only place customer data is stored, and that's hosted by Shopify themselves.
It works beautifully just adding the tag to your customer! You then develop a new discount with that tag.
Whoa, I just found this whopper of a thread-after posting a very similar question too. I searched in here before posting as well, but came about this thread from google search. So-did this get resolved?
We're still waiting! But I'm going to look into the Functions option that someone mentioned above...
Any luck on the Functions option?
I haven't had a chance to explore the Functions option yet. Would love to hear if anyone else has!
Here, i've used this. Install or open Shopify Scripts app, create a new script, choose line item, blank from template.
copy and paste this code:
DISCOUNT = 0.10
CUSTOMER_TAG = "test-discount"
MESSAGE = "MESSAGE TO DISPLAY FOR DISCOUNT"
class DiscountBasedOnTag
def initialize()
end
def run(cart)
if !Input.cart.customer.nil? and Input.cart.customer.tags.include?(CUSTOMER_TAG)
cart.line_items.each do |line_item|
line_item.change_line_price(line_item.line_price * (1-DISCOUNT), message: MESSAGE)
end
end
end
end
CAMPAIGNS = [
DiscountBasedOnTag.new()
]
CAMPAIGNS.each do |campaign|
campaign.run(Input.cart)
end
Output.cart = Input.cart
for the variables at the top, swap in your desired values. discount works as a decimal, so 0.10 is 10%, 0.20%, etc
The message is what will display in the cart under the changed price.
the CUSTOMER_TAG needs to be an exact match to the tag you will apply to your customer profiles.
I kind of have to thank shopify for being so negligent here. If it wasn't for their lack of basic features, i wouldn't have learned how to use the scripting engine, which has actually opened a ton of doors for promotions that we can't do natively.
Shopify Scripts are deprecated, and will be removed on August 28th 2025; you can find more information in the Shopify Help Center: https://help.shopify.com/en/manual/checkout-settings/script-editor
Also, Shopify Scripts is only available in Shopify Plus, so unfortunately, most stores won't be able to use it to solve this problem.
Hi -
Not sure if you all are still looking for this to be done as Native by shopify (cause it has been 4 years) but you can try the Discount Depot App which offer discounted prices on your products and collections, on the basis of tags (wholesale, retail, trade etc) that means your product will show different price to different customers on the basis of the tags assigned to them.
App URl https://apps.shopify.com/custom-pricing-shipping
Let me know if you find this app suitable for your stores.
I have been using the same app for my clients.
This thread is 4 years old and this feature still doesn't exist? It has nearly 50k views, clearly the people want this.
Found this on another community page. This video will teach you how to use liquid in the theme to apply a discount code based off a users tag: https://www.youtube.com/watch?v=id-U46Lljz0 .
Reading the comment this may have been broken at some time. I am going to try and will update this comment if it works.
Please add customer segmentation to automatic discounts!
Or at least an app which can do this. Using tags is not optimal.
Reading through the posts.... 4 years 3 months and still no proper response from Shopify???
Apps... Apps... Apps... Always their response. Sorry, but I'm not giving away my profits to someone else for something so menial.
This has been our work around for years... not pretty but it works. (can't remember where I found this)
<div class="cart-content-item cart-total" data-cart-total>
<form action="{{ routes.cart_url }}" method="post" novalidate>
{% if customer.tags contains 'VIP CLUB' %}
<input class="js-form-discount" type="hidden" name="discount" id="cart-coupon-code" value="VIBeadClub">
{% else %}
{% if customer.tags contains 'VIP Level 1' %}
<input class="js-form-discount" type="hidden" name="discount" id="cart-coupon-code" value="VIP1">
{% else %}
{% if customer.tags contains 'VIP Level 2' %}
<input class="js-form-discount" type="hidden" name="discount" id="cart-coupon-code" value="VIP2">
{% else %}
{% if customer.tags contains 'VIP Level 3' %}
<input class="js-form-discount" type="hidden" name="discount" id="cart-coupon-code" value="VIP3">
{% else %}
{% if customer.tags contains 'WHOLESALE' %}
<input class="js-form-discount" type="hidden" name="discount" id="cart-coupon-code" value="WHOLESALE">
{% else %}
{% if customer.tags contains 'WHOLESALE-NEW' %}
<input class="js-form-discount" type="hidden" name="discount" id="cart-coupon-code" value="WHOLESALE-NEW">
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
<script type="text/javascript">
/*
@require
Jquery: https://jquery.com/
jquery-cookie: https://github.com/carhartl/jquery-cookie
Allows you to set a discount code via a URL and pass into shopify checkout
https://myshopifystore.com?coupon=MYCOUPONCODE
can append ?coupon=MYCOUPONCODE to any URL
*/
// Get paramaters from the URL
function getParameterByName(name, url) {
if (!url) {
url = window.location.href;
}
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
// This must be added to your checkout form
// <input class="js-form-discount" type="hidden" name="discount" value="RESELLERDISCOUNTCODE" >
$discountInput = $("input.js-form-discount");
// set cookie with passed in coupon code to any URL
$coupon = getParameterByName('coupon');
if($coupon){
// set a cookie with the coupon code
// Valid for 7 days : can adjust { expires: 7 } to whatever you want
// single / is a session cookie
$.cookie('discountCode', $coupon, { expires: 7 });
}
// Get cookie discount code value and set form value
$discountCode = $.cookie('discountCode');
if($discountCode){
if ($discountInput.length > 0) {
// if cookie is set and discount input field is on page set its value to cookie val
$discountInput.val( $discountCode );
}
}
</script>
It basically automatically ads the coupon code at checkout (through the checkout button) to customers with specific tags. - However... They must be logged in to their account for this to work.
Then I added this code so that logged in customs will see what their approximate savings will be.
<li class="cart-total cart-total-subtotal">
<div class="cart-total-label"><span class="text">{{ 'general.cart.subtotal' | t }}</span>
<div class="cart-total-value"><span class="text">{{ cart.original_total_price | money }}</span></div>
</div>
{% if customer.tags contains 'Tax Exempt' %}
<div class="total-price2_1">Taxes <div class="cart-total2_1" style="float: right;">Exempt</div></div>
{% endif %}
{% if customer.tags contains 'WHOLESALE' and cart.total_price <25000 %}
<div class="total-price1">You do not meet the <b>$250 minimum</b> amount for wholesale discount</div>
{% else %}
{% if customer.tags contains 'WHOLESALE-NEW' and cart.total_price <50000 %}
<div class="total-price1">You do not meet the initial <b>$500 minimum</b> amount for wholesale discount</div>
{% else %}
{% if customer.tags contains 'WHOLESALE' or customer.tags contains 'WHOLESALE-NEW' %}
<div class="total-price2">Wholesale Discount <div class="cart-total2" style="float: right;">- {{ cart.total_price | times: 0.30 | money }}</div></div>
{% else %}
{% if customer.tags contains 'VIP Level 3' %}
<div class="total-price2">VIP Level 3 Discount <div class="cart-total2" style="float: right;">- {{ cart.total_price | times: 0.15 | money }}</div></div>
{% else %}
{% if customer.tags contains 'VIP Level 2' %}
<div class="total-price2">VIP Level 2 Discount <div class="cart-total2" style="float: right;">- {{ cart.total_price | times: 0.10 | money }}</div></div>
{% else %}
{% if customer.tags contains 'VIP CLUB' %}
<div class="total-price2">V.I.Bead Club Discount <div class="cart-total2" style="float: right;">- {{ cart.total_price | times: 0.10 | money }}</div></div>
{% else %}
{% if customer.tags contains 'VIP Level 1' %}
<div class="total-price2">VIP Level 1 Discount <div class="cart-total2" style="float: right;">- {{ cart.total_price | times: 0.05 | money }}</div></div>
{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
{% if customer.tags contains 'Tax Exempt' %}
{% else %}
<p style="font-weight: 500; margin: 20px 0 0 0; letter-spacing: .02em; font-size: 12px">If you have a Status Card and wish to use it online, click
<b><a href="https://www.ibeadcanada.com/pages/first-nations-tax-relief-faqs"><font color="#dc3545"><u>HERE</u></font></a></b> before Checking Out to learn how.
</p>
{% endif %}
</li>
Like I said.... not pretty..... but hey! It works.
@Shopify It's been four years. Is there a reason this still hasn't been implemented. You already have Customer eligibility with discount codes. Why can't it be included in the automatic discounts? It seems unfair to force us to pay an additional amount to use an app, for what should be a simple feature.
They limit the basic functionality so that you have to pay for Shopify Plus. Another great example is reporting... you have to pay more to get better reporting.... I mean seriously Shopify....
Hi everyone,
The following tip worked like a charm for me in the Dawn theme:
I hope it helps,
Mike
Wow! That's much prettier (and easier) than the code I posted over a year ago. Going to have to try it on my next theme template update. - Thanks!
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024