WACM.in Logo
Back to Documentation

AI Flow Builder

Build visual automation workflows to handle customer interactions, process data, and integrate with AI models.

Overview

The AI Flow Builder is a visual workflow engine that lets you create automated responses for WhatsApp messages. Build complex logic without writing code, integrate AI models via OpenRouter, and create intelligent chatbots that handle customer queries 24/7.

Visual Builder

Drag-and-drop interface for creating flows

AI Integration

Connect with OpenRouter AI models

Real-time

Instant response to incoming messages

How It Works

1

Incoming Message

Customer sends a message to your WhatsApp number. The webhook triggers the flow engine.

2

Flow Processing

The AI Flow Builder processes the message through your configured flow graph, evaluating triggers and conditions.

3

AI Response (Optional)

If configured, the flow calls OpenRouter API with the company's API key for intelligent responses.

4

Send Response

The flow sends the appropriate response back to the customer via WhatsApp Cloud API.

Flow Node Types

The AI Flow Builder supports 46+ node types organized into categories:

Trigger Nodes

TypeDescription
keyword_triggerTrigger on incoming message matching keywords
incoming_messageTrigger on any incoming message
catalog_openedWhen a contact opens the product catalog
abandoned_cartCart abandonment events
order_createdNew order placed
order_status_updatedOrder status changed
reservation_createdNew reservation/booking created
reminder_dueScheduled reminder fires
template_button_clickedTemplate button clicked by user

Message Nodes

TypeDescription
messageSend plain text with variable support
message_linkText with CTA URL button
quick_repliesMessage with up to 3 quick-reply buttons
list_messageInteractive list with sections
templateWhatsApp template message with parameters
image / video / pdfMedia messages with captions
catalog_linkLink to contact's product catalog
cart_summaryFormatted cart summary
send_ext_messageSend to external phone numbers

Logic & Data Nodes

TypeDescription
branchConditional branching (equals, contains, greater_than, less_than)
switchMulti-way switch on a variable value
counterRate limiting per contact (daily/weekly/monthly)
datastoreSet custom variables in contact state
httpMake HTTP requests to external APIs
openaiAI processing with vector search & intent classification
product_searchSearch product catalog
check_pricingCheck/deduct contact credits

Management & Schedule Nodes

TypeDescription
delayPause flow for a duration (max 24h)
followupSchedule follow-up message, continue flow
assign_agentAssign/unassign staff agent to contact
assign_groupAdd/remove contact from group
tagAdd/remove tag from contact
update_contactUpdate contact fields (name, email, custom)
questionAsk question, wait for reply with validation
verification_requestInitiate OTP/magic link verification
verification_verifyVerify OTP code submitted by user
endTerminate flow, clear contact state

AI Configuration

Configure AI processing in your flows using OpenRouter API:

AI Node Configuration
{
  "provider": "openrouter",
  "model": "deepseek/deepseek-v3.2",
  "api_key": "company_openrouter_api_key",
  "system_prompt": "You are a helpful customer support agent...",
  "max_tokens": 500,
  "temperature": 0.7
}

Per-Tenant API Keys

Each company uses their own OpenRouter API key stored in vendor_fields. No system-wide key dependency.

Flow Events

Flows are triggered by these events:

ContactReplies

Fired when a contact sends a message

AgentReplies

Fired when an agent sends a message

reminder_due

Fired when a scheduled reminder fires

reservation_created

Fired when a new reservation is created

commerce_payment_received

Fired when a payment is confirmed

order_created / order_status_updated

Fired on order events from Shopify/WooCommerce

Generate Flows with AI

Use the AI Flow API to generate flows from natural language prompts. Describe what you want your flow to do, and the AI generates the complete node and edge structure.

View AI Flow API Documentation

eCommerce Store

Build WhatsApp stores with product catalogs and orders.

Learn More