discount Automatic App Update
Requires access scope.
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.
Note: To update code discounts with custom logic, use the <a href="https://shopify.dev/docs/api/admin-graphql/latest/mutations/discountCodeAppUpdate"><code><span class="PreventFireFoxApplyingGapToWBR">discount<wbr/>Code<wbr/>App<wbr/>Update</span></code></a> mutation instead.
Arguments
- automaticAppDiscount (DiscountAutomaticAppInput!)
- id (ID!)
- Anchor to automaticAppDiscountautomatic•Discount
App Discount Automatic App Input! required The input fields required to update the automatic discount.
- •ID!required
The ID of the automatic discount to update.
- automaticAppDiscount (DiscountAutomaticApp)
- userErrors ([DiscountUserError!]!)
- Anchor to automaticAppDiscountautomatic•Discount
App Discount Automatic App The updated automatic discount that the app provides.
- Anchor to userErrorsuser•[Discount
Errors User Error!]! non-null The list of errors that occurred from executing the mutation.