Discussing Shopify Functions development, deployment, and usage in Shopify apps.
The automatic discounts made with the Product Discounts API target line items by variant ID. If I have two items in the cart with the same variant ID (one subscription item and one onetime item), I don't want the discount to apply to the subscription item. But because the API applies discounts based on variant ID and not line item ID, I have no way of specifying which line item should be discounted.
I thought maybe there would be some kind of GraphQL option for this, but I can't find one. When creating the discount in GraphQL I have the option to specify the combinesWith value with booleans for orderDiscounts, productDiscounts, and shippingDiscounts, but I have no option to specify combinesWith => subscriptions.
Is there a way to exclude subscription items from these discounts? Or is there an update on the horizon that will allow us to target specific line items rather than variant IDs? Thanks.