Create promotion
create_promotionCreate promotion codes with fixed or percentage discounts, set validity dates, usage limits, and restrict to specific products, price lists, or billing cycles.
Instructions
Create a promotion code. type: 1 = fixed amount (needs currency_id), 2 = percentage. Applies to all products unless restricted via "extra" (products, pricelists, billing_cycles).
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": {
"name": "<name>",
"code": "<code>",
"brand_id": "<brand_id>",
"amount": "<amount>",
"type": "<type>",
"from_date": "<from_date>",
"to_date": "<to_date>"
},
"name": "create_promotion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The coupon code clients enter | |
| name | Yes | ||
| type | Yes | 1 = fixed amount, 2 = percentage | |
| extra | No | Additional raw fields (products, pricelists, …) | |
| amount | Yes | Discount amount (percent when type=2) | |
| to_date | Yes | End date YYYY-MM-DD | |
| brand_id | Yes | Brand UUID | |
| max_uses | No | 0 = unlimited (default) | |
| from_date | Yes | Start date YYYY-MM-DD | |
| currency_id | No | Required for fixed-amount promotions | |
| for_new_clients | No | Default true | |
| recurring_cycles | No | -1 unlimited, 0 first invoice only (default), N cycles | |
| max_uses_per_client | No | 0 = unlimited (default) | |
| for_existing_clients | No | Default true |