Skip to main content
query
Deprecated. Use automaticDiscountNode instead.

Returns a DiscountAutomatic resource by ID.

•ID!
required

The ID of the DiscountAutomatic to return.


Was this section helpful?

•DiscountAutomatic

The types of automatic discounts applied in the cart and at checkout when an order meets specific criteria.

Includes DiscountAutomaticApp for custom logic using the Discount Function API, DiscountAutomaticBasic for percentage or fixed amount reductions, DiscountAutomaticBxgy for Buy X Get Y promotions, and DiscountAutomaticFreeShipping for delivery incentives.

•OBJECT

The DiscountAutomaticApp object stores information about automatic discounts that are managed by an app using Shopify Functions. Use DiscountAutomaticAppwhen you need advanced, custom, or dynamic discount capabilities that aren't supported by Shopify's native discount types.

Learn more about creating custom discount functionality.


Note

The DiscountCodeApp object has similar functionality to the DiscountAutomaticApp object, with the exception that DiscountCodeApp stores information about discount codes that are managed by an app using Shopify Functions.

API versions prior to 2025-10 only return automatic discounts with context set to all, discounts with other values are filtered out.


•OBJECT

The DiscountAutomaticBasic object lets you manage amount off discounts that are automatically applied on a cart and at checkout. Amount off discounts give customers a fixed value or a percentage off the products in an order, but don't apply to shipping costs.

The DiscountAutomaticBasic object stores information about automatic amount off discounts that apply to specific products and variants, collections, or all items in a cart.

Learn more about working with Shopify's discount model, including limitations and considerations.


Note

The DiscountCodeBasic object has similar functionality to the DiscountAutomaticBasic object, but customers need to enter a code to receive a discount.

API versions prior to 2025-10 only return automatic discounts with context set to all, discounts with other values are filtered out.


•OBJECT

The DiscountAutomaticBxgy object lets you manage buy X get Y discounts (BXGY) that are automatically applied on a cart and at checkout. BXGY discounts incentivize customers by offering them additional items at a discounted price or for free when they purchase a specified quantity of items.

The DiscountAutomaticBxgy object stores information about automatic BXGY discounts that apply to specific products and variants, collections, or all items in a cart.

Learn more about working with Shopify's discount model, including limitations and considerations.


Note

The DiscountCodeBxgy object has similar functionality to the DiscountAutomaticBxgy object, but customers need to enter a code to receive a discount.

API versions prior to 2025-10 only return automatic discounts with context set to all, discounts with other values are filtered out.


•OBJECT

The DiscountAutomaticFreeShipping object lets you manage free shipping discounts that are automatically applied on a cart and at checkout. Free shipping discounts are promotional deals that merchants offer to customers to waive shipping costs and encourage online purchases.

The DiscountAutomaticFreeShipping object stores information about automatic free shipping discounts that apply to specific products and variants, collections, or all items in a cart.

Learn more about working with Shopify's discount model, including limitations and considerations.


Note

The DiscountCodeFreeShipping object has similar functionality to the DiscountAutomaticFreeShipping object, but customers need to enter a code to receive a discount.

API versions prior to 2025-10 only return automatic discounts with context set to all, discounts with other values are filtered out.



Was this section helpful?