A question for custom storefront using Hydrogen. Is there a way to apply site wide discounts for a signed in user with specific tags? For example, we want to have our “distributor” users with the tag “Pro” to have a 30% discount site wide. I would prefer to not have to use a discount code at check out but rather just have the discount applied once they are logged in.
One approach to solve this would be to combine customer segments and discount codes.
First, create a customer segment:
Head to Admin > Customers > Segments. Select Create segment.
The query would be something like customer_tags CONTAINS ‘Pro’ (Apply → Save Segment)
Name the segment something like Distributor.
Then, create a discount which can only be used by the above customer segment.
Head to Admin > Discounts. Select Create discount > Amount off order
Configure the discount code and under ‘Customer eligibility’ select the new customer segment.
On the Hydrogen side, when a customer logs in, check for a Pro tag and create a session/cookie keeping track of this. Then when they create a cart, conditionally apply the discount code.