Discount Automatic Node
Requires Apps must have access scope.
The object enables you to manage automatic discounts that are applied when an order meets specific criteria. You can create amount off, free shipping, or buy X get Y automatic discounts. For example, you can offer customers a free shipping discount that applies when conditions are met. Or you can offer customers a buy X get Y discount that's automatically applied when customers spend a specified amount of money, or a specified quantity of products.
Learn more about working with Shopify's discount model, including related queries, mutations, limitations, and considerations.
Anchor to Fields and connectionsFields and connections
- Anchor to automaticDiscountautomatic•Discount
Discount Automatic!non-null A discount that's applied automatically when an order meets specific criteria. Learn more about automatic discounts.
- Anchor to eventsevents•Event
Connection!non-null The paginated list of events associated with the host subject.
- •ID!non-null
A globally-unique ID.
- Anchor to metafieldmetafield•Metafield
A custom field, including its
namespace
andkey
, that's associated with a Shopify resource for the purposes of adding and storing additional information.- Anchor to metafieldsmetafields•Metafield
Connection!non-null A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to metafieldDefinitionsmetafield•Metafield
Definitions Definition Connection!non-nullDeprecated
Anchor to QueriesQueries
- •query
Returns an automatic discount resource by ID.
- •query
Returns a list of automatic discounts.
Anchor to MutationsMutations
- •mutation
Activates an automatic discount.
- •ID!required
The ID of the automatic discount to activate.
Arguments
- Anchor to automaticDiscountNodeautomatic•Discount
Discount Node Automatic Node The activated automatic discount.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
- Anchor to automaticBasicDiscountautomatic•Discount
Basic Discount Automatic Basic Input!required The input data used to create the automatic amount off discount.
Arguments
- Anchor to automaticDiscountNodeautomatic•Discount
Discount Node Automatic Node The automatic discount that was created.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
- Anchor to automaticBasicDiscountautomatic•Discount
Basic Discount Automatic Basic Input!required The input data used to update the automatic amount off discount.
- •ID!required
The ID of the automatic amount off discount to update.
Arguments
- Anchor to automaticDiscountNodeautomatic•Discount
Discount Node Automatic Node The automatic discount that was updated.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
- Anchor to automaticBxgyDiscountautomatic•Discount
Bxgy Discount Automatic Bxgy Input!required The input data used to create the automatic BXGY discount.
Arguments
- Anchor to automaticDiscountNodeautomatic•Discount
Discount Node Automatic Node The automatic discount that was created.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates an existing buy X get Y discount (BXGY) that's automatically applied on a cart and at checkout.
- Anchor to automaticBxgyDiscountautomatic•Discount
Bxgy Discount Automatic Bxgy Input!required The input data used to update the automatic BXGY discount.
- •ID!required
The ID of the automatic BXGY discount to update.
Arguments
- Anchor to automaticDiscountNodeautomatic•Discount
Discount Node Automatic Node The automatic discount that was updated.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Deactivates an automatic discount.
- •ID!required
The ID of the automatic discount to deactivate.
Arguments
- Anchor to automaticDiscountNodeautomatic•Discount
Discount Node Automatic Node The deactivated automatic discount.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
- Anchor to freeShippingAutomaticDiscountfree•Discount
Shipping Automatic Discount Automatic Free Shipping Input!required The input data used to create the automatic free shipping discount.
Arguments
- Anchor to automaticDiscountNodeautomatic•Discount
Discount Node Automatic Node The automatic free shipping discount that was created.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
- Anchor to freeShippingAutomaticDiscountfree•Discount
Shipping Automatic Discount Automatic Free Shipping Input!required The input data used to update the automatic free shipping discount.
- •ID!required
The ID of the automatic free shipping discount to update.
Arguments
- Anchor to automaticDiscountNodeautomatic•Discount
Discount Node Automatic Node The automatic discount that was updated.
- Anchor to userErrorsuser•[Discount
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.
Fields