Automatic Basic Discount code with customer selection

Topic summary

Automatic discounts targeted to specific customers (via customerSelection) are not supported by Shopify’s GraphQL API for discountAutomaticBasicCreate. The official spec linked confirms this limitation.

Key terms:

  • Automatic discount: applied at checkout without a code.
  • customerSelection: targeting discounts to specific customers or segments.

Current status: Only non-automatic discount codes can use customerSelection. The API does not permit this for Automatic Basic Discounts.

Workaround: Use discount codes with an app to simulate automatic application (example provided). This approach applies a code conditionally rather than using the automatic discount mutation.

Outcome: No change or official solution was provided; the capability remains unsupported in the API. The “why” behind the limitation is unanswered, and the discussion is open/ongoing.

Summarized with AI on February 22. AI used: gpt-5.

I want to give an Automatic Discount to specific customers.

Is there a way to add a customerSelection to an Automatic Basic Discount code?

The spec does not allow this:
https://shopify.dev/api/admin-graphql/2022-01/mutations/discountAutomaticBasicCreate

Why is this only an option for Non-Automatic Discount Codes?
Thanks!

1 Like

Hi @jhubele Indeed, as we speak, Shopify’s automatic discount via GraphQL API won’t allow that. Our app uses discount codes to achieve this automatic application, for example here.