Re: Assistance Needed: Automatic Discount Not Applying for Segmented Customers at Checkout Sign-In

Assistance Needed: Automatic Discount Not Applying for Segmented Customers at Checkout Sign-In

sgomez
Tourist
11 0 1

Hello, 

I implemented the solution from the provided documentation to apply automatic discount codes for segmented customers upon sign-in. I understand that Shopify's native functionality applies automatic discounts universally, not for segmented customers.

While the documentation's code works as intended, an issue arises when customers sign into their accounts via the checkout page. In this scenario, the discount does not automatically apply.


Most customers tend to sign in at checkout rather than earlier in their journey. To apply the discount, they currently need to navigate back to the homepage and return to the checkout page, which creates a poor user experience and appears glitchy. Is there a way to modify this code so that the automatic discount works seamlessly, even when the customer signs in directly at the checkout page?

I have recorded a screen capture to demonstrate the issue:
Website URL: https://truenorthshop.com/

Thank you for your assistance!

Replies 4 (4)

tobebuilds
Shopify Partner
515 38 137

Hi Sgomez,

 

The issue here is that the JavaScript-based discount application workaround has significant limitations that aren't often discussed. While it's a popular approach, Shopify doesn’t allow for custom code at checkout unless you’re on Shopify Plus and using a Checkout UI extension—not just a simple fetch('/discount/CODE') snippet. This means that the code snippet from the article won't be triggered at checkout. This limitation often creates a frustrating user experience, as you've described.

 

Instead of spending time on this workaround, consider using an actual automatic discount solution designed for specific customers. Our app, Regios Discounts (4.9 stars, 70 reviews, Built for Shopify), solves this seamlessly.

 

While we can't directly use Shopify segments due to Shopify Functions API limitations, our app supports customer tags, metafields, order count, location, and more. You can use Shopify Flow to tag customers automatically based on specific criteria, and our app will apply the discount seamlessly in the cart and checkout—even when customers sign in at checkout.

 

Here’s an example of how you can set this up:

 

discount_for_customers_with_a_specific_tag (2).png

 

This setup shows how to create an automatic discount for customers with a specific tag.

 

Let me know if you’d like further guidance, and I’d be happy to help!

 

Best,
Tobe Osakwe

Founder, Regios Discounts app (4.8 stars, 78 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer
sgomez
Tourist
11 0 1

Thank you for you reply.
I understand where you coming from but paying $100/mo for this small functionality is very expensive... 
Since I only need this 1 feature I'm looking for a custom code solution that wouldn't require me to pay for Shopify Plus or a pricey app.

Let me know if you can help me out with this. 

tobebuilds
Shopify Partner
515 38 137

Just to clarify, our $99/mo plan applies only if you’re applying discounts to over 1000 orders per month through our app, which would be quite fair considering the sales volume enabled by our app in that case. For lower volumes, our plans start at $29.99/mo or $49.99/mo without taking a percentage of your sales.

 

Cheers, Tobe

Founder, Regios Discounts app (4.8 stars, 78 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer

bantikyan
Shopify Partner
20 1 2

Hello, 

Our app Stack Discounts Ninja also provides automatic discounts based on specific customer tags.

 

For basic requirements you need, after installation, enable the app.

Then you need to create an Automatic Campaign, and select customer tags:

bantikyan_0-1733925156827.png

 

Add one or more discounts under this campaign.

We’re not sure if our pricing suits you, but feel free to check it out and decide!

 

Thanks.

Hovhannes
Customer Support Agent for Stack Discounts Ninja
- Like this comment to let me know my answer was helpful
- Mark my answer as an Accepted Solution if my answer solved your issue!