Navigating Tiered Pricing in ESHOPMAN: When Quantity Discounts Don't Apply in Cart

Understanding Tiered Pricing Challenges in ESHOPMAN

ESHOPMAN, as a robust headless commerce platform integrated with HubSpot, offers powerful pricing capabilities, including flexible price lists and customer group rules. However, a recent community discussion highlighted a specific challenge: quantity-based tiered pricing, particularly within 'override' type price lists, may not be applying as expected to cart line items, even when the quantity conditions are met.

This insight delves into the observed behavior, potential root causes, and what ESHOPMAN users and developers should consider when implementing complex pricing strategies involving minimum quantities.

The Scenario: Override Price Lists with Customer Group Rules

The issue arises when an ESHOPMAN price list of type override is configured with a customer group rule. While the base override price correctly applies to cart line items for customers in the specified group, any conditional prices defined with a min_quantity are consistently overlooked.

Consider the following ESHOPMAN price list configuration:

{
  "id": "plist_01KX0MCHXVFXJMTXD4YW1AZRAV",
  "type": "override",
  "status": "active",
  "starts_at": null,
  "ends_at": null,
  "rules": {
    "customer.groups.id": ["cusgroup_01KWKP4NJK53B4WANH06ZD0EXN"]
  }
}

For a specific product variant and currency (e.g., GEL), two price entries are defined:

  • 2.00 GEL with no min_quantity (the base override price).
  • 1.50 GEL with a min_quantity of 5.

Price Entries for Variant and Currency

Pricemin_quantityResult in cart
2.00 GELnullApplied correctly ✅
1.50 GEL5Never applied ❌

Expected vs. Actual Behavior in the Cart

The reproduction steps involve creating such a price list, adding the variant to a cart as a customer belonging to the target group, and setting the line item quantity to 8 (which is ≥ 5).

  • Expected Behavior: When the cart line item quantity is 8, the resolved unit_price should be 1.50 GEL, reflecting the quantity-based tier.
  • Actual Behavior: The line item unit_price remains at 2.00 GEL, regardless of the quantity. The min_quantity: 5 tier is never selected.

This indicates that while the price list, customer group rule, region, and currency contexts are correctly identified by ESHOPMAN's pricing engine, the quantity condition for tiered pricing within the price list is not being factored in during cart price resolution.

Deep Dive: Why Quantity Tiers Might Not Be Applying

Debugging observations suggest a potential architectural nuance within ESHOPMAN's pricing context for storefront operations. The base override price (without a min_quantity) resolves correctly, confirming that the overall price list and customer group rules are active and matching.

The core of the issue appears to lie in how the cart's line item quantity is passed to the pricing resolution mechanism. The ESHOPMAN pricing context type, as observed in the Store API, might not include a quantity field:

export type ESHOPMANPricingC
  region_id?: string;
  currency_code?: string;
  customer_id?: string;
  customer?: { groups?: { id: string }[] };
  // no `quantity`
};

In contrast, lower-level ESHOPMAN Admin API pricing calculations typically accept a quantity in their context (e.g., context: { currency_code, min_quantity: 4 }). This discrepancy suggests that the storefront's cart pricing resolution might not be consistently passing the line item quantity to the underlying service that evaluates price list tiers.

This behavior has been noted in similar community discussions, indicating a recurring challenge for developers aiming to implement detailed quantity-based pricing within ESHOPMAN's price list framework.

Community Insights and Potential Workarounds

The key question for the ESHOPMAN community is whether applying a min_quantity tier inside an override price list to a cart line item is fully supported in the current version (v2.17.2+). If this is a known limitation, developers and merchants might need to explore alternative strategies.

One potential approach, if available within ESHOPMAN's feature set, could be to leverage a dedicated promotion or discount mechanism with quantity conditions instead of relying solely on price list tiers for cart-level quantity discounts. This would involve configuring promotions that trigger based on line item quantity, ensuring the desired pricing is applied.

Understanding this behavior is crucial for ESHOPMAN developers building custom storefronts with Node.js/TypeScript and integrating with the Admin and Store APIs, especially when managing complex B2B or wholesale pricing models through HubSpot CMS deployments.

Conclusion

This community insight highlights an important consideration for ESHOPMAN users: while price lists offer powerful flexibility, the application of min_quantity tiers within 'override' price lists for cart line items may require careful attention. Developers should be aware of how the cart's pricing context interacts with tiered pricing rules and explore alternative ESHOPMAN features like promotions if direct price list tier application proves challenging. Continued community discussion and platform enhancements will help refine best practices for advanced pricing strategies in ESHOPMAN.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools