Shopify tightens draft-order discount permissions

Shopify’s 18 November developer changelog introduces a permission check that can stop draft-order changes before they are saved. Across all supported API versions, an app acting as a staff member…

SSophie Harrington1 min read

Shopify’s 18 November developer changelog introduces a permission check that can stop draft-order changes before they are saved. Across all supported API versions, an app acting as a staff member needs apply_discounts_to_draft_orders when adding a discount through draftOrderCreate or draftOrderUpdate.

The operational risk is an app reporting success because it checked only the mutation’s userErrors. This failure arrives in the top-level GraphQL errors array instead, with code ACCESS_DENIED. The mutation payload is null and the draft order is not saved.

Which changes trigger the check?

For an existing draft order, adding a code that is not already in discountCodes or changing acceptAutomaticDiscounts from false to true triggers the permission requirement. For a new draft, any non-empty discount-code list or automatic-discount setting of true counts as adding a discount.

Keeping or removing existing discounts still works. Requests that do not act as a staff member, including offline-token requests, are outside this change. That distinction describes the scope; it is not a reason to bypass a staff member’s permissions.

Test the failure path before the next sales rush

For an app that prepares quotes or assisted orders, test with a staff account that can manage drafts but cannot apply discounts. Confirm that the interface shows a clear permission error, handles the null payload and does not claim the order was saved. Then repeat with an authorised account.

If the workflow genuinely requires that staff member to apply discounts, ask the merchant to review the Apply discounts permission under Draft orders. Updating error handling and reviewing the role are separate jobs: a permission change does not fix an app that misreads GraphQL failures.

ℹ️
Check top-level GraphQL errors as well as userErrors. ACCESS_DENIED returns a null mutation payload; the draft order is not saved.
Filed underShopify

More from Shopify

See all →