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 DiscountAutomatic!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•
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 metafieldsByIdentifiersmetafields•
By Identifiers [Metafield]!non-null The metafields associated with the resource matching the supplied list of namespaces and keys.
- Anchor to metafieldDefinitionsmetafield•
Definitions MetafieldDefinition Connection!non-null List of metafield definitions.
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 Node The activated automatic discount.
- Anchor to userErrorsuser•
Errors [DiscountUser Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •
- •mutation
- Anchor to automaticBasicDiscountautomatic•
Basic Discount DiscountAutomatic Basic Input!required The input data used to create the automatic amount off discount.
Arguments
- Anchor to automaticDiscountNodeautomatic•
Discount Node The automatic discount that was created.
- Anchor to userErrorsuser•
Errors [DiscountUser Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
- Anchor to automaticBasicDiscountautomatic•
Basic Discount DiscountAutomatic 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 Node The automatic discount that was updated.
- Anchor to userErrorsuser•
Errors [DiscountUser Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
- Anchor to automaticBxgyDiscountautomatic•
Bxgy Discount DiscountAutomatic Bxgy Input!required The input data used to create the automatic BXGY discount.
Arguments
- Anchor to automaticDiscountNodeautomatic•
Discount Node The automatic discount that was created.
- Anchor to userErrorsuser•
Errors [DiscountUser 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•
Bxgy Discount DiscountAutomatic 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 Node The automatic discount that was updated.
- Anchor to userErrorsuser•
Errors [DiscountUser 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 Node The deactivated automatic discount.
- Anchor to userErrorsuser•
Errors [DiscountUser Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •
- •mutation
- Anchor to freeShippingAutomaticDiscountfree•
Shipping Automatic Discount The input data used to create the automatic free shipping discount.
Arguments
- Anchor to automaticDiscountNodeautomatic•
Discount Node The automatic free shipping discount that was created.
- Anchor to userErrorsuser•
Errors [DiscountUser Error!]!non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
- Anchor to freeShippingAutomaticDiscountfree•
Shipping Automatic Discount 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 Node The automatic discount that was updated.
- Anchor to userErrorsuser•
Errors [DiscountUser Error!]!non-null The list of errors that occurred from executing the mutation.
Fields