Troubleshooting
This page covers the most common issues merchants encounter with Advance Discount Function and provides step-by-step resolution guidance. Each issue includes a debug checklist to help you identify the root cause.
1. Discount Not Applying at Checkout
The discount is configured in the rule builder but does not appear when a customer reaches checkout.
Debug Checklist
- Is the discount enabled? Open the discount in Shopify Admin and confirm it is active, not in draft or paused state.
- Is the rule group enabled? Check that the
enabledfield on the rule group is set totrue. A disabled rule group is skipped during evaluation. - Is the correct discount class enabled? If you are expecting a product discount, verify the target is set to
product. If you are expecting an order discount, verify the target is set toorder. A mismatch between the configured class and the expected behavior is a common cause. - Are all conditions being met? Walk through each condition in the rule group and verify that the test cart and customer actually satisfy every requirement. Pay close attention to:
- Customer tag spelling (case-sensitive)
- Cart subtotal thresholds (is the cart value before or after taxes?)
- Product tags and collection membership on the actual items in the cart
- What is the strategy? If the strategy is
"first"and a higher-priority rule group is matching first, the lower-priority group will never fire. Check rule group ordering. - Are
combinesWithsettings correct? If another discount is already applied to the order, Shopify may block this discount based on thecombinesWithconfiguration. Check whether the discount is allowed to combine with other active discounts. - Is a rejection rule blocking the discount? If the discount is code-based, check whether any rejection rules are configured and whether their conditions match the current cart/customer state.
- Is the discount function installed? Navigate to Shopify Admin > Settings > Apps and sales channels > Advance Discount Function and confirm the app and its functions are installed.
2. Wrong Items Getting Discounted
The discount is applying, but it is being applied to items that should not receive the discount (or missing items that should).
Debug Checklist
- Check the target scope. If the scope is
"all", the discount applies to every item in the cart, regardless of product-level conditions. If you want only matching items to be discounted, set the scope to"filtered". - Review product-level conditions. Verify that the
productTag,collection,productType,productVendor, orproductVariantconditions accurately match the items you intend to target:- Are the tags spelled correctly and assigned to the right products in Shopify?
- Are the collection IDs correct? Collection IDs use the format
gid://shopify/Collection/123. - Are the products actually in the collections you are referencing?
- Check item filters (BXGY and Bundle). For BXGY and Bundle functions, verify the
buyFilter,getFilter, orbundleItemsfilters are targeting the correct products or collections. - Verify condition logic. If using OR logic, remember that any single condition passing makes the entire rule group apply. Product-level conditions under OR logic may produce broader matches than expected.
- Check for gift card exclusions. Gift card line items are always excluded from product-level discounts. If you are expecting a gift card to be discounted, this is not supported by Shopify.
3. Discount Code Rejected Unexpectedly
A customer enters a valid discount code but receives a rejection message at checkout.
Debug Checklist
- Check rejection rules. Open the discount function configuration and review the
rejectionRulesarray. A rejection rule fires when its conditions match the current cart and customer state. If the customer does not meet the rejection rule’s conditions, the rejection should not fire. - Review rejection rule conditions. Walk through each condition in the rejection rule:
- Is the
customerTagcondition usinghasNonewhen it should usehasAny, or vice versa? - Are the tag values spelled correctly?
- Does the customer actually have (or lack) the required tags in Shopify?
- Is the
- Check the rejection message. The message shown to the customer comes from the
messagefield in the rejection rule. If it is generic (e.g., “Discount code is not valid”), verify you are looking at the right rejection rule. - Verify the discount code is associated with the correct function. In Shopify Admin, confirm the discount code is linked to the Advance Discount Function discount, not a different discount.
- Check
combinesWithsettings. If another discount is already applied, Shopify may reject the code at the platform level before the function even evaluates it.
4. Shipping Discount Not Working
A shipping discount is configured but delivery options are not being discounted at checkout.
Debug Checklist
- Verify the target class. The discount target must be set to
shipping, notproductororder. Check thetargetsfield in the configuration. - Check the shipping scope. The scope should be
"all"to discount all delivery options. If the scope is more restrictive, verify it matches the available shipping methods. - Confirm the discount class is enabled. When creating the discount in Shopify Admin, the Shipping discount class must be selected. Even if the JSON configuration targets shipping, the discount class must be enabled at the Shopify level.
- Review conditions. Shipping discounts only evaluate cart-level conditions. Product-level conditions (like
productTagorcollection) are ignored for shipping targets. If you have product-level conditions in a shipping-targeted rule group, they will have no effect. - Check Shopify’s shipping settings. Some Shopify shipping configurations may not be compatible with discount functions. Verify that your shipping rates are set up correctly in Shopify Admin > Settings > Shipping and delivery.
- Test with different delivery addresses. If using a
marketcondition, the shipping discount may only apply to specific countries. Test with an address that matches the condition.
5. Tiered Discount Showing Wrong Tier
The tiered discount is applying, but the wrong tier level is being used (e.g., tier 1 is applied when tier 2 should be).
Debug Checklist
- Verify threshold values. Review the
tiersarray and confirm the threshold values match your expectations:- Tier 1: threshold 3 (3+ items)
- Tier 2: threshold 6 (6+ items)
- Tier 3: threshold 10 (10+ items)
- Check tier resolution order. The Tiered function resolves tiers from highest to lowest. The highest qualifying tier always wins. If the customer has 8 items and tiers are at 3, 6, and 10, the function applies tier 2 (threshold 6) because 8 >= 6 but 8 < 10.
- Verify the threshold type. Is the threshold based on
"quantity"(number of items) or"subtotal"(cart value)? A quantity-based tier with a threshold of 100 means 100 items, not $100. - Check the threshold scope. If the scope is
"filtered", only items matching the product-level conditions count toward the threshold. If no items match the filter, the threshold is never reached. - Count items correctly. The quantity count includes the
quantityfield on each cart line. A single line for “T-Shirt x 3” counts as 3 items, not 1.
6. Bundle Discount Not Triggering
All bundle components appear to be in the cart, but the bundle discount is not applying.
Debug Checklist
- Verify all components are present. Check the
bundleItemsarray and confirm each component has at least the required quantity in the cart:- Is the product in the correct collection?
- Is the product tag spelled correctly?
- Does the cart contain the required quantity for each component?
- Check component filters. Each bundle component has a
filterfield. Verify thefilterTypeand the filter values (collection IDs, product tags, etc.) match the actual products in the cart. - Verify collection IDs. Collection IDs must use the full Shopify GID format:
gid://shopify/Collection/123. A mismatched or stale collection ID will cause the component to never match. - Check for overlapping components. If two bundle components reference the same collection or tag, a single product might satisfy both. Verify the quantity math is correct — the function merges overlapping quantities, but the total items in the cart must be sufficient.
- Confirm the Bundle function is available. The Bundle Discount function requires the Enterprise plan. If you are on a lower plan, the function may not be active.
7. BXGY Giving Too Many or Too Few Free Items
The Buy X Get Y promotion is applying, but the number of free (or discounted) items is not what you expected.
Debug Checklist
- Check
buyQuantityandgetQuantity. These fields define the ratio.buyQuantity: 2andgetQuantity: 1means “for every 2 items bought, 1 item is discounted.” Verify these values match your intended promotion. - Check
maxSets. ThemaxSetsfield limits how many complete sets of the promotion can apply per cart. IfmaxSetsis 1, only one set of buy/get is applied even if the customer has enough items for multiple sets. If you want unlimited sets, either omit the field or set it to a high number. - Verify buy and get filters. The
buyFilterandgetFiltercontrol which items qualify as “buy” items and which qualify as “get” items. If the filters are too narrow, there may not be enough qualifying items to form a complete set. - Understand cheapest-item allocation. The BXGY function discounts the cheapest qualifying items first. If you expect the most expensive item to be free, that is not how the allocation works.
- Count qualifying items. The customer needs at least
buyQuantity + getQuantityqualifying items in the cart for one set. For “Buy 2 Get 1 Free”, the customer needs at least 3 qualifying items.
8. Discount Amount Seems Wrong
The discount is applying, but the dollar amount or percentage does not match your expectations.
Debug Checklist
- Verify the discount type. Check whether the discount is set to
"percentage","fixedAmount", or"fixedPrice":"percentage"— Reduces the price by a percentage (e.g., 20 means 20% off)."fixedAmount"— Reduces the price by a fixed dollar amount (e.g., 10 means $10 off).
- Check
applies_to_each_itembehavior. For product-class discounts withfixedAmount, the fixed amount is applied per qualifying line, not as a total across all lines. If 3 items qualify and the fixed amount is $10, the total discount is $30 ($10 per item), not $10 total. - Review the target scope. If the scope is
"all"and you expected only filtered items to be discounted, the discount is being applied more broadly than intended. - Check for multiple matching rule groups. If the strategy is
"all", multiple rule groups may be applying discounts simultaneously. The total discount is the sum of all matching groups. - Verify no rounding issues. Percentage discounts on prices with cents may produce rounding differences. Shopify handles rounding according to the store’s currency settings.
- Check for stacking with other discounts. If
combinesWithallows stacking, another discount function or native Shopify discount may be contributing to the total discount amount. Review all active discounts on the order.
General Debugging Tips
Inspect the Configuration JSON
The rule builder UI generates a JSON configuration stored in a metafield. You can view this JSON by inspecting the metafield value directly. This helps you verify that the UI settings produced the expected configuration.
Test with a Minimal Cart
When debugging, simplify your test cart to the bare minimum needed to trigger (or not trigger) the discount. This eliminates variables and makes it easier to pinpoint the issue.
Check One Condition at a Time
If a rule group has multiple conditions, temporarily remove all but one to confirm each condition works independently. Then add them back one at a time to find the failing condition.
Review the Discount in Shopify Admin
Some settings (like combinesWith, discount class selection, and activation method) are configured at the Shopify discount level, not within the Advance Discount Function rule builder. Always check both the rule builder configuration and the Shopify Admin discount settings.
Verify Product Data in Shopify
Conditions that reference product tags, collections, or variants depend on the data being correct in Shopify. If a product tag was recently added or a product was recently moved to a new collection, there may be a propagation delay.
Next Steps
- FAQ — Answers to common questions about the app.
- Best Practices — Tips for configuring discounts to avoid common pitfalls.
- Conditions Overview — Full reference for all 18 condition types.