TrolyPage

An autonomous Marketing & Sales operating system for businesses that want AI-powered omni-channel growth.

Contact Info

Follow Us

14 min read

Post-Mortem #07: When Two Overlapping Automation Rules Sent 4 Duplicate Replies in 10 Seconds

TrolyPage

Dec 02, 2026
9 views
Isometric 3D glassmorphism illustration of four amber signal ribbons converging onto an inbox node and gated by a cobalt-and-emerald mutex prism.

Two overlapping Trigger-Condition-Action automation rules send duplicate replies in seconds because rule priority only orders which rule runs first—it does not halt peer rules, live AI auto-reply, or queued follow-ups on the same inbound message. To stop four-message collisions without a visual flowchart builder, teams must enforce a Tag-Mutex Single-Entry Rule Registry using explicit exclusion conditions, run-once locks, and unified-inbox AI pause checks.

Editorial disclosure: Published by TrolyPage Field Notes. This reproducible operational post-mortem documents real Trigger-Condition-Action rule evaluation, tag-mutex guarding, and AI handoff mechanics in TrolyPage alongside verified external platform documentation. No customer names, private chat transcripts, or fabricated campaign benchmarks are invented.

Why Priority Ordering Alone Never Stops Duplicate Replies

Operators migrating from visual drag-and-drop chatbot builders often assume that assigning Priority: 10 to a welcome rule and Priority: 5 to a keyword rule creates an exclusive if-else branch. It does not. On TrolyPage, conversational automation does not use a visual drag-and-drop chatbot flow builder (the Media Pipeline canvas handles content workflows, not conversation trees). Instead, workspace teams combine knowledge-grounded AI assistants with deterministic Trigger-Condition-Action rules across Scenarios, Tag Rules, and Follow-up sequences.

As documented in the official TrolyPage Documentation Hub (currently published in Vietnamese), a higher Priority number ensures one rule is evaluated earlier on a matching event, not that subsequent active rules are skipped. When an inbound buyer message arrives, the rule engine loads every active scenario matching that trigger event in descending priority order and executes every rule whose conditions pass. Meanwhile, unless a human takeover or toggle_ai action disables auto-reply before the AI turn runs, the inbound AI Agent still evaluates the same message and posts its own answer.

This failure mode sits squarely on the boundary highlighted in Anthropic’s Building Effective Agents engineering guide and OpenAI’s Prompt Engineering documentation: deterministic routing and state transitions belong in explicit control logic, whereas open-ended product Q&A belongs in focused LLM instructions. When uncoordinated deterministic rules fire alongside an unconstrained AI assistant, a single buyer greeting turns into a four-message pileup.

5-Part Post-Mortem Dossier: Anatomy of a 10-Second, 4-Reply Burst

Modeled on the Google SRE blameless post-mortem framework, the reproducible incident dossier below dissects what happens when a first-contact greeting rule, a keyword price matcher, live AI auto-reply, and an immediate follow-up rule collide on one buyer message.

Three-column light-mode execution trace diagram showing how one inbound buyer message triggers four overlapping replies in 10 seconds across Welcome, Keyword, AI Auto-Reply, and Follow-up rules, the three-step emergency triage, and a Tag-Mutex Single-Entry Router.
Anatomy of a 10-second duplicate reply burst: unguarded parallel triggers vs. emergency triage and a Tag-Mutex single-entry routing architecture.

1. Symptoms: Four Conflicting Replies From One Buyer Question

A first-time buyer opens Facebook Messenger or Website Chat and sends a single message at t = 0.0s: "Hi, how much is the Pro bundle?" Within ten seconds, four outbound messages hit the buyer’s screen:

  • t + 0.4s — Welcome Scenario: Sends a generic greeting asking what product the buyer is looking for, ignoring the fact that the buyer already asked about the Pro bundle.
  • t + 1.1s — Keyword Price Rule: Matches "how much" and dumps a static three-tier price list without acknowledging the greeting.
  • t + 4.8s — AI Agent Auto-Reply: Reads the buyer’s original question and sends a conversational, knowledge-grounded explanation of the Pro bundle.
  • t + 9.6s — Immediate Follow-Up Nudge: Fires a scheduled check-in ("Let us know if you need help picking a plan!") configured with zero delay and missing stop conditions.

