Before executing this skill, read these referenced skills with ReadFullDocsArticle:
Creates a discount that rewards customers for purchasing multiple items, encouraging product discovery and cross-selling. The discount activates when the cart contains a minimum number of items, and targets categories or products where bundling makes strategic sense.
getCatalogAnalytics and getProductCatalogData toolsCall getCatalogAnalytics and getProductCatalogData concurrently to assess the catalog's bundle potential.
getCatalogAnalytics call:
getProductCatalogData call:
Save the following values:
min_price, max_price — price range determines viable bundle combinationsavg_profit_margin — sets the discount ceilingcount — catalog breadth; more products = more bundling optionsEvaluate the catalog for bundling opportunities:
Determine the minItemQuantity based on catalog characteristics:
| Catalog Profile | Recommended minItemQuantity | Rationale |
|---|---|---|
| High-price items (avg price > price_p75) | 2 | Customers are less likely to buy 3+ expensive items |
| Medium-price items | 2-3 | Standard bundle size |
| Low-price items (avg price < price_p25) | 3-4 | Lower price per item makes larger bundles feasible |
| Many items in category (count > 10) | 3 | More products to choose from |
| Few items in category (count <= 5) | 2 | Limited selection constrains bundle size |
Default to minItemQuantity: 2 if data is ambiguous.
Scale the discount to the average margin, rewarding multi-item purchases without eroding profitability:
| Margin Tier | Condition | Recommended Discount |
|---|---|---|
| Low margin | avg_profit_margin < 25% | 10% |
| Medium margin | 25% <= avg_profit_margin <= 50% | 15% |
| High margin | avg_profit_margin > 50% | 20% |
| No data | Margin unavailable | 10% |
Verify that the discount respects the global cap of 25% and the minimum margin threshold of 15% (discount <= avg_profit_margin - 15%).
Select the scope based on bundling analysis:
If scope is CATEGORY, call getCategoryIds to convert category names to GUIDs.
Run the Guardrail: Discount Conflicts checks before creating the rule.
Endpoint: POST https://www.wixapis.com/ecom/v1/discount-rules/query
Request:
Endpoint: POST https://www.wixapis.com/ecom/v1/discount-rules
Request — Buy 2+ items from a category, get 15% off:
Response:
Request — Buy 3+ specific items, get 10% off:
Save the returned id and revision for later management.
active: true"Bundle discount is live: {discount}% off when buying {minItemQuantity}+ items from {scope description}. This encourages customers to explore more products and increases items per order."
| Merchant intent | Scope | minItemQuantity | Discount |
|---|---|---|---|
| "Encourage people to buy more" | Determined by analytics | 2-3 | Margin-tiered |
| "Bundle accessories together" | COLLECTION with category GUID | 2 | Margin-tiered |
| "Buy 3 get 20% off these products" (explicit) | SPECIFIC_PRODUCTS with product GUIDs | 3 (user override) | 20% (user override) |
| "Multi-buy deal on everything" | CATALOG (site-wide) | 2 | Margin-tiered |
| "Promote these 4 items as a set" | SPECIFIC_PRODUCTS (max 5) | 2-4 | Margin-tiered |
| Error | Cause | Fix |
|---|---|---|
DISCOUNT_RULE_NOT_FOUND | Rule ID doesn't exist | Re-query discount rules for current IDs |
REVISION_MISMATCH | Revision doesn't match | Re-fetch rule for latest revision, then retry |
| Too few products in category | Category has only 1 product — bundling not viable | Switch to SITE scope or suggest a different category |
| Margin data unavailable | No profit margin data in catalog | Default to 10% discount |
| Category GUID not found | Category name doesn't match any collection | Re-query categories or fall back to SITE scope |
| Max items exceeded | More than 5 productIds specified | Reduce to top 5 by ordersCount or switch to CATEGORY scope |