Process e-commerce orders with payment verification, inventory, Gmail, and Slack
Receive orders via webhook with automatic payment verification, stock checking, inventory reservation, shipping label generation, confirmation emails, and Slack notifications. WHAT IT DOES: Accepts order data (custome...
Template notes
Receive orders via webhook with automatic payment verification, stock checking, inventory reservation, shipping label generation, confirmation emails, and Slack notifications.
WHAT IT DOES:
Accepts order data (customer info, items array, payment ID, shipping address) via webhook POST Validates all required fields and email format Verifies payment status through your payment processor API Checks stock availability for all ordered items simultaneously Reserves inventory via REST API to prevent overselling Creates order record with unique ID (ORD-timestamp-random) Generates shipping label via carrier API with tracking number Sends styled HTML confirmation email with item table, totals, and tracking number Notifies fulfillment team via Slack orders channel Logs audit trail entry for every order attempt
INCLUDED FLOWS:
Valid order: Webhook receives POST → Validate fields → Verify payment → Check stock → Reserve inventory → Create order → Generate shipping label → Send confirmation email → Notify Slack → Log audit → Return 201 with tracking number and estimated delivery Invalid order: Missing required fields → Return 400 with specific validation errors Payment failed: Payment status is not "paid" → Return 402 with payment status details Out of stock: Insufficient stock for one or more items → Return 409 with unavailable items list Workflow error: Any node fails → Error trigger → Slack alert to errors channel
RESPONSE CODES:
201 Created: Order processed with orderId, itemCount, total, currency, trackingNumber, estimatedDelivery, and confirmationSent flag 400 Bad Request: Validation failed with list of specific errors and received data 402 Payment Required: Payment verification failed with payment status and paymentId 409 Conflict: Insufficient stock with list of unavailable items and availability details
ORDER DATA: