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.
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. |