create_automatic_discount_bxgy
Create an automatic Buy X Get Y discount that applies without a code. Define items customer must buy and items they get at a percentage or free discount.
Instructions
Create an automatic Buy X Get Y discount applied without a code.
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>",
"startsAt": "<startsAt>",
"buyQuantity": "<buyQuantity>",
"getQuantity": "<getQuantity>",
"getDiscountType": "<getDiscountType>"
},
"name": "create_automatic_discount_bxgy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Name shown to customers and in admin. | |
| startsAt | Yes | Activation date (ISO 8601). | |
| endsAt | No | ||
| usesPerOrderLimit | No | ||
| buyQuantity | Yes | Number of items customer must buy (e.g. '3'). | |
| buyAll | No | ||
| buyProductIds | No | ||
| buyCollectionIds | No | ||
| getQuantity | Yes | Number of items customer gets at a discount (e.g. '1'). | |
| getAll | No | ||
| getProductIds | No | ||
| getCollectionIds | No | ||
| getDiscountType | Yes | Type of discount on 'get' items. | |
| getDiscountPercentage | No | Percentage off (0–100). Required when getDiscountType is 'percentage'. | |
| combinesWith | No | Discount classes this discount can combine with. |