shopify_create_discount
Create a percentage discount code with a start date and target audience. Preview changes with a dry run before applying to your Shopify store.
Instructions
Create a percentage discount code with an explicit start date and customer audience. Defaults to dryRun:true, which resolves segments and previews the discount without creating it.
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": {
"store": "<store>",
"title": "<title>",
"code": "<code>",
"percentage": "<percentage>",
"startsAt": "<startsAt>"
},
"name": "shopify_create_discount"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| store | Yes | ||
| title | Yes | ||
| dryRun | No | True (the default) returns a before/after preview without changing anything in Shopify. Pass false, after the user authorizes this store and exact change, to apply it; the tool then reads the result back. | |
| endsAt | No | ||
| startsAt | Yes | ||
| percentage | Yes | ||
| productIds | No | ||
| usageLimit | No | ||
| collectionId | No | ||
| minimumQuantity | No | ||
| customerSegments | No | ||
| customerEligibility | No | ||
| minimumPurchaseAmount | No | ||
| appliesOncePerCustomer | No |