When ProdA from CatA is purchased, a $15 discount should be automatically applied to all other products from CatB and CatC, such that a maximum of $15 discount is applied.
For example, if order consists of ProdA/CatA and ProdB/CatB is $10, then order receives $10 discount.
If order consists of ProdA/CatA, ProdB/CatB is $10, and ProdC/CatC is $10, then order receives $15 discount.
Using the catalog-api, I have tried to create the pricing_rule. However, the matching rules applies a $15 discount to each item from CatB and CatC (product_set.quantity_exact not set) or just one item if quantity_exact = 1. Neither matches our requirements.
To complicate further, if two (or more) of ProdA/CatA are purchased then another $15 discount should be applied for items from CatB and CatC, until a maximum of $15 discount has been applied (or value of items has been reached).
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
Yes, it is possible to create a bundled discount that applies when customers buy a combination of items. However, the Square Catalog API currently does not support setting a maximum limit on the discount amount.
In your scenario, you can create a bundled discount that applies a $15 discount when a product from CatA is purchased along with products from CatB and CatC. However, the discount will be applied to each eligible product from CatB and CatC, not just up to a maximum of $15.
To create a bundled discount, you need to create a DISCOUNT type catalog object that applies a $15 discount, and a PRODUCT_SET type catalog object that groups the products from CatA, CatB, and CatC. Then, you need to configure a pricing rule to apply the discount to the product set.
However, the limitation is that the discount will be applied to each product from CatB and CatC, and there is currently no way to set a maximum limit on the total discount amount.
For the second part of your scenario, where purchasing two or more of ProdA/CatA applies another $15 discount, you would need to create another pricing rule for this condition. However, the same limitation applies - there is no way to set a maximum limit on the total discount amount.
In conclusion, while you can create bundled discounts and pricing rules to apply discounts based on certain conditions, the Catalog API currently does not support setting a maximum limit on the total discount amount.