Skip to main content
Log inSign up

Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.

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.

Show
deprecated fields and connections Deprecated
Anchor to metafieldDefinitionsmetafieldDefinitions
•

List of metafield definitions. This field will be removed in a future version. Use the root metafieldDefinitions field instead.

•

Returns a private metafield by namespace and key that belongs to the resource. Metafields created using a reserved namespace are private by default. See our guide for migrating private metafields.

•
PrivateMetafieldConnection!non-nullDeprecated

List of private metafields that belong to the resource. Metafields created using a reserved namespace are private by default. See our guide for migrating private metafields.


Was this section helpful?

•
query

Returns an automatic discount resource by ID.


Was this section helpful?

•
mutation

Activates an automatic discount.

•
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.


•
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.


•
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.


•
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.


•
mutation

Deactivates an automatic discount.

•
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.


•
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.



Was this section helpful?