Most e-commerce marketing runs on a calendar: the team plans a promo, picks a date, writes the email, sends it. The inventory has no vote. Meanwhile the warehouse knows things the calendar never will: which SKUs have been sitting 90 days, which bestseller is 20 units from selling out, which product quietly tripled its sell rate this week. Inventory driven marketing flips the trigger. Stock data decides what gets promoted, when, and to whom.

The Architecture in One Paragraph

Shopify emits inventory events through webhooks: stock level changes, restocks, new products. An automation layer (n8n) receives those events, applies the rules (is this overstock by sell through rate, is this below the low stock threshold, is this a velocity spike), enriches with margin and customer data, and pushes a custom event into Klaviyo. Klaviyo does what it does best, segmentation and delivery, but now its triggers come from the warehouse instead of only from customer clicks. Every campaign that fires is a response to something real happening in the business.

The Three Engines

In practice this becomes three always-on engines. Overstock liquidation: slow movers get flagged daily by sell through rate, and AI calculates the minimum discount that moves the product without destroying margin. Low stock urgency: when a product drops below threshold, the people who browsed or carted it get an "only a few left" push before sellout, not a back in stock apology three weeks after. Trending amplification: a product selling at twice its 30 day average gets caught the same day and pushed to lookalike buyers while the momentum is real.

The full system, including the margin aware discount logic that replaces blanket 10 percent codes, is documented in detail on our inventory driven marketing engine page, with every pipeline mapped step by step from Shopify webhook to Klaviyo send.