Hello everyone,
We are creating discounts dynamically using the Shopify GraphQL Admin API > discountCodeBasicCreate.
When we create discounts via the API, the discount sometimes does not work on Online Store or POS channels. However, once we manually allow sales channel access for that discount code in the Shopify Admin, the discount starts working correctly.
Recently, we noticed something interesting while working with different Shopify stores:
-
In some stores, there is a “Sales channel access” section visible while creating a discount in the Shopify Admin.
-
In other stores, this section is not visible.
While inspecting the Admin network request, we also noticed that Shopify internally seems to pass a channelIds parameter in the CreateBasicCodeDiscount mutation.
Because of this, we wanted to clarify a few things:
-
Has Shopify recently introduced any update related to Sales Channel Access for discounts?
-
Is there any supported way to pass
channelIdswhen creating discounts using GraphQL? -
If discounts are created via API, how does Shopify determine which sales channels the discount is available on?
Since we are creating discounts dynamically, this behavior is affecting how the discounts work across Online Store and POS.
Any clarification or recommended approach would be greatly appreciated.
Thank you! ![]()

