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 FieldsFields
- 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.
Deprecated fields
- Anchor to metafieldDefinitionsmetafield•Metafield
Definitions Definition Connection! non-nullDeprecated - Anchor to privateMetafieldprivate•Private
Metafield Metafield Deprecated - Anchor to privateMetafieldsprivate•Private
Metafields Metafield Connection! non-nullDeprecated
Anchor to QueriesQueries
- •query
Returns a
resource by ID.
- •query
Returns a list of automatic discounts.
Anchor to MutationsMutations
- •mutation
Activates an automatic discount.
- •mutation
- •mutation
- •mutation
- •mutation
Updates an existing buy X get Y discount (BXGY) that's automatically applied on a cart and at checkout.
- •mutation
Deactivates an automatic discount.
- •mutation
Creates automatic free shipping discounts that apply to qualifying orders without requiring discount codes. These promotions automatically activate when customers meet specified criteria, streamlining the checkout experience.
For example, a store might create an automatic free shipping discount for orders over variable pricing to encourage larger purchases, or offer free shipping to specific customer segments during promotional periods.
Use
to:
- Set up code-free shipping promotions
- Create order value-based shipping incentives
- Target specific customer groups with shipping benefits
- Establish location-based shipping discounts
The mutation validates discount configuration and returns the created automatic discount node along with any configuration errors that need resolution.
Learn more about automatic discounts.
- •mutation
Updates existing automatic free shipping discounts, allowing merchants to modify promotion criteria, shipping destinations, and eligibility requirements without recreating the entire discount structure.
For example, extending a holiday free shipping promotion to include additional countries, adjusting the minimum order value threshold, or expanding customer eligibility to include new segments.
Use
to:
- Modify shipping discount thresholds and criteria
- Expand or restrict geographic availability
- Update customer targeting and eligibility rules
- Adjust promotion timing and activation periods
Changes take effect immediately for new orders, while the mutation validates all modifications and reports any configuration conflicts through user errors.
Learn more about managing automatic discounts.