Half the messages your team answers are the same five questions: pricing, hours, shipping, refund status, where is my order. Chatbot Rules turns those into instant, branded replies with buttons and lists — before a human ever sees the conversation. No model training, no hallucinations, no surprises.
When teams adopt conversational AI, the instinct is to throw an LLM at every message. But the math rarely works for the long tail of trivial questions. A single GPT-4 call to answer "what time do you close" costs more than the entire ticket margin, takes 800ms, and occasionally hallucinates a closing time that was never in your knowledge base. The right answer here is a rule: if the message matches /hour|time|open|close|timing/i, reply with the canned hours block.
The second problem is observability. Rule-based bots from the 2010s lived in a black box — you had no idea which rules fired, which were dormant, or whether a typo in your regex was silently routing 8% of users into the wrong branch. Teams gave up on rules because they could not trust them.
Chatbot Rules in SabNode addresses both. Rules are fast (sub-50ms match), cheap (no model cost), and instrumented end-to-end. Every match is logged with the input, the rule, and the reply sent. You see exactly what is firing and tune accordingly.
Chatbot Rules is a deterministic pattern-matching layer that sits in front of every inbound message across WhatsApp, Instagram, Web Chat and Email. You define rules with three matching modes — Exact (case-insensitive equality), Contains (substring), and Regex (full PCRE) — and a reply action. When a message arrives, the engine evaluates rules in priority order and fires the first match. If nothing matches, the message falls through to your flow, your AI agent, or the shared inbox queue.
Each rule is more than a keyword. It can be scoped by channel (only WhatsApp), by time window (only outside business hours), by language (only Hindi messages), or by contact segment (only new contacts in the last 7 days). This means a single rule library serves your entire surface area without leaking across contexts — your "pricing" rule for Indian visitors shows INR, your "pricing" rule for international shows USD.
Replies are not limited to text. A rule can fire a WhatsApp template (with header media), an interactive button message (up to three quick replies), an interactive list message (up to ten options), or a free-form message inside the 24-hour service window. On Instagram, the same rule sends a DM with quick-reply buttons. On Web Chat, it renders rich cards. One rule definition, multi-channel output — that is the point.
The whole layer is observable. Every rule has a hit counter, a 7-day trend, and a debug feed showing the last 20 messages it matched. Rules that never fire surface in a "stale" panel so you can clean up cruft. Conflicts (two rules with overlapping patterns) are flagged at save time. And every match emits an event you can wire into Flow Analytics to measure deflection by rule.
Capabilities
Exact for menu-style flows ("MENU", "STOP"). Contains for fuzzy intents ("how much" matches "how much does it cost"). Regex for power users — /\b(refund|return)\b/i with full PCRE support including named capture groups you can reference in the reply.
Rules execute in numeric priority order. A rule at priority 10 always evaluates before priority 50. First match short-circuits the rest. This makes conflict resolution deterministic — no more "why did the wrong reply fire" debugging sessions.
Scope by channel, language, contact tag, business hours, or segment. A "shipping" rule can have one version for B2B contacts and another for D2C, with no overlap. Scope rules surface as filters in the rule list so navigation stays sane.
Reply with up to three quick-reply buttons or a list with ten options. Button clicks become structured events that trigger downstream flows. This is the cheapest way to build a guided menu without paying for an LLM at every step.
Reference contact attributes, regex capture groups, business hours and current time in the reply. `Hi {{contact.first_name}}, your order {{match.1}} ships tomorrow.` Variables fall back to safe defaults if missing — no broken templates on empty fields.
Every rule shows hit count, last-fired timestamp, and a 7-day sparkline. Rules with zero hits in 30 days are flagged. You can A/B test two replies for the same rule with a 50/50 split and pick the one that drives fewer follow-up messages.
Any rule can include an "escalate after N replies" condition. If the same contact triggers the same rule three times in five minutes, the bot stops, drops a note in the inbox, and assigns the conversation to a human agent. Saves customers from rule loops.
Use cases
Single rule scoped to outside business hours, contains mode on "*", priority 99 (fallback). Replies with a template containing the next-open-time variable and a button to leave a callback request. Captures intent overnight without making it feel automated.
Regex /refund.*\b([A-Z]{2}\d{6})\b/i matches "refund for order IN123456". Captures the order ID, fires an HTTP request to the OMS, replies with the live status. Three-rule library handles 80% of inbound refund queries without an agent.
Exact match on "COURSES" fires an interactive list with six course categories. Each list option triggers a downstream rule that sends syllabus PDF and a fee structure. Replaces a five-page web form. Adoption jumps because students stay inside WhatsApp.
Contains match on city names from a 240-entry list. Reply with branch address, hours, phone number and a Google Maps link. Adding a new branch is a single row in the rule list — no flow edit, no deploy.
Highest priority rule (priority 1) matches /^(stop|unsubscribe|opt.?out)$/i in any case. Sets opt-in-status to false, sends a confirmation, and excludes the contact from future broadcasts. Audit-logged for DLT and consent compliance.
How it works
Chatbot Rules is included on every SabNode workspace. No separate billing, no extra setup, flip it on from your workspace settings.
Pick a matching mode, write the pattern, draft the reply. The editor previews matches against a sample message so you know what fires before saving.
Restrict to a channel, language, segment or time window. Drag to reorder priority. Conflicts with existing rules are flagged in line.
The rule goes live across all matching channels instantly. The hit counter starts ticking. The debug feed shows the next twenty messages it matched.
Refine patterns based on misses. Add escalation if the rule keeps firing for the same contact. Promote high-hit rules into a full Flow if the journey grows.
Flow Analytics rolls up rule hits per channel per day. Compare against shared-inbox volume to quantify the human-hours saved.
Connect directly with your existing stack or leverage the Platform Core tools to extend capabilities natively.
Enhance this feature with deep integrations into our core infrastructure. Connect via API, utilize webhooks, or embed directly using our SDKs.
Manage all settings seamlessly within the core UI.
Extend functionality with custom automated workflows.
No credit card. No sales call required. Spin up a workspace, plug in a number, and your team is live in under an hour.