Hi,
I am developing a shopify custom app. I know that when we create discounts. These discounts are by default available in Online Store sales channel. I want to allow a specific sales channel lets name it Social to let the discount apply and reject the discount if it is tried in Online Store. Can I achieve this with publishablePublish or publishablePublishToCurrentChannel?
Any help would be appreciated.
1 Like
Hey @Qasim_Ali
Right now, it’s not possible to restrict discounts to certain sales channels, even by using publishablePublish and publishablePublishToCurrentChannel (these mutations are used for publishing products/collections to sales channels, not for controlling discount availability unfortunately).
I think, at the moment, the best workaround would be to use customer tags (tag customers that are using your Social channel) and create a Shopify Function that applies automatic discounts only to tagged customers (a bit more info here).
Hope this helps - let me know if I can clarify anything on my end 
[quote=“Qasim_Ali, post:1, topic:16569”]
I am developing a shopify custom app. I know that when we create discounts. These discounts are by default available in Online Store sales channel. I want to allow a specific sales channel lets name it Social to let the discount apply and reject the discount if it is tried in Online Store. Can I achieve this with publishablePublish or publishablePublishToCurrentChannel?
[/quote]Creating a discount with specific conditions (e.g., customer segment, cart criteria) that align with your “Social” sales channel.
Or as stated in above solution as well that assign a specific customer tag to all customers for the specific sales chanel and then in your discount code apply the logic so that customer witht hat tag gets the discount.
There are apps available that will do this so no need coding for this separately.