Skip to main content
Anchor to DiscountAutomaticNode

DiscountAutomaticNode

object

Requires Apps must have read_discounts access scope.

The DiscountAutomaticNode 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

•

A discount that's applied automatically when an order meets specific criteria. Learn more about automatic discounts.

•

The paginated list of events associated with the host subject.

•
ID!non-null

A globally-unique ID.

•

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

•

A list of custom fields that a merchant associates with a Shopify resource.

Anchor to metafieldsByIdentifiersmetafieldsByIdentifiers
•
[Metafield]!non-null

The metafields associated with the resource matching the supplied list of namespaces and keys.

Anchor to metafieldDefinitionsmetafieldDefinitions
•

List of metafield definitions.


Was this section helpful?

•
query

Returns an automatic discount resource by ID.


Was this section helpful?

•
mutation

Activates an automatic discount.

Arguments

•
ID!required

The ID of the automatic discount to activate.


Fields

Anchor to automaticDiscountNodeautomaticDiscountNode
•

The activated automatic discount.

•

The list of errors that occurred from executing the mutation.

•
mutation

Creates an amount off discount that's automatically applied on a cart and at checkout.


Note

To create code discounts, use the discountCodeBasicCreate mutation.


Arguments

Anchor to automaticBasicDiscountautomaticBasicDiscount
•

The input data used to create the automatic amount off discount.


Fields

Anchor to automaticDiscountNodeautomaticDiscountNode
•

The automatic discount that was created.

•

The list of errors that occurred from executing the mutation.

•
mutation

Updates an existing amount off discount that's automatically applied on a cart and at checkout.


Note

To update code discounts, use the discountCodeBasicUpdate mutation instead.


Arguments

Anchor to automaticBasicDiscountautomaticBasicDiscount
•

The input data used to update the automatic amount off discount.

•
ID!required

The ID of the automatic amount off discount to update.


Fields

Anchor to automaticDiscountNodeautomaticDiscountNode
•

The automatic discount that was updated.

•

The list of errors that occurred from executing the mutation.

•
mutation

Creates a buy X get Y discount (BXGY) that's automatically applied on a cart and at checkout.


Note

To create code discounts, use the discountCodeBxgyCreate mutation.


Arguments

Anchor to automaticBxgyDiscountautomaticBxgyDiscount
•

The input data used to create the automatic BXGY discount.


Fields

Anchor to automaticDiscountNodeautomaticDiscountNode
•

The automatic discount that was created.

•

The list of errors that occurred from executing the mutation.

•
mutation

Updates an existing buy X get Y discount (BXGY) that's automatically applied on a cart and at checkout.


Note

To update code discounts, use the discountCodeBxgyUpdate mutation instead.


Arguments

Anchor to automaticBxgyDiscountautomaticBxgyDiscount
•

The input data used to update the automatic BXGY discount.

•
ID!required

The ID of the automatic BXGY discount to update.


Fields

Anchor to automaticDiscountNodeautomaticDiscountNode
•

The automatic discount that was updated.

•

The list of errors that occurred from executing the mutation.

•
mutation

Deactivates an automatic discount.

Arguments

•
ID!required

The ID of the automatic discount to deactivate.


Fields

Anchor to automaticDiscountNodeautomaticDiscountNode
•

The deactivated automatic discount.

•

The list of errors that occurred from executing the mutation.

•
mutation

Creates a free shipping discount that's automatically applied on a cart and at checkout.


Note

To create code discounts, use the discountCodeFreeShippingCreate mutation.


Arguments

Anchor to freeShippingAutomaticDiscountfreeShippingAutomaticDiscount
•

The input data used to create the automatic free shipping discount.


Fields

Anchor to automaticDiscountNodeautomaticDiscountNode
•

The automatic free shipping discount that was created.

•

The list of errors that occurred from executing the mutation.

•
mutation

Updates an existing free shipping discount that's automatically applied on a cart and at checkout.


Note

To update code discounts, use the discountCodeFreeShippingUpdate mutation instead.


Arguments

Anchor to freeShippingAutomaticDiscountfreeShippingAutomaticDiscount
•

The input data used to update the automatic free shipping discount.

•
ID!required

The ID of the automatic free shipping discount to update.


Fields

Anchor to automaticDiscountNodeautomaticDiscountNode
•

The automatic discount that was updated.

•

The list of errors that occurred from executing the mutation.


Was this section helpful?