Back in Stock Notifications for Klaviyo
Product availability alerts integrated with Klaviyo email marketing platform.
Overview
Back in Stock Notifications for Klaviyo allows customers to sign up for email alerts when out-of-stock products become available again. The plugin integrates directly with Klaviyo's email marketing platform, capturing customer interest in unavailable products and automating notification flows when inventory is replenished.
Current Version: 1.3.4
Requires: WordPress 4.7+, PHP 8.0+, WooCommerce
Text Domain: back-in-stock
Key Features
Customer Notification Forms
- Automatic Form Display — Shows signup form on out-of-stock products
- Email Capture — Collects customer email addresses
- Product Tracking — Links subscribers to specific product/variant SKUs
- AJAX Submission — Seamless form submission without page reload
Klaviyo Integration
- List Management — Adds subscribers to Klaviyo lists
- Event Tracking — Sends back-in-stock events to Klaviyo
- Profile Creation — Creates or updates Klaviyo profiles
- Custom Properties — Attaches product metadata to subscriber profiles
Product Feed Generation
- XML Feed Export — Generates product catalog feed for Klaviyo
- Automated Updates — Scheduled feed regeneration via cron
- Stock Status Tracking — Real-time inventory availability
- Product Metadata — Includes images, prices, URLs
WooCommerce Integration
- Stock Level Monitoring — Watches inventory changes
- Product Variation Support — Handles variable products
- Out-of-Stock Detection — Automatically detects when products sell out
- Restock Detection — Identifies when products return to stock
Notification Triggers
The plugin fires events that Klaviyo flows can use to send emails:
- Customer Subscribes — When user signs up for notifications
- Product Restocked — When out-of-stock product has inventory
- Reminder Emails — Follow-up reminders if product stays in stock
How It Works
Sign-Up Flow
Customer Views Out-of-Stock Product
↓
Form Displays on Product Page
↓
Customer Enters Email Address
↓
AJAX Submit to WordPress
↓
Plugin Sends to Klaviyo API
↓
Profile Created/Updated in Klaviyo
↓
Confirmation Message Displayed
Notification Flow
Product Stock Level Changes
↓
WooCommerce Hook Fires
↓
Plugin Detects Restock Event
↓
Query Subscribed Customers
↓
Send Event to Klaviyo
↓
Klaviyo Flow Triggers
↓
Email Sent to Subscribers
Architecture Overview
Frontend Component (Form)
↓
REST API Endpoint
↓
Klaviyo API Client
↓
Product Data Collector
↓
Feed Generator
Use Cases
- Demand Capture — Collect email addresses for popular out-of-stock items
- Sales Recovery — Convert interested customers when stock returns
- Inventory Insights — Identify high-demand products
- Email List Growth — Build Klaviyo subscriber lists organically
- Customer Experience — Reduce frustration from out-of-stock items
Technical Requirements
- WordPress 6.4 or higher
- WooCommerce 8.0 or higher
- PHP 8.0 or higher
- Active Klaviyo account
- Klaviyo API credentials (Private API key)
- Laravel Mix for asset compilation
Klaviyo Configuration
Required Klaviyo Setup
- API Key — Private API key from Klaviyo account
- List ID — Klaviyo list for back-in-stock subscribers
- Flow Setup — Create Klaviyo flow triggered by restock event
- Email Template — Design notification email in Klaviyo
Klaviyo Events
The plugin sends these events to Klaviyo:
Back in Stock Requested— When customer subscribesProduct Back in Stock— When product restockedNotification Sent— Tracking for email delivery
Form Customization
The subscription form can be styled and positioned via:
- CSS Customization — Target form classes
- Template Override — Override form template in theme
- Shortcode Placement — Manual form placement with
[back_in_stock_form] - Hook-Based Injection — Use WordPress hooks for custom placement
Data Structure
Subscriber Data Stored in Klaviyo
{
"email": "[email protected]",
"properties": {
"product_sku": "PROD-123",
"product_name": "Product Name",
"product_url": "https://site.com/product/",
"product_image": "https://site.com/image.jpg",
"product_price": "49.99",
"subscribed_at": "2026-04-20T14:30:00Z"
}
}
Build System
The plugin uses Laravel Mix for asset compilation:
- JavaScript:
src/js/→dist/js/ - SCSS:
src/scss/→dist/css/ - npm Scripts:
dev,prod,watch