What it does
Inventory Alerts is a Shopify app that watches per-variant stock levels across multiple locations and sends branded email notifications via Resend when thresholds are crossed. Features a sophisticated alert state machine with escalation logic (ok → low → critical → out_of_stock) and debouncing to prevent spam.
Includes per-alert error isolation (a failure in one alert doesn't block others), complete audit trail with delivery status, and webhook-driven instant re-evaluation when inventory levels change.
Features
- 01 Real-Time Email Alerts Branded HTML email notifications via Resend when stock crosses thresholds. Different colors and emojis for each alert level: Low (🟡), Critical (🔴), Out of Stock (⚫), Recovered (🟢).
- 02 Multi-Location Support Monitor inventory at a specific location or sum across all locations. Full cursor-pagination for locations, inventory levels, and product variants with safety cap.
- 03 Smart State Machine Escalation matrix prevents alert spam: triggers only on level changes (ok→low→critical→out), not repeated same-level events. Tracks levelOrder for accurate state transitions.
- 04 Per-Alert Error Isolation If one alert's re-evaluation fails, the error is logged and processing continues to the next alert. One bad alert never blocks critical OOS notifications for other products.
- 05 Complete Audit Trail Full event history of every threshold crossing with email delivery status. Acknowledge tracking and searchable/filterable alert management dashboard.
- 06 Instant Webhook Evaluation Re-evaluates all alerts when inventory_levels/update webhooks fire. Products/update webhook also refreshes cached product titles, variant names, and SKUs.
Built with
- Remix
- TypeScript
- React
- Polaris
- Prisma
- PostgreSQL
- Resend API
- Shopify GraphQL API
- Sentry