Beyond embarrassing the brand, the collision causes two concrete operational damages. First, inside the Meta Messenger 24-hour standard messaging window, rapid-fire automated bursts invite user mutes and spam reports that hurt Page deliverability. Second, per OpenAI’s token-counting specification (where both input context and generated output consume quota), letting the AI Agent generate a ~4,000-token exchange on a thread already answered by a static keyword rule wastes monthly plan tokens unnecessarily.

2. Logs and Root-Cause Trace: Empty Exclusion Gates Across Parallel Engines

Inspecting Scenario View logs alongside unified inbox outbound timestamps reveals four interacting configuration defects rather than an infrastructure outage:

  1. Empty conditions on the Welcome rule: The new_subscriber / first-message scenario had conditions: {} and did not attach or check a mutex tag such as route:welcomed.
  2. Keyword rule ignored prior sends and AI state: The keyword rule matched "how much" with match_mode: "any" and sent a static price card without setting route:claimed or pausing the AI turn (toggle_ai: false), leaving ai_enabled = true on the subscriber record.
  3. AI inbound policy stayed open: Because ai_enabled remained true and no human handoff had set an ai_paused_until lock, the AI pipeline passed its pre-reply policy check and generated Reply #3. (As covered in Post-Mortem #02 on bot-human handoff collisions and Meta Messenger Webhook echo handling, human replies sent from native external apps rather than the unified inbox also fail to trigger internal handoff locks unless synced.)
  4. Zero-delay follow-up lacked auto-stop guards: A rule-created schedule or follow-up sequence fired immediately without checking whether the buyer had already received a reply or staff intervention—the exact auto-stop gap analyzed in Post-Mortem #06.

3. Immediate Hotfix: Contain the Burst in Under 5 Minutes

Do not edit JSON condition blocks live while customers are actively colliding with rules. Contain the blast radius first:

  1. Toggle overlapping rules to Active = OFF: Pause secondary new_message, new_subscriber, and keyword scenarios immediately. Disabling stops future triggers only; it does not revert tags or ai_enabled states already modified.
  2. Isolate firing rule_id entries in View logs: Match View logs timestamps against duplicate inbox messages to pinpoint every rule in the collision chain.
  3. Apply a manual tag lock and unified-inbox handoff: Tag affected buyers route:triaged and send a human reply inside the unified inbox (or trigger handoff) so ai_paused_until halts lingering bot turns.
  4. Verify silence on a test thread: Send a message from a test buyer profile and confirm zero unapproved sends before editing rules.

4. Permanent Fix: Tag-Mutex Single-Entry Rule Registry

Without a visual flowchart builder, mutual exclusion relies on treating customer tags and ai_enabled as a Tag-Mutex Single-Entry Registry:

  • Enforce missing_tag and run_once locks via Tag Rules: Evaluate lifecycle events with missing_tag guards and run_once: true so first-touch greetings or source tags execute once per subscriber.
  • Separate static rule ownership from AI ownership: If a keyword rule sends a static price card or escalates to staff, pair send_message with add_tag(route:claimed) and toggle_ai(false)—or delete the keyword rule and let the AI Agent answer.
  • Validate in Evaluation Chat before going live: Test knowledge grounding and handoff prompts inside Evaluation Chat first, then test Scenarios with Active off and reopen Edit to confirm saved JSON persisted.
  • Wire mandatory follow-up auto-stop signals: Require auto-stop on customer reply, staff message, payment/purchase, status change, and opt-out, with multi-hour delays instead of zero minutes.

5. Recurrence-Prevention Rules

  • Single-owner event rule: Never run two active outbound rules on the same trigger without mutually exclusive tag or status predicates.
  • No static-plus-AI overlap: Either ground pricing in AI Knowledge or pause AI explicitly when a deterministic keyword rule owns the turn.
  • Mandatory reopen-and-read check: Reopen Edit after saving Scenario JSON to verify Trigger config, Conditions, and Actions persisted before enabling Active.
  • Unified inbox discipline: Handle escalations inside the unified inbox so handoff and ai_paused_until stay synchronized.
  • Pre-campaign registry audit: Review active Scenarios, Tag Rules, and Follow-ups before every promotion.

Quantitative Tradeoff Matrix: Option A vs Option B vs Option C

When teams hit duplicate-reply collisions, they typically debate three architectural paths. The matrix below compares the real operational, token, and failure costs across all three options.

