AddSynapse: draft a coupon
plan_couponAddSynapse: Prepare a DRAFT that creates a coupon (when the code does not exist yet) or changes the given fields of an existing one: percent or fixed amount, expiry date, usage limits, minimum spend, product/category restrictions. Changes nothing by itself. A preview card with the draft and an Approve button appears in the chat; nothing changes on the site until the user presses Approve there (or on the AddSynapse Changes page when the card has no Approve button). Undo deletes a coupon it created or restores the previous fields. For safety, a coupon above 50% off, a fixed discount above 50, free shipping without a usage limit, or a coupon with neither a usage limit nor an expiry date is approved only in the site's wp-admin (the card links there), never in the chat — so suggest an expiry date or a usage limit.
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": {
"code": "<code>"
},
"name": "plan_coupon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| site | No | Which connected site: its address or site_id from addsynapse_list_sites. Omit when the account has only one site. | |
| amount | No | ||
| categories | No | category names or ids the coupon is limited to | |
| description | No | ||
| product_ids | No | ||
| usage_limit | No | ||
| date_expires | No | YYYY-MM-DD (last valid day) or null = never | |
| discount_type | No | ||
| free_shipping | No | ||
| individual_use | No | ||
| maximum_amount | No | ||
| minimum_amount | No | ||
| excluded_categories | No | ||
| excluded_product_ids | No | ||
| usage_limit_per_user | No |