Discount breaking on Online Store/POS due to Sales Channel Access

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:

  1. Has Shopify recently introduced any update related to Sales Channel Access for discounts?

  2. Is there any supported way to pass channelIds when creating discounts using GraphQL?

  3. 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! :folded_hands:

4 Likes

This is an issue we’re facing as well. It has severely impacted Indian merchants using headless checkout apps. I’m guessing any app that relies on accessing discount information for a discount not created by them, will fail to work as expected.

The API does not support enabling Sales Channel Access for manual discounts either.

We at GoKwik are facing this issue on our checkout solution. Earlier GraphQL discount APIs used to return a valid response for coupon codes which did not have specific sales channel as well but post this change we are getting null response from Shopify meaning “the code doesn’t exist” whereas this is not the case.

While static codes created on shopify can be updated via UI and bulk update (takes too much time to process) but 3rd party app codes created for multiple use cases like loyalty, referrals, bundles, etc are breaking and there is no provision to update sales channel as well using : https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeBasicCreate

Also, the manual updation is a very tedious task in itself.

Hi folks, thanks for flagging this. I’ve raised it internally with the Discounts and Channel teams, who are currently looking into it.

For now, the only viable workaround is to manually check the box in the Admin UI. We’ll keep this thread updated with info from the aforementioned teams as we get it. Thanks again for bringing this to our attention!

Hi @Donal-Shopify thanks for the update and for raising this internally with the Discounts and Channel teams — really appreciate it.

In our case, manually enabling the checkbox in the Admin UI isn’t a feasible workaround because we generate discounts dynamically via the API based on customer actions within the app. Since these discounts are created automatically and can scale across many merchants, requiring merchants to manually update the Sales Channel Access setting for each discount would not be practical.

Because of this, it would be very helpful to understand if there is:

  • Any recommended approach or workaround from Shopify for apps that dynamically create discounts.

  • Any planned API support for controlling Sales Channel Access (similar to the channelIds parameter observed in the Admin requests).

  • Any temporary API-based solution that ensures discounts are available on Online Store and POS channels by default.

This capability is quite important for apps that rely on automated discount generation, so any guidance from the team would be greatly appreciated.

Thanks again for looking into this! :folded_hands:

1 Like

We’re facing the same issue.

We dynamically create discounts for a large number of merchants, and managing them manually through the Shopify Admin is not feasible for our use case.

Currently, there is no provision in the GraphQL Admin APIs to publish discounts to additional sales channels. This recent change has had an adverse impact on our merchants, as discounts created programmatically are no longer consistently available across channels.

We strongly request that Shopify either roll back this change or provide a supported way to publish discounts to specific sales channels programmatically via API.

For app developers operating at scale, API parity with Admin capabilities is critical. We’d appreciate clarity on the roadmap and any recommended workaround in the meantime.

Please do not tag Shopify staff members that have not already engaged in a topic, this is outlined in the Code of Conduct:

@Luke Sorry for this removing it

Quick update folks, the team have decided to rollback the change due to these unintended consequences. We’ll post again here once the rollback has been completed successfully. Thanks for your continued patience on this!

Thanks for update @Donal-Shopify waiting for the rollback update :+1:t2:

we ran into this yesterday starting at 1:30pm Pacific. I’ve been dealing with shopify since 6am this morning.

This is what happens when you let 12-year old script kiddies have carte blanche over development decisions. I’ve been employed full time as a software engineer since 1986. I have never, ever dealt with a company where the sloppiness and arrogance in their development staff has ever come close to reaching this level. It’s part of their cultural DNA. “Let’s just do this and we won’t test, we won’t document it, we’ll just do it. What could go wrong? We’re Shopify developers!”

If this were the first time or the fifth or even the fiftieth, that would be one thing. But it’s over and over and over again.

2 Likes

Any update on this? When can we expect this to be fixed?

@Donal-Shopify Any update on rolling back the change? Since it is directly impacting the merchant’s business.

This appears to be working now. We have not got any errors in the last 12 hours when we import discounts to our ERP.

At least Shopify took this somewhat seriously. But, it should never have happened in the first place. During my email conversations with support, it was pretty clear they were trying to blame it on my code, on something I’d changed, etc. Of course, it wasn’t.

I got so frustrated at one point. I know the person I was communicating with was a go-between – she was the initial point of contact when I started a support chat. And I felt bad for her. But, when I’d reached my breaking point, I sent her an email much like I wrote above, just a little more tempered and polite:

”I’m sorry if my comments seem overly-harsh. But this happens so much. And then the vendors are left to scramble to find a work around for something that worked the day before
or we’re left having to depend on Shopify taking the issue seriously enough to apply a fix.

It’s just a common theme with your development cycle: make a change and then rely on the stores to identify bugs and issues. That’s not how development is supposed to work.
I’ve been a full-time developer since 1986 and I never encountered any other company that does this on such a consistent basis besides Shopify.

I’m sorry but your development culture needs to change and radically, at that. It’s frankly terrible. It’s arrogant without competence.

If I caught any of my development team doing something like this, they’d be gone. You don’t treat customers this way. Not at all. Not even close.

Arrogance is fine if you don’t make mistakes. But you all have shown time and again that your arrogance is not anywhere close to justified”

That somewhat captures my feelings on the whole Shopify development cycle. It’s a failure of leadership and it’s a failure of curiosity. No one there ever asks “What will this affect?” I’m sure they do their unit testing to make sure that modifications to the immediate issue their trying to address work. But no one ever asks the big questions. What are the unintended consequences.

This was not just one person. This was a team and no one questioned anything. Or, they’re relying far too much on AI. It doesn’t matter. It’s a reflection of Shopify in general.

Hi @Donal-Shopify

Waiting for the rollback update….

Hey all - update on this: the change has been rolled back. The revert was deployed on March 7 at 06:15 UTC, and discounts created via the API should no longer be blocked from sales channels as they were before.

If anyone is still seeing issues with this, do let us know and we can take a closer look.

On the longer-term question around setting sales channel access programmatically via the API, that feedback is with the team. No timeline to share right now, but it’s definitely being tracked.

Finally, thanks for your patience and understanding while we worked on this - it’s great appreciated.

1 Like

Hi @Donal-Shopify

Thanks for the update and for rolling back the change.

We appreciate the quick action from your team. We’ll verify the behavior from our side and confirm that discounts created via the API are now working correctly across sales channels.

Also, thanks for acknowledging the feedback regarding programmatic control of sales channel access via the API. We’ll keep an eye out for any updates on that in the future.

Appreciate the support and the communication on this. :slightly_smiling_face:

1 Like

try nexus functions for discount it will work on both shopify pos and online shop.