Discount Class
The discount class that's used to control how discounts can be combined.
Anchor to Valid valuesValid values
- Anchor to ORDERORDER
The discount is combined with an order discount class.
- Anchor to PRODUCTPRODUCT
The discount is combined with a product discount class.
- Anchor to SHIPPINGSHIPPING
The discount is combined with a shipping discount class.
Anchor to FieldsFields
- •OBJECT
The
object stores information about automatic discounts that are managed by an app using Shopify Functions. Usewhen 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.
NoteThe
object has similar functionality to theobject, with the exception thatstores information about discount codes that are managed by an app using Shopify Functions.API versions prior to
2025-10only return automatic discounts withcontextset toall, discounts with other values are filtered out.- •OBJECT
The
object stores information about code discounts that are managed by an app using Shopify Functions. Usewhen 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- •OBJECT
A set of conditions, including entitlements and prerequisites, that must be met for a discount code to apply.
NoteUse the types and queries included our discount tutorials instead. These will replace the GraphQL Admin API's
object andunion, and the REST Admin API's deprecatedresource.
Deprecated fields
- •OBJECTDeprecated