Customer tag based automatic discount

irfan3
Shopify Partner
7 0 2

Hi,

 

Is it possible to create the customer's tag-based automatic discount using the automatic discount API: https://shopify.dev/apps/discounts/automatic

 

e.g: I want to offer a 10% discount to all customers who has ABDC tag.

 

Any help and clue to achieve similar either using the above API or using any custom approach are really appreciated.

 

Thanks

Replies 7 (7)

NiccosMedia
Shopify Partner
51 4 13

Based on the information provided in the Shopify developer documentation, it is possible to create a customer tag-based automatic discount using the Automatic Discounts API. This API allows you to create discounts that are automatically applied to orders based on certain conditions, such as the customer's tags or the items in their cart.

To create a customer tag-based automatic discount, you would need to use the POST /admin/discounts.json endpoint to create a new discount, and specify the customer_tag condition in the prerequisite_customer_tags property of the discount. For example, the following code creates a discount that offers a 10% discount to all customers who have the ABDC tag:

 

POST /admin/discounts.json

{
"discount": {
"title": "10% off for customers with the ABDC tag",
"target_type": "line_item",
"target_selection": "all",
"allocation_method": "percentage",
"value": "10.0",
"prerequisite_customer_tags": [
"ABDC"
]
}
}

 

Once you have created the discount, it will be automatically applied to orders that meet the specified conditions, in this case orders placed by customers who have the ABDC tag.

Greetings Niclas
Senior Front-End Developer
Founder of Niccos Media
Based in Germany
kontakt@niccos-media.de
irfan3
Shopify Partner
7 0 2

@NiccosMedia - can you please share the API reference link for the above?

 

I checked but did not get any REST API available for such an automatic discount.

 

 

 

EcomGraduates
Shopify Partner
588 48 78

Hello there  

Yes, it is possible to create a customer tag-based automatic discount using Shopify's automatic discount feature. Here's how you can do it:

  1. In your Shopify admin, go to Discounts and click on the "Create automatic discount" button.
  2. Select "Customer tag" as the discount type and choose the tag that you want to apply the discount to. You can also set the discount to apply to all customers with the tag, or only to specific customers.
  3. Set the discount amount and choose whether it will be a percentage or a fixed amount.
  4. Set the start and end dates for the discount, or choose to make it ongoing.
  5. Click "Save" to create the discount.

 

Once you've created the discount, it will automatically be applied to orders placed by customers with the specified tag. It's important to note that automatic discounts will only apply to eligible products and will not stack with other discounts or promotions.

You can also use Shopify's automatic discount feature to create discounts based on other criteria, such as the customer's location, the amount of the order, or the shipping rate. It's a useful tool for creating targeted promotions and offering special discounts to specific groups of customers.

 

irfan3
Shopify Partner
7 0 2

Hi,

 

Are you sure, the customer tag or segment option comes with an Automatic discount?

 

As checked,

 

It is not coming with an Automatic discount option: https://prnt.sc/wHX09aa-S2TV

It is coming only with a Normal discount: https://prnt.sc/zvp0oLrpX-Dy

 

Can you share a screenshot of what you are suggesting?

 

Thank you!

 

tobebuilds
Shopify Partner
264 13 74

Hey Irfan,

 

You're correct, there's no way to limit automatic discounts to customer tags in Shopify's built-in discounts.

 

I answered this question in another thread:

 

https://community.shopify.com/c/shopify-discussions/apply-automatic-discount-to-tagged-customers/m-p...

 

But TLDR, you have 2 options at this point:

  1. Use Shopify Functions to create your own discount manually. Here is the documentation: https://shopify.dev/docs/apps/functions
  2. Use an app, like Regios Automatic Discounts

Let me know if you have any questions. Even if you don't use my app, I can probably still help you in this thread.

Mike5241
Excursionist
49 0 9

Hi Irfan3,

 

The following tip worked like a charm for me in the Dawn theme:

https://www.linkedin.com/pulse/how-offer-automatic-discounts-specific-customers-shopify-dematis-tdr1...

 

I hope it helps,

Mike

Jibberjabber
Visitor
1 0 0

Hi Mike,

That's exactly what I was looking for. You've made my day.

Thanks for sharing!