E-commerce · n8n

Block Discount Stacking That Would Sell at a Loss

Customers sometimes stack codes into a loss-making order. Detect stacked discounts that drop below your margin floor and block or cap them.

difficulty Intermediatesetup 35 minresult Discount stacking can't push orders below your margin floor, protecting profit during promotions.
  1. 1

    Check Applied Discounts

    Add a Webhook node reading the discounts applied at checkout.

  2. 2

    Compute the Resulting Margin

    Add a Code node calculating margin after all stacked discounts.

  3. 3

    Block Below Floor

    Add an IF node capping or rejecting combinations that breach the margin floor.

  4. 4

    Alert on Attempts

    Add a Slack node flagging repeated stacking attempts to review your promo rules.

  5. 5

    Activate and Test

    Activate the workflow with a loss-making stack. Confirm it's blocked.

Frequently asked questions

Isn't blocking bad UX?

Cap rather than hard-block where possible, and design promos so stacking doesn't reach a loss.

How do I set the floor?

Base it on each product's true cost including fees and shipping so the floor reflects real margin.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.