discount Automatic Delete
Requires Apps must have access scope.
Deletes an existing automatic discount from the store, permanently removing it from all future order calculations. This mutation provides a clean way to remove promotional campaigns that are no longer needed.
For example, when a seasonal promotion ends or a flash sale concludes, merchants can use this mutation to ensure the discount no longer applies to new orders while preserving historical order data.
Use to:
- Remove expired promotional campaigns
- Clean up test discounts during development
- Delete automatic discounts that conflict with new promotions
- Maintain a clean discount configuration
The mutation returns the ID of the deleted discount for confirmation and any validation errors if the deletion cannot be completed. Once deleted, the automatic discount will no longer appear in discount lists or apply to new customer orders.
Arguments
- •ID!required
The ID of the automatic discount to delete.
- Anchor to deletedAutomaticDiscountIddeleted•ID
Automatic Discount Id The ID of the automatic discount that was deleted.
- Anchor to userErrorsuser•[Discount
Errors User Error!]! non-null The list of errors that occurred from executing the mutation.