create-discount
Generate a Shopify discount code to apply percentage or fixed-amount savings, control usage limits and dates, and restrict eligibility by product or collection.
Instructions
Create a new discount code with specified value (percentage or fixed amount), usage limits, date range, and product applicability.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"title": "<title>",
"code": "<code>",
"valueType": "<valueType>",
"value": "<value>"
},
"name": "create-discount"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Discount code customers will use | |
| title | Yes | Discount title/name | |
| value | Yes | Discount value (amount or percentage) | |
| endsAt | No | End date (ISO 8601) | |
| startsAt | No | Start date (ISO 8601) | |
| appliesTo | No | ||
| valueType | Yes | Type of discount | |
| usageLimit | No | Max total uses | |
| oncePerCustomer | No | ||
| minimumRequirement | No |