Flowyte
Use CasesJanuary 22, 20267 min readFlowyte Support

AI Plumbing Dispatch Agent: Smart Routing & Lead Capture

Deep dive into building an intelligent plumbing dispatch agent that triages emergencies, captures leads, and routes calls automatically. Learn how to configure Query Processors, Knowledge Bases, and Conditional Routing.

What if your plumbing company could automatically triage emergency calls, capture leads from routine inquiries, and route callers to the right destination - all without a human dispatcher? That's exactly what we'll build in this deep dive.

In this tutorial, we break down an advanced industry-specific flow: an AI triage agent for a plumbing company. You'll see how the Query Processor handles conversation logic, how Knowledge Bases provide context, and how Conditional Routing creates intelligent call paths.

Tip

This entire flow was generated using AI Assist. While we'll examine each node in detail, you can build something similar in minutes by describing what you want in plain English.

What You'll Learn

By the end of this walkthrough, you'll understand how to:

  • Configure a Query Processor with custom system prompts for dispatcher personas
  • Attach Knowledge Bases with FAQ data, pricing, and emergency protocols
  • Set up Conditional Routing to split calls between emergencies and routine service
  • Use the Notification node for structured lead capture with required fields
  • Test your flow using the built-in Agent Tester

The Flow Architecture

This plumbing dispatch agent handles two primary scenarios:

  1. Emergency calls (burst pipes, gas smell, active flooding) - routed immediately to on-call technicians
  2. Routine service requests (leaky faucets, scheduled maintenance) - captured as leads with structured data

Let's examine each component.

The Query Processor: Your AI Brain

1

Understanding the Query Processor

The Query Processor is the brain of your flow. It handles all conversation logic, interprets caller intent, and generates natural responses.

In this plumbing demo, the Query Processor is configured with an extensive System Prompt that defines the agent's persona as "Riley," a helpful plumbing dispatcher. The prompt includes:

  • Greeting protocols and company branding
  • Questions to ask for qualifying the issue
  • Safety instructions for water emergencies
  • Escalation triggers for emergency situations

The best part? We didn't write a single line of this prompt manually. AI Assist generated the entire persona based on a simple description of what we wanted.

Info

For detailed configuration options, see the Query Processor documentation. You can customize temperature, token limits, and attach multiple knowledge sources.

Feeding Intelligence with Knowledge Bases

2

Attaching Knowledge Sources

To make the agent intelligent about your specific business, attach Knowledge Bases to your Query Processor. In this flow, we have two key sources:

Plumbing FAQ Node - Common questions and answers about services, scheduling, and pricing.

Knowledge Node - Custom business data including:

  • Business hours and service areas
  • Service pricing tiers
  • Emergency protocols and safety procedures
3

Defining Emergency Protocols

The Knowledge Base contains explicit instructions for handling critical situations. For example:

  • Burst pipe: Immediate priority, safety instructions for shutting off water
  • Gas smell: Urgent transfer, advise caller to leave the premises
  • Slow drip: Routine scheduling, lead capture path

This training ensures the AI responds accurately to specific scenarios without human intervention.

Warning

For plumbing and HVAC businesses, always include safety protocols in your Knowledge Base. The AI should know to advise callers on shutting off water supplies or evacuating during gas emergencies.

Conditional Routing: Smart Call Paths

4

Setting Up Conditional Routing

The Conditional Routing node is where the magic happens. It listens to the conversation context and splits the call path based on caller intent.

In this flow, we have two routes:

RouteTriggerDestination
EmergencyActive leak, burst pipe, flooding, gas smellTransfer to on-call technician
Routine ServiceLeaky faucet, maintenance, quote requestLead Capture node
5

Emergency Path Configuration

When the AI detects an emergency, the call follows the top path. In production, this would:

  • Immediately transfer to an on-call technician's cell phone
  • Route to a priority dispatch queue
  • Send SMS alerts to the service team

The AI also provides real-time safety guidance while the transfer initiates.

Lead Capture with the Notification Node

6

Structured Lead Capture

For non-emergency calls, the flow routes to a Notification node configured for lead capture. This node automatically extracts structured data from the conversation:

  • Customer Name (Required)
  • Phone Number (Required)
  • Issue Description (Required)
  • Preferred Callback Time (Optional)
  • Address (Optional)

The "Required" flag ensures the AI collects essential information before submitting the lead.

Tip

The Notification node can send leads to email, webhooks, or CRM integrations. Configure multiple destinations to ensure no lead falls through the cracks.

Testing with the Agent Tester

Let's see this logic in action. Here's an actual conversation from the Agent Tester:

AI Agent: Thank you for calling Reliable Plumbing Pros. This is Riley. Do you have a plumbing emergency, or how can I help you today?

Caller: I have a water leak.

AI Agent: What exactly is happening with the leak? For example, is there active flooding, or is it a slow drip? And where in your home is the leak located?

Caller: It is currently leaking in my kitchen.

AI Agent: I understand you have a leak in your kitchen. Have you been able to turn off the water supply? If not, I can walk you through it while we get a plumber dispatched.

Caller: I have turned it off, I do need a plumber though.

AI Agent: In a real deployment, I would now transfer you directly to our on-call emergency plumber who can dispatch a truck to your location immediately. For active water emergencies, our average response time is under 1 hour.

Notice how the AI:

  1. Asked qualifying questions to determine severity
  2. Provided safety guidance about shutting off water
  3. Correctly identified "active leak" as an emergency
  4. Initiated the emergency transfer protocol

Build Your Own Dispatch Agent

Create an intelligent phone agent for your plumbing, HVAC, or service business. Start with AI Assist and customize from there.

Start Building Free

Key Configuration Tips

Query Processor Best Practices

  • Be specific with personas: Give your agent a name and clear role (dispatcher, receptionist, service advisor)
  • Include escalation triggers: Define exactly what situations should escalate to humans
  • Add safety protocols: For service industries, include safety guidance in the system prompt

Knowledge Base Optimization

  • Structure your FAQ: Organize by topic (pricing, scheduling, emergencies)
  • Update regularly: Sync with your website or CRM for current pricing and availability
  • Include edge cases: Train the AI on unusual scenarios specific to your business

Conditional Routing Rules

  • Prioritize safety: Emergency paths should always take precedence
  • Use clear intent signals: Define specific keywords and phrases for each route
  • Test thoroughly: Use the Agent Tester to verify routing logic before going live

Extending This Flow

Once your basic dispatch agent is working, consider these enhancements:

  • Add appointment scheduling - Integrate with your calendar system
  • Enable SMS confirmations - Send booking details via text
  • Connect to your CRM - Automatically create service tickets
  • Add after-hours handling - Different routing for nights and weekends
  • Implement callback queues - For high-volume periods

Common Questions

Can I customize the emergency criteria? Yes. The Conditional Routing node lets you define custom rules based on keywords, intent signals, or extracted data. You control exactly what triggers each path.

How do I connect this to my actual phone system? Assign a phone number to the flow and calls are automatically handled. For transfers, configure the Transfer node with your technicians' phone numbers or queue destinations.

What happens if the AI isn't sure whether it's an emergency? Configure a fallback path that transfers to a human dispatcher for ambiguous cases. It's better to over-escalate than miss a real emergency.

Can I use this for HVAC or electrical services? Absolutely. The same architecture works for any service business. Just update the Knowledge Base with your specific services, pricing, and emergency protocols.

About the Author

Flowyte Support

Flowyte Support

Support Team

Helping businesses automate phone calls with AI. Questions? Reach us at support@flowyte.com.

Stay Updated

Get notified when we publish new tutorials and product updates.

No spam. Unsubscribe anytime.