Attach a gross-margin condition to any PDQ checkout extension so it appears only when the cart meets a profit threshold you set - protecting margin on low-profit carts while still converting on profitable ones.
How it works
PDQ reads Cost and Price from Shopify for each item in the cart, aggregates them to a cart-level Gross Margin ($ and %), and renders the extension only if the margin meets your threshold.
Gross Margin ($) = Cart Subtotal − Product Costs
Gross Margin (%) = (Gross Margin $ ÷ Cart Subtotal) × 100
Set it up
Go to Extensions and open the extension you want to gate (e.g. Gift Unlock, Checkout Upsell).
Scroll to Display Conditions → Add rule.
Field: Gross margin. Operator: is greater than / equals / is less than. Enter a value and choose % or $.
Save.
Example:
Step | Setting |
Rule | Gross margin (%), is greater than or equal, 25, % |
Result | The extension appears only when the cart’s profit margin is 25 % or higher. |
Tips
Start with % (scales with cart size); use $ for an absolute profit floor.
A/B test margin-rule vs. no-rule to measure the impact on net profit and AOV.
Combine with customer tags — e.g. exclude VIPs from profit gating.
FAQ
Are shipping costs included in the margin? No — margin uses product cost and price only.
What if cost data is missing in Shopify? Items with no cost are treated as $0 cost, which inflates margin — audit missing cost fields before relying on the rule.
Can I see margin on the order? Yes — gross margin ($ and %) appears on the order's Profitability card after checkout.
Related: How to set up shipping rules