Evaluation Axis Option A: Stack Unguarded Rules + Live AI Option B: Delete All Rules, Prompt-Only LLM Routing Option C: Tag-Mutex Single-Entry Rule Registry + Evaluation Gate
Core Routing Mechanism Multiple active new_subscriber, keyword, and follow-up rules run in parallel alongside live AI auto-reply with empty exclusion conditions. Zero Scenarios or Tag Rules; a single monolithic system prompt instructs the LLM to greet, quote, tag, and escalate on every turn. Deterministic Tag Rules (missing_tag, run_once) and Scenarios handle entry locking and escalation; AI Agent handles open-ended Q&A tested in Evaluation Chat.
Outbound Burst & Latency Profile High collision risk: 2 to 4 overlapping messages inside 10 seconds on first-contact keyword inquiries. 1 outbound reply per turn, but ~3 to 6 seconds LLM latency even for trivial static greetings or opt-out confirmations. Deterministic 1 outbound reply per turn (<1.5s for static rules; ~3 to 5s only when delegated to AI fallback).
AI Token & Plan Cost Profile Wastes ~4,000 tokens per redundant AI exchange on threads already answered by static rules; accelerates overages on Lite ($8/mo, 4M tokens) or Starter ($16/mo, 16M tokens). Every trivial "Hi" or "Thanks" burns full prompt + context tokens (~4,000 tokens/exchange), exhausting the 50,000-token Free trial in ~12 messages and inflating paid token burn. Reserves AI tokens strictly for nuanced buyer questions; cuts redundant LLM turns on rule-claimed intents to zero.
Maintainability Without Flow Builder Opaque: operators blame priority numbers when parallel rules silently collide in production logs. Brittle: editing one greeting or escalation rule inside a long prompt degrades recall across unrelated rules (context rot). Auditable: a 6-column Rule & Mutex Registry table maps every trigger, lock tag, and AI handoff boundary explicitly.
Exact Failure Cost When Choosing Wrong 4x duplicate burst spam, buyer blocks inside Meta 24h windows, conflicting price/greeting statements, and wasted token quota. Nondeterministic missed tags or failed human handoffs when prompt instructions are diluted, plus ~15% to 30% higher monthly token spend on low-value turns. Requires 20 to 30 minutes of upfront registry documentation and disciplined test-thread dry runs whenever adding new rules.

Before vs After Rule Engine Configuration Diff

The configuration diff below shows the exact JSON and policy changes required to convert a colliding four-reply setup into a deterministic single-entry pipeline.

Dark-mode two-column rule engine diff comparing parallel unguarded rules against an ordered Tag-Mutex Registry with AI pause checks and channel quota guards, linked to three quantitative operational callouts.
Before vs. After rule priority and tag-mutex configuration, paired with outbound burst reduction (4x to 1x), token savings, and TrolyPage's JSON-rule plus Evaluation Chat boundary.
Layer / Rule Before (4-Reply Burst Config) After (Tag-Mutex Single-Entry Config) Net Behavioral Change
Welcome Rule Trigger: new_subscriber; Priority: 10; Conditions: {}; Action: send_message only. Tag Rule + Scenario: Priority 100; Guard: missing_tag: route:welcomed + run_once: true; Action: greet once + add_tag(route:welcomed). Fires strictly once per contact; never collides with subsequent keyword turns.
Keyword Price Rule Trigger: keyword ("price", "how much"); Priority: 5; Conditions: {}; Action: send_message. Priority 80; Guard: ai_enabled: true + missing_tag: route:claimed (or retired in favor of AI knowledge grounding); Action: send quote + add_tag(route:claimed) + toggle_ai(false). Eliminates competing AI auto-reply on static-rule-owned price queries.
AI Auto-Reply Enabled globally without pre-live Evaluation Chat run; executes regardless of keyword rule sends. Evaluated via Evaluation Chat first; runs only when ai_enabled == true, no human handoff pause is active, and no static rule claimed the turn. Saves ~4,000 tokens per skipped collision and preserves natural Q&A.
Follow-Up Sequence delay_minutes: 0; no auto-stop checks on reply, staff message, or payment. Minimum +2h or +24h delay; mandatory auto-stop on customer reply, staff takeover, payment/purchase, status change, and opt-out. Zero immediate follow-up collisions; compliant with Meta 24h & Zalo windows.

Operational Asset: 6-Column Rule & Mutex Registry Matrix and Pre-Activation Checklist

Before activating any new Scenario, Tag Rule, or Follow-up template, log it into this six-column registry matrix. Keeping one shared table prevents two team members from attaching competing actions to the same inbound trigger.

