Automate Everything by Omni · #8

Inventory-Driven Marketing Engine
with Shopify, Klaviyo & n8n

Your inventory is talking — your marketing isn't listening. This system connects Shopify stock levels to automated Klaviyo campaigns via n8n. Overstock clearance, low-stock urgency, trending product pushes — all driven by real inventory data, not guesswork.

Shopify inventory webhooksShopify
Klaviyo email SMS automationKlaviyo
n8n workflow automationn8n
OpenAI campaign copyOpenAI
Supabase analytics databaseSupabase
Google Sheets reportingSheets
Slack alertsSlack
$0
Blanket discount codes — every offer is margin-aware
Scroll to explore the system
The Problem

Your marketing team and your warehouse have never met.

📦

Overstock bleeding margin

Products sitting 60+ days. Storage costs climbing. You don't run a clearance campaign because you don't even know which SKUs are stuck. By the time you check, the margin is already gone.

Missed urgency windows

A bestseller drops to 20 units. Nobody on your team notices until it's sold out. You send a back-in-stock email 3 weeks later. The customer already bought from your competitor.

📈

Trending products discovered too late

A product suddenly sells 3x its normal rate. The marketing team finds out next month in a report. The momentum is already gone. You never capitalized on it.

💸

Blanket discounts killing profit

Every sale is "10% off sitewide." High-margin products get the same discount as low-margin ones. VIPs get the same code as first-time visitors. You're leaving money on the table every time.

Who This Is For

Built for DTC brands sitting on inventory and revenue

Skincare & Beauty
Supplements
Fashion & Apparel
Home Goods
Pet Supplies
Coffee & Beverages
Health & Wellness
Food & Snacks
Fitness Equipment
Baby & Kids
Electronics Accessories
Multi-SKU Shopify Stores
The System

How inventory drives your marketing

Three engines running in the background. Every campaign is triggered by real inventory data, not a marketing calendar. Your stock levels decide what gets promoted, when, and to whom.

1
Overstock Liquidation Engine
Products sitting too long get flagged automatically. AI calculates the minimum discount needed to move them without destroying your margin. Campaign fires to the right segment — no blanket sales, no guessing.
n8n daily inventory scan
Daily Cron
Scan all SKUs
Shopify inventory API
Pull Inventory
Stock + days held
Supabase sell-through analytics
Sell-Through Rate
Units / days in stock
OpenAI discount strategy
AI Strategy
Discount + copy
✓ Overstock Detected — Launch Campaign
Shopify discount code API
Generate Code
Unique, single-use
Klaviyo custom event trigger
Push to Klaviyo
Custom event + data
Slack marketing alert
Slack Alert
Team notified
✗ Healthy Stock — Skip
Supabase log healthy
Log Status
No action needed
2
Low Stock Urgency Engine
When a product drops below threshold, the system calculates how many days of inventory remain at current velocity. Customers who browsed or carted it get an urgency push — before it sells out, not after.
Shopify inventory webhook
Webhook
Stock drops below threshold
n8n velocity calculation
Days Remaining
Current sell rate
Klaviyo segment pull
Pull Segment
Browsed / carted
OpenAI urgency copy
AI Urgency Copy
"Only X left"
⚠ Low Stock — Urgency Push
Klaviyo urgency email
Email Campaign
Low stock urgency
Klaviyo SMS urgency
SMS Follow-Up
24hr if no open
Supabase campaign tracking
Track Conversion
Purchase attributed
✓ Sufficient Stock — Monitor
n8n continue monitoring
Continue Watch
Next webhook
3
Trending Product Amplification
When a product's sell rate spikes 2x+ above its 30-day average, the system catches it in real time. If there's enough inventory to support a push, a "trending now" campaign fires automatically to lookalike buyers.
n8n daily velocity analysis
Daily Analysis
All product velocity
Supabase trend comparison
Trend Compare
7d vs 30d average
Shopify inventory check
Inventory Check
Enough to push?
OpenAI trending campaign
AI Campaign
Social proof angle
🔥 Trending + In Stock — Amplify
Klaviyo lookalike segment
Lookalike Segment
Similar buyers
Klaviyo trending campaign
Trending Email
"X sold this week"
Slack trending alert
Team Alert
Consider ad push
✗ Trending but Low Stock — Hold
Slack reorder alert
Reorder Alert
Restock before push
The Intelligence Layer

Every discount is calculated, not guessed

