Discount User Error
An error that occurs during the execution of a discount mutation.
Anchor to FieldsFields
- Anchor to codecode•Discount
Error Code The error code.
- Anchor to extraInfoextra•String
Info Extra information about this error.
- Anchor to fieldfield•[String!]
The path to the input field that caused the error.
- Anchor to messagemessage•String!non-null
The error message.
Anchor to MutationsMutations
- •mutation
Activates an automatic discount.
- •mutation
Creates an automatic discount that's managed by an app. Use this mutation with Shopify Functions when you need advanced, custom, or dynamic discount capabilities that aren't supported by Shopify's native discount types.
For example, use this mutation to create an automatic discount using an app's "Volume" discount type that applies a percentage off when customers purchase more than the minimum quantity of a product. For an example implementation, refer to our tutorial.
- •mutation
Updates an existing automatic discount that's managed by an app using Shopify Functions. Use this mutation when you need advanced, custom, or dynamic discount capabilities that aren't supported by Shopify's native discount types.
For example, use this mutation to update a new "Volume" discount type that applies a percentage off when customers purchase more than the minimum quantity of a product. For an example implementation, refer to our tutorial.
- •mutation
- •mutation
- •mutation
Asynchronously delete automatic discounts in bulk if a
search
orargument is provided or if a maximum discount threshold is reached (1,000). Otherwise, deletions will occur inline. Warning: All automatic discounts will be deleted if a blank
search
argument is provided.- •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
Deletes an automatic discount.
- •mutation
- •mutation
- •mutation
Activates a code discount.
- •mutation
Creates a code discount. The discount type must be provided by an app extension that uses Shopify Functions. Functions can implement order, product, or shipping discount functions. Use this mutation with Shopify Functions when you need custom logic beyond Shopify's native discount types.
For example, use this mutation to create a code discount using an app's "Volume" discount type that applies a percentage off when customers purchase more than the minimum quantity of a product. For an example implementation, refer to our tutorial.
- •mutation
Updates a code discount, where the discount type is provided by an app extension that uses Shopify Functions. Use this mutation when you need advanced, custom, or dynamic discount capabilities that aren't supported by Shopify's native discount types.
- •mutation
Creates an amount off discount that's applied on a cart and at checkout when a customer enters a code. Amount off discounts can be a percentage off or a fixed amount off.
- •mutation
Updates an amount off discount that's applied on a cart and at checkout when a customer enters a code. Amount off discounts can be a percentage off or a fixed amount off.
- •mutation
Activates multiple code discounts asynchronously using one of the following:
- A search query
- A saved search ID
- A list of discount code IDs
For example, you can activate discounts for all codes that match a search criteria, or activate a predefined set of discount codes.
- •mutation
Deactivates multiple code-based discounts asynchronously using one of the following:
- A search query
- A saved search ID
- A list of discount code IDs
For example, you can deactivate discounts for all codes that match a search criteria, or deactivate a predefined set of discount codes.
- •mutation
Deletes multiple code-based discounts asynchronously using one of the following:
- A search query
- A saved search ID
- A list of discount code IDs
For example, you can delete discounts for all codes that match a search criteria, or delete a predefined set of discount codes.
- •mutation
Creates a buy X get Y discount (BXGY) that's applied on a cart and at checkout when a customer enters a code.
- •mutation
Updates a buy X get Y discount (BXGY) that's applied on a cart and at checkout when a customer enters a code.
- •mutation
Deactivates a code discount.
- •mutation
Deletes a code discount.
- •mutation
Creates an free shipping discount that's applied on a cart and at checkout when a customer enters a code.
- •mutation
Updates a free shipping discount that's applied on a cart and at checkout when a customer enters a code.
Note- •mutation
Asynchronously delete discount codes in bulk that customers can use to redeem a discount.
- •mutation
Asynchronously add discount codes in bulk that customers can use to redeem a discount. You can use the
mutation to automate the distribution of discount codes through emails or other marketing channels.