create-discount-code
Generate a discount code that customers can enter at checkout, choosing either a percentage or fixed amount off the entire order. Set start and end times, and optionally limit use to one per customer.
Instructions
Create a basic discount code (percentage or fixed amount off the whole order) that customers can enter at checkout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code customers enter at checkout, e.g. 'SUMMER20' | |
| title | Yes | Internal title for the discount, shown in the Shopify admin | |
| value | Yes | Discount value: for percentage use 20 for 20%; for fixed_amount use the amount in store currency | |
| endsAt | No | Optional ISO 8601 end time | |
| startsAt | No | ISO 8601 start time; defaults to now | |
| valueType | Yes | Whether the discount is a percentage or a fixed amount off | |
| appliesOncePerCustomer | No | Limit the code to one use per customer |