Track inventory levels with automated alerts
Receive inventory movements via webhook, validate data, update stock levels, and trigger automatic alerts when products need reordering. WHAT IT DOES: Accepts inventory movements (sales, purchases, adjustments, transf...
Template notes
Receive inventory movements via webhook, validate data, update stock levels, and trigger automatic alerts when products need reordering.
WHAT IT DOES:
Accepts inventory movements (sales, purchases, adjustments, transfers) via webhook Validates required fields including product ID, quantity, and movement type Records each movement via REST API Retrieves current stock levels after each movement Compares stock against configurable reorder points Routes alerts by severity through Slack and email Logs every movement to audit trail for traceability Returns movement ID, stock level, and alert status to the caller
INCLUDED FLOWS:
Valid movement: Webhook receives data → Validate fields and type → Record via API → Get current stock → Compare against thresholds → Route alerts by severity → Log to audit trail → Return movement ID, stock level, and alert status Invalid movement: Missing product ID, quantity, or invalid type → Return 400 error with validation details Workflow error: Any node fails → Error trigger → Slack alert to errors channel
ALERT LEVELS:
Critical (stock is zero): Slack alert to inventory-critical AND email to purchasing team with suggested reorder quantity Urgent (stock below 50% of reorder point): Slack alert to inventory with stock percentage and suggested order Warning (stock at or below reorder point): Slack alert to inventory with current level None (stock above reorder point): No alert, movement logged normally
SETUP: