Anchor to DiscountCodeActivatePayloadDiscount
payloadDiscount Code Activate Payload
Return type for mutation.
Anchor to FieldsFields
- Anchor to codeDiscountNodecode•Discount
Discount Node Code Node The activated code discount.
- Anchor to userErrorsuser•[Discount
Errors User Error!]! non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
Anchor to Mutations with this payloadMutations with this payload
- •mutation
Activates a previously created code discount, making it available for customers to use during checkout. This mutation transitions inactive discount codes into an active state where they can be applied to orders.
For example, after creating a "SUMMER20" discount code but leaving it inactive during setup, merchants can activate it when ready to launch their summer promotion campaign.
Use
to:
- Launch scheduled promotional campaigns
- Reactivate previously paused discount codes
- Enable discount codes after configuration changes
- Control the timing of discount availability
The mutation returns the updated discount code node with its new active status and handles any validation errors that might prevent activation, such as conflicting discount rules or invalid date ranges.
Was this section helpful?