Discount based on SHIPPING region

I’m trying to create an automatic discount using the built-in discount, but I want it to only apply based on the shipping region. With the segments I have created a sample customer segment which has a query like this:

FROM customers
SHOW customer_name, note, email_subscription_status, location, orders, amount_spent
WHERE customer_regions CONTAINS ‘PH-XXX’
ORDER BY updated_at

In the “Eligibility” I select “Specific Customer Segments” and selected the sample segment I made. When I try to checkout, the discount applies even when my selected shipping region does not match that of the discount. Likely due to I have multiple address and one of those address matches the region of the discount. What I want to happen is that even if the case that the customer has multiple address, if the selected shipping address’s region does not match that of the discount, then the discount should not apply. It should only apply if the customer’s selected shipping for their checkout/order matches the discount. Is there a proper way to apply this or is there a Shopify App that can do this?

I totally understand the frustration, you set everything up correctly, your customer segment looks perfect, and yet the discount still fires even when the shipping address shouldn’t qualify. It feels like Shopify is ignoring your logic, right?

But the real issue is this:
Shopify’s built-in automatic discounts are not capable of checking the shipping address the customer chooses at checkout.

They only look at the customer’s saved profile data. So if the customer has any saved address that matches your segment (like PH-XXX), Shopify immediately decides:
“They belong to this segment, apply the discount.”

Even if the customer chooses a completely different address during checkout, Shopify doesn’t re-check the region. That’s why the discount still appears when it shouldn’t.

Why Your Segment Logic Isn’t Behaving the Way You Expect

Your query:

WHERE customer_ regions CONTAINS 'PH-XXX'

is actually scanning every address the customer has ever saved. So if just one of those matches PH-XXX, they get the discount, no matter what they pick at checkout.

I know that’s not how Shopify should work for your use case, but unfortunately that’s how the built-in system is designed.


Here’s the Straightforward Way to Fix This

1. Shopify simply does NOT support region-based discount rules at checkout.

There’s no native feature that says:
1 “Apply this discount only if the customer’s selected shipping address matches this region.”

So to get the behavior you want, you have two real options.


Option A — The Best Fix for Most Stores (Use a Discount Rules App)

Several apps can check the actual shipping address at checkout, not just the saved profile.

These apps support rules like:
2 “Apply discount only if shipping region = PH-XXX.”

Recommended apps that can do this:

  • Automatic Discounts & Gifts by Tabarnapp (very reliable for shipping-based rules)

  • Discount Ninja

  • Rebolt Automatic Discounts

  • WebsiteOnDemand Custom Pricing

These apps give you the exact control Shopify is missing.


Option B — If You’re on Shopify Plus (Custom Shopify Function)

If your store runs on Shopify Plus, you can use a Cart/Discount Function to check:

  • cart.shipping_address.province

  • cart.shipping_address.country

and apply or remove the discount in real time.
This gives you 100% accurate, checkout-level control.


Option C — Manual Discount Code (Not Ideal)

You can switch to a manual code and tell customers to apply it only if they qualify, but this isn’t automatic and relies on customer honesty.


My Honest Recommendation

For most stores:
:right_arrow: Use an app like Tabarnapp’s Automatic Discounts.
It will enforce the rule exactly the way you intended:
discount applies only when the customer’s actual checkout shipping address matches the region.

If you’re on Shopify Plus:
And you want this resolved quickly and professionally so you can focus on running your store, I’m ready to take care of it for you.

Just let me know when you’re ready, and I’ll handle the rest.