Visual Flow Builder & Execution Simulator
The drag-and-drop conversational automation engine. Build intelligent branching logic, evaluate customer sentiment in real time, delegate queries to Google Gemini RAG nodes, and test customer journeys using the dry-run simulator.
1. Purpose of the Page
The Visual Flow Builder allows teams to design end-to-end conversational customer journeys without writing code. By chaining triggers, conditional filters, automated WhatsApp messages, AI responders, CRM actions, and human agent handoffs, businesses can provide instantaneous 24/7 self-service while escalating high-friction conversations directly to human agents in the Workspace Care Inbox.
2. Who Uses It (Target Roles)
Architects multi-step decision trees, FAQ routing branches, and user onboarding flows.
Configures fallback escalation triggers, urgent sentiment handlers, and agent handoff thresholds.
Tests routing logic in the interactive simulator and coordinates CRM webhook actions.
Interactive Visual Preview
3. Step-by-Step: Designing a Workflow
- Place a Trigger Node: Drag a Trigger node onto the canvas. Set trigger criteria to match specific keywords (e.g. “price”, “catalog”) or accept any inbound message.
- Add Condition & Sentiment Routing: Connect the trigger to a Condition node. You can branch based on customer sentiment (
positive,neutral,negative,urgent) or keyword contents. - Configure Gemini AI & Outbound Messages: Route neutral or positive inquiries to an AI Respond node. This instructs the Gemini model to ground its response in your indexed Knowledge Base documents.
- Set Human Escalation Fallbacks: Route urgent inquiries or low-confidence replies to a Human Handoff node. This pauses AI auto-replies and alerts live agents in the Workspace Care Inbox.
- Test with Dry-Run Simulator: Click Open Simulator. Type a sample customer message (e.g. “Cancel my subscription immediately”), set the sentiment, and click Run. The visual nodes highlight in sequence, verifying your routing logic without sending actual WhatsApp messages.
4. Flow Node Types & Configuration Schema
| Node Type | Identifier | Key Parameters | Operational Role |
|---|---|---|---|
| Trigger | trigger | triggerType: 'keyword' | 'any_message' | Entry point activated by incoming Meta Cloud API WhatsApp webhooks. |
| Condition | condition | conditionType: 'sentiment' | 'keyword' | Evaluates user message properties and routes downstream along true/false edges. |
| Send Message | send_message | messageText: string | Dispatches an immediate canned text message back to the customer on WhatsApp. |
| AI Respond | ai_respond | useKnowledgeBase: boolean, systemPrompt | Invokes Google Gemini with RAG vector search to compose a grounded, dynamic response. |
| Action | action | actionType: 'add_tag', tagName | Updates CRM contact attributes or assigns audience segmentation tags. |
| Human Handoff | human_handoff | reason: string | Sets isHumanTakeover: true and marks thread as priority for live human agents. |
5. Behind the Scenes: Asynchronous Flow Execution
When an inbound customer message passes signature verification, the backend executes the active flow graph:
- Directed Acyclic Graph (DAG) Traversal: The flow engine evaluates nodes in topological order. Sentiment analysis runs against the message text to classify urgency.
- RAG Vector Query: When hitting an
ai_respondnode, the engine computes a 768-dimension embedding, queries MongoDB Vector Search, and passes retrieved context to Gemini 1.5. - WhatsApp Dispatch: The resulting response is queued to BullMQ and sent to Meta Graph API endpoint
/v20.0/{phone_number_id}/messages.
6. Common Errors & FAQs
Ensure that your flow status toggle is set to Active and that only one primary flow is active per workspace. Check that the trigger node matches incoming keywords or accepts any message.
Once an escalation node is executed, automated flow routing and AI responses are muted for that specific customer conversation until a human agent manually reactivates the bot from the Workspace Care Inbox.