Rule ID & Name Priority Trigger Event Mutex / Exclusion Guard Exclusive Action & Lock Tag AI & Follow-Up Side-Effect
R-01 First-Touch Welcome 100 new_subscriber missing_tag: route:welcomed, run_once: true Send greeting; attach route:welcomed Leaves ai_enabled: true if buyer has not asked a question yet
R-02 Human Handoff Keyword 90 keyword (match_mode: "exact" or vetted phrases) ai_enabled: true toggle_ai(false); assign staff; attach route:handoff Halts AI replies and cancels active follow-ups via staff takeover
R-03 Static Promo / Quote Card 80 keyword (campaign code) ai_enabled: true, missing_tag: route:claimed Send promo card; attach route:claimed Set toggle_ai(false) if static card is final, or omit R-03 and let AI answer
R-04 AI Agent Fallback 40 Inbound message (default policy) ai_enabled == true and ai_paused_until == null Generate grounded reply from KB + Instructions Tested in Evaluation Chat; defers immediately on human inbox reply
R-05 Idle Lead Follow-Up 10 Follow-up timer (+2h / +24h) No reply, no staff message, no payment, no opt-out Send single contextual nudge inside channel window Auto-stops immediately on any inbound message or conversion

Copy-Pasteable Scenario JSON Guard Pattern

When configuring a keyword handoff or static claim rule in Scenarios, keep the three JSON fields strictly separated so Trigger config, Conditions, and Actions never drift:

// Trigger config (JSON) — isolate exact test or production phrase
{
  "keywords": ["speak to human", "human agent"],
  "match_mode": "any"
}

// Conditions (JSON) — only fire when AI is currently active
{
  "ai_enabled": true
}

// Actions (JSON Array) — pause AI first, then attach lock tag and notify
[
  { "type": "toggle_ai", "config": { "enabled": false } },
  { "type": "add_tag", "config": { "tag_id": 104 } },
  { "type": "send_message", "config": { "text": "Connecting you with a specialist now." } }
]

5-Point Pre-Activation Overlap Checklist

  1. Persistence check: Save with Active unchecked, reopen Edit, and verify Trigger config, Conditions, and Actions retained every JSON key.
  2. Registry collision scan: Confirm no other active rule shares the same trigger event without a mutually exclusive missing_tag, status, or ai_enabled condition.
  3. Pre-live Evaluation Chat pass: Run 5 to 10 realistic buyer prompts inside TrolyPage’s Evaluation Chat to verify the AI Agent does not hallucinate static rule phrases or bypass handoff instructions.
  4. Controlled test-buyer dry run: Send both matching and non-matching messages from a test contact outside the workspace, confirming exactly one outbound reply fires.
  5. View logs verification: Inspect View logs and unified inbox timestamps after the test to confirm execution_count incremented by 1—not 2 or 4.

Candid Platform Boundaries, Knowledge Limits, and Plan Economics

Reliable operations depend on designing around actual product boundaries rather than assuming features that do not exist:

  • No visual flowchart builder & REST API in progress: TrolyPage does not offer a drag-and-drop conversational flow canvas, and its public developer REST API is still marked in progress. External integrations rely on Outbound/Inbound Webhooks, Zapier Webhooks, Google Sheets OAuth sync, Async CSV exports, and the MCP Gateway at trolypage.com/mcp (live inspection on 2026-12-02 shows 330 tools across the unified server, whereas trolypage.com/pricing still displays legacy 86-tool copy).
  • No OCR on scanned image-only PDFs & PII masking scope: When shifting static keyword rules into AI Knowledge, remember the PDF parser reads embedded text layers and has no OCR pipeline for scanned image-only PDFs—use text-layer PDFs, spreadsheets, or knowledge_web URLs. Data Safety PII masking filters future patterns on configurable rules but does not purge historical conversation records.
  • Plans, connection weights, and support hours: Per TrolyPage Pricing, Free is a one-time time-limited trial (50,000 tokens, 100 active customers, 3 connections, 10 no-link auto-posts), not a permanent free tier. Paid plans scale from Lite ($8/mo, 4M tokens) and Starter ($16/mo, 16M tokens) to Pro ($32/mo, 40M tokens) and Scale ($104/mo, 200M tokens), with 1 Page using publishing plus messaging consuming 2 connections, extra seats at $1/mo, and extra Pages at $2/mo. Automated rules and AI run 24/7, while live staff support operates during Vietnam business hours (UTC+7) and public documentation at docs.trolypage.com is currently in Vietnamese.

Comments

Your comment will appear after review.

Sign in to comment

No comments to show.