Promotion Applying to the Wrong Items
If a promotion is applying but the discount is landing on the wrong items, the cause is almost always the product sets, the attribute data your store sends, or another promotion using the items first. Work through these checks in order.
Check the product sets
Open the promotion in the Deducto Console and look at Which products?. Confirm:
- The values in each set's item conditions match exactly what your store sends. For example, a
categorycondition set toshoeswon't match items sent asShoesorSHOES. How many items are needed?is right for each set.- If there's more than one set, only the sets whose items should be discounted have
This set gets the discountturned on. Items in the other sets stay at full price. Which sets must be in the cart?is set the way you intend. WithAll of them, the cart needs items for every set. WithAny one of them, it only needs items for one of the sets that get the discount, plus one of the other sets if there are any, so a cart can qualify without items from every set. TheAn amount offreward doesn't offer this choice and always works likeAll of them.
Check which items get the discount
When the cart has more matching items than the deal needs, Which items get the discount? under What customers get decides which ones are discounted. Whichever saves the customer most usually discounts the pricier items, while The cheapest items discounts the cheapest. For "buy 2, get the cheapest free", choose The cheapest items.
Check your attribute field codes
Deducto reads attribute values from the cart data in your Verify request, using each attribute's field code. The keys your storefront sends in productData.attributes must exactly match the field codes in your project settings, including case.
For example, if your Category attribute's field code is productCategory but your storefront sends category, no item will match a condition that uses that attribute. Open your project's Settings and compare each custom attribute's field code with what your storefront actually sends. See Field codes in Creating a Project.
Check whether an earlier promotion locked the items
If a product deal considered earlier has Don't let other promotions discount these items again turned on, the items it used are locked once it applies, both the discounted items and the items that qualified the cart. Product deals considered later can't use them. This can push a later product deal onto items you didn't intend, because the ones you expected it to use are already locked.
The promotions list is sorted by Evaluation order by default, so look for product deals above this one that lock items. To fix it, you can change their priorities, turn off locking on the earlier promotion, or change this promotion's product sets.
Reading cartItemPromotions
The cartItemPromotions field in the Verify response shows which promotions discounted cart items, and the total each one took off. Use it to confirm which promotion is responsible for which discount.
For each item's detail, including every discount step, look at resolvedCart.cartItems[*].discountSteps in the same response.
See Creating a Promotion and Creating a Project for setup guidance.
Updated 21 days ago