Executive summary
- What: Draft order mutations now reject attempts to add discounts when the acting staff member lacks the apply discounts permission, returning a top-level ACCESS_DENIED error instead of a user error.
- Why: Apps that only inspect userErrors will read the failure as success and silently lose the discount, or the entire draft order, with no record of why.
- Who: Any team whose app creates or updates draft orders while acting as a staff member, which in practice means B2B quoting and assisted-sales tooling.
What changed
Across all supported API versions, draftOrderCreate and draftOrderUpdate now return an ACCESS_DENIED error when a request running as a staff member without the apply_discounts_to_draft_orders permission adds a discount. Adding a discount code the draft order does not already hold counts, as does setting automatic discounts to true where they were off. On creation, any non-empty discount code list or automatic discounts set to true qualifies, since there is no prior state to compare against.
The failure mode is the important detail. The mutation does not save the draft order, the payload comes back null, and the error appears in the top-level errors array rather than in userErrors. Keeping or removing existing discounts still works, and requests that do not act as a staff member are unaffected.
Why it matters
This is a small permission change with a disproportionate failure surface, because most Shopify app code treats an empty userErrors array as success. Under that pattern the app reports a saved quote, no draft order exists, and the discrepancy surfaces when the customer asks where their quote went. On a sales desk handling dozens of quotes a day, a silent null costs far more than a visible error.
The exposure concentrates in B2B workflows. Negotiated pricing on Shopify often runs through draft orders as quotes created by an app acting for a sales rep, with discount codes carrying the agreed concession. If your wholesale and B2B setup depends on reps discounting through tooling rather than the admin, audit the staff permissions behind it before the first support ticket.
This tightening is arguably overdue. A permission that governed discounting in the admin but not through the API was never a coherent control, particularly where discount authority is deliberately limited across a large or seasonal sales team.
Role-specific impact
- Marketers: Promotional codes intended for rep-applied discounts will fail silently in affected tooling. Confirm with the team owning your quoting flow that code-based concessions still apply.
- Developers: Inspect the top-level errors array, not just userErrors, and treat a null mutation payload as a failure wherever the error appeared. Audit every draft order call path for the same assumption.
- Store admins: Grant the Apply discounts permission under Draft orders to the staff accounts your apps act as, or accept that those apps cannot discount. Decide it deliberately rather than discovering it through a failed quote.
Use-case example
Real-world scenario
An industrial supplier runs quoting through a private app where each rep authenticates with their own staff account, applying an agreed discount code before sending a quote. Two reps hired last quarter were provisioned without the apply discounts permission, which never mattered because they worked only in the app. After this change their submissions return null with an ACCESS_DENIED error the app does not inspect, so the interface confirms a save that never happened. Roughly 15 quotes are lost over four days before a customer follow-up exposes it. Top-level error handling and two corrected permission sets close the gap, but the detection delay is the real cost.
Implementation checklist
- Locate every call site for draftOrderCreate and draftOrderUpdate across your apps and internal services.
- Confirm each one reads the top-level errors array in addition to userErrors.
- Treat a null mutation payload as a failure and surface it to the user rather than reporting a successful save.
- Identify which staff accounts your apps act as, including service accounts shared across a team.
- Grant the Apply discounts permission under Draft orders to those accounts where discounting is intended.
- Test both paths in a development store: adding a discount with the permission, and without it.
- Alert on the ACCESS_DENIED case so a permission regression is visible within hours, not days.
FAQ
Q: Does this affect apps using an offline access token?
A: No. The restriction applies only to requests acting as a staff member. Requests using offline tokens behave as they did before.
Q: Can an app still update a draft order that already carries a discount?
A: Yes. Keeping or removing existing discounts is unaffected. Only adding a discount code the order does not have, or switching on automatic discounts where they were off, triggers the error.
Resources
draftOrderUpdate mutation reference
Need guidance? Talk to Makro.