Discussing Shopify Functions development, deployment, and usage in Shopify apps.
Hello!
We are currently developing a discount app where we would like to automatically apply discounts for certain customers/segments (e.g. if a merchant has a rewards system of some sort). However, automatic discounts cannot restrict to customers, only code discounts can.
I would love if that feature was added, it would make it much easier to create this functionality!
Quickly also, why is the product/collection restriction not a built-in feature for product discounts? It seems like it would make sense to have it process before our function is run, to save on resources. Plus, I can't seem to find a way to get a product's collections to filter them in my function. There's "inAnyCollection", but that's not useful since it's in the function's input though isn't it?
In the case of Functions, in order to better support this, we are working on adding support for variables in your input query. This would allow a merchant to configure the ID which you pass into inAnyCollection. Meanwhile, the only option would be to restrict based on individual products, or to hardcode values in your input query for custom apps.
Nick Wesselman | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Alright, that's what I've been thinking for now.
What about the customer segmentation support for automatic discounts? Is this something that might get added later? I don't really see why it's restricted to code discounts only.
I agree, it would solve a lot if this was available for both? I don't understand why it's restricted.