Workflow Engine & Automation Templates¶
JengaFlow executes visual automation workflows powered by an event-driven engine.
Workflow Structure¶
Every workflow consists of four standard components:
- Triggers: Events that initiate execution (e.g. Meta WhatsApp webhook, Daraja M-Pesa IPN, Odoo database trigger, cron schedule).
- Nodes & Actions: Discrete tasks executed in sequence (e.g. JSON parsing, XML-RPC query to Odoo, PDF rendering).
- Condition Filters: Logic branches that route execution based on conditions (e.g.
order_total > 5000orpayment_status == 'SUCCESS'). - Error Handlers: Fallback steps triggered on network errors or validation failures.
Included Workflow Templates¶
1. WhatsApp Order to Odoo Quotation¶
- Trigger: Incoming WhatsApp message.
- Action: Matches customer phone to Odoo
res.partner, extracts products, and generatessale.order.
2. M-Pesa Reconciliation & Receipt Delivery¶
- Trigger: Daraja C2B / STK push confirmation callback.
- Action: Finds the matching open invoice, posts the payment journal entry, stamps the KRA eTIMS QR code, and sends the PDF receipt to the customer.
3. Low Stock Alert¶
- Trigger: Daily cron audit at 08:00 EAT.
- Action: Queries Odoo
stock.quantfor products below minimum threshold and sends a consolidated WhatsApp message to the inventory manager.
4. eTIMS Automated Retry¶
- Trigger: KRA API connection timeout error.
- Action: Queues the invoice payload in Redis and retries signing at exponential backoff intervals (1m, 5m, 15m).