Across all three engines, the system pulls product cost, current margin, inventory age, and customer lifetime value before deciding what offer to make. No more blanket codes.

High Margin + Heavy Overstock + VIP

Aggressive clearance

Product has 65% margin and has been sitting 90+ days. Customer has $800+ CLV. System generates a 25-30% single-use code with 48hr expiry.

25-30% OFF
High Margin + Moderate Overstock + New Customer

Acquisition offer

Product has 55% margin, 50 days in stock. Customer is first-time browser. System generates a 15% welcome code to convert the first purchase.

15% OFF
Low Margin + Any Stock Level

Protect the margin

Product only has 25% margin. No room for discounting without losing money. System offers free shipping instead — moves product without cutting price.

FREE SHIPPING
Any Margin + VIP + Trending Product

Early access, no discount

Product is trending. VIP customer with high engagement. No discount needed — exclusivity is the offer. System sends early access notification before the campaign goes wide.

EARLY ACCESS
Before & After

What changes when inventory drives marketing

✗ Without This System

Overstock discovered in quarterly inventory review
Clearance sales planned manually with 10% sitewide codes
Products sell out with no urgency push — back-in-stock email sent 3 weeks later
Trending products discovered in last month's report
Same discount for a $50 CLV customer and a $2,000 CLV customer
Discount codes leak to coupon sites, eroding full-price sales

✓ With This System

Overstock flagged daily based on sell-through rate thresholds
Campaigns auto-generated with margin-aware, single-use discount codes
Low-stock urgency emails sent to interested buyers before sellout
Trending products caught same-day and amplified to lookalike segments
Discounts calibrated to customer value, product margin, and stock position
Every code is unique, single-use, and expires — nothing leaks

What this system actually does for your store

Josh Leavitt, Founder of Omni Online Strategies
Josh Leavitt
Founder, Omni Online Strategies
Klaviyo is the best email engine for Shopify. But it can't see your warehouse. It doesn't know which products are stuck, which ones are about to sell out, and which ones are suddenly trending. This system gives Klaviyo a brain it doesn't have. Most DTC brands are running Klaviyo's built-in flows and calling it done. Welcome series, abandoned cart, browse abandonment — that's table stakes. The brands that pull ahead are the ones whose marketing reacts to what's actually happening in the business, not just what customers click on. This system makes your inventory the trigger.
40%
Dead Stock Reduction
Automated clearance within 45 days
$0
Blanket Discount Codes
Every offer is margin-calculated
Same-Day
Trend Detection
Not next month's report
Before
Sellout Urgency
Not after — proactive, not reactive
About This System
Inventory-Driven Marketing Engine — Shopify and Klaviyo Automated Campaign Triggers
This system connects Shopify inventory data to Klaviyo, triggering email and SMS campaigns automatically based on stock levels — launching price drop alerts when inventory is cleared, back-in-stock notifications when restocked items return, low-stock urgency messaging when popular SKUs are nearly sold out, and new arrival campaigns when new inventory is added. Built for Shopify brands, DTC retailers, and e-commerce operators that want their marketing campaigns driven by actual inventory data rather than a manual marketing calendar.
System Facts
CategoryDetail
Manual Process ReplacedMarketing managers manually monitoring inventory levels in Shopify, deciding when to run promotions or send alerts, exporting product lists, and triggering Klaviyo campaigns by hand — a process that introduces delays and misses real-time inventory signals
TriggerShopify inventory webhook — stock level change, new product added, product restocked, product below threshold — fires in real time
What the System DoesMonitors Shopify inventory in real time, detects configured inventory events, builds the appropriate subscriber segment in Klaviyo, and triggers the relevant email or SMS campaign automatically
Who Uses ItShopify store owners, DTC brand operators, e-commerce marketing managers, and agencies managing Shopify email marketing clients
IntegrationsShopify (inventory webhooks via API), Klaviyo (segment creation and campaign/flow trigger), n8n (event routing and segment logic), Google Sheets (inventory event log)
Campaign Types AutomatedBack-in-stock email and SMS, low-stock urgency email, price drop alert, new arrival announcement, clearance sale trigger, and flash sale activation for specific product categories
Revenue ImpactKlaviyo benchmark: back-in-stock emails generate an average of $3.94 per recipient — among the highest revenue-per-send of any automated email type
Setup TimeComplete inventory-triggered campaign system with 4 to 6 campaign types: 5 to 7 business days from kickoff to all triggers live
Sources & Research
Frequently Asked Questions

An inventory-driven marketing engine is a system that connects a Shopify store's real-time inventory data to a marketing platform like Klaviyo and automatically triggers relevant email and SMS campaigns based on inventory events — rather than waiting for a marketing manager to notice a stock change and manually create and send a campaign. When a popular product comes back in stock, the engine immediately identifies subscribers who expressed interest and sends a back-in-stock notification. When a product drops below a low-stock threshold, it sends urgency messaging to engaged subscribers who have viewed the product. When new inventory is added, it triggers a new arrival campaign to the appropriate segment.

The system monitors five primary inventory events from Shopify: (1) Back in stock — a product that was out of stock now has inventory, triggering notifications to subscribers who signed up for back-in-stock alerts or who previously viewed or added the product; (2) Low stock — inventory falls below a configured threshold (e.g., under 10 units), triggering urgency messaging to engaged subscribers; (3) Price drop — a product's price is reduced, triggering an alert to subscribers who viewed or wishlisted the product at the original price; (4) New arrival — a new product is added to the store, triggering an announcement to the relevant subscriber segment; (5) Clearance — a product is marked for clearance or moved to a sale collection, triggering campaign activation.

For back-in-stock events, the system segments subscribers who: signed up for a back-in-stock notification on that specific product, viewed the product page more than once without purchasing, or added the product to their cart without completing checkout. For low-stock urgency, the segment includes subscribers who viewed the product in the last 30 days and have not yet purchased it. For price drops, the segment includes subscribers who viewed the product at the previous price point. For new arrivals, the segment is defined by product category interest derived from purchase and browse history.

Klaviyo's native back-in-stock flow requires customers to manually opt in for a specific product notification — a subscriber must click a 'Notify me when available' button on the product page. This captures only a fraction of interested buyers. The inventory-driven marketing engine extends this by also targeting subscribers who showed purchase intent through browse behavior (multiple product page views) and cart abandonment — buyers who did not formally opt in but have demonstrated clear interest. This expands the addressable audience for each back-in-stock event by 3 to 5 times.

Yes. Shopify stores many products as variants — a t-shirt in multiple colors and sizes. The system handles variant-level inventory tracking: a back-in-stock notification for a black medium t-shirt does not trigger notifications to subscribers who showed interest in the blue large version. Variant-level subscriber segmentation is maintained in Klaviyo using custom properties for the specific variant that triggered the interest event.

Klaviyo's benchmark data shows back-in-stock emails generate an average of $3.94 in revenue per recipient sent — compared to $0.09 per recipient for standard promotional emails. For a store sending back-in-stock notifications to a 5,000-subscriber segment per restocking event, that represents approximately $19,700 in incremental revenue per event. For a store that restocks popular products weekly, the annual incremental revenue from automating back-in-stock notifications alone can exceed $500,000 — revenue that would have been lost without the notification.

A complete setup with 4 to 6 campaign types (back-in-stock, low-stock urgency, price drop, new arrival, clearance, flash sale) takes 5 to 7 business days. The work involves: connecting Shopify inventory webhooks to n8n, building the Klaviyo segment logic for each event type, creating or configuring the Klaviyo flows and campaigns that fire on each trigger, and testing each trigger type with real inventory events in a staging environment before going live.

How It Works
STEP 01

Shopify store connected to n8n via inventory webhooks

Shopify's inventory level update webhook configured to fire to n8n on any stock level change. Product and variant data included in each webhook payload.

STEP 02

Inventory event rules configured

Thresholds defined for each campaign type — low-stock threshold (e.g., under 10 units), price drop minimum percentage, restock minimum quantity — to prevent trivial inventory changes from triggering campaigns.

STEP 03

Klaviyo subscriber segments built per event type

Segment logic built in Klaviyo for each campaign trigger — back-in-stock interest subscribers, recent product viewers, cart abandoners for specific products, price drop candidates.

STEP 04

Campaign flows and templates configured in Klaviyo

Email and SMS flows configured in Klaviyo for each inventory event type. Templates written with dynamic product content pulled from the event data.

STEP 05

Event routing built in n8n

n8n receives the Shopify webhook, identifies the event type, retrieves the affected product and variant data, triggers the appropriate Klaviyo segment update and flow activation.

STEP 06

All inventory events logged for reporting

Each triggered campaign event logged to Google Sheets with product, event type, subscriber count reached, and campaign revenue attributed — for weekly inventory marketing performance review.