Personalized checkout and custom promotions with Shopify Scripts
Hello,
I am attempting to create a discount script for multiple yet not all customers: a certain subset of customers in Texas and Oklahoma shall receive 50% off.
Currently, I am accomplishing this with a 50% discount code. However, I want to create a smoother user experience for the customer by having an automatic script discount.
Example:
Could I accomplish this users a customer tag?
I am using the Debut theme.
Thanks,
Solved! Go to the solution
This is an accepted solution.
Hi @NickBartelme, it's great that you are trying to make a smoother experience for your customers. I think adding a tag to Customers 1, 2 and 3 would be a good way to go. Here is how I would propose setting your discount up:
If all goes well, then the following should all happen:
You can learn more about accessing the shipping information in a script here: https://help.shopify.com/en/manual/checkout-settings/script-editor/shopify-scripts#shippingaddress
Let me know if you are having trouble getting it to work. I can provide a script for you.
This is an accepted solution.
Hi @NickBartelme, it's great that you are trying to make a smoother experience for your customers. I think adding a tag to Customers 1, 2 and 3 would be a good way to go. Here is how I would propose setting your discount up:
If all goes well, then the following should all happen:
You can learn more about accessing the shipping information in a script here: https://help.shopify.com/en/manual/checkout-settings/script-editor/shopify-scripts#shippingaddress
Let me know if you are having trouble getting it to work. I can provide a script for you.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025