---
name: discount-code
description: >-
  Creates a discount code with the specified type, value, dates, usage limits and eligibility, after checking active discounts for clashes. Use when the user asks to create a discount, coupon, promo code, or sale code.
---

# Create a Discount Code

Create a discount code [CODE] for [VALUE] off, ending [END DATE]. Work through the request without asking for clarifications unless something essential is missing.

## Steps
1. Check active and scheduled discounts. If a code with the same name exists or an active discount already applies to the same products, say so and stop.
2. Set the discount: type (percentage or fixed amount), value, applies to (entire order unless I named products or a collection), start now, end on the given date at 23:59 in the shop's timezone.
3. Defaults unless I say otherwise: one use per customer, no total usage limit, no minimum purchase, cannot combine with other discounts, all customers eligible.
4. Create it, then show me a summary: code, value, applies to, dates, limits, combinations, and the URL that applies it automatically.

## Output
A one-line confirmation and the summary table.

Never create a discount above 50% or with no end date without asking first. Do not delete or edit existing discounts in this skill.
