How Dialog Flows Work (Concepts)
Understand how Zervice combines open-ended Knowledge Base Q&A with deterministic visual Dialog Flows, smart deep-entry and field pre-filling, Bot Reply vs. AI Agent nodes, and the off-topic Resume Flow escape hatch.
Two Modes Working Seamlessly Together
Many businesses worry that adding structured workflows will make their chatbot feel rigid and robotic. Zervice solves this by unifying two modes in a single conversation runtime:
- Default Consulting Mode (Open Q&A): Every conversation starts ready to answer any open-ended question using your Hot Questions and Knowledge Base. Short follow-up questions (like "Does it include BYOC?" right after asking about hosting) automatically carry recent conversation context so answers stay accurate.
- Structured Dialog Flows (Guided Tasks): Whenever a visitor wants to complete a specific multi-step process—such as booking a demo, requesting a custom quote, troubleshooting an issue, or guiding a product tour—the chatbot seamlessly enters the matching Dialog Flow to guide them step by step.
When to Use Knowledge Base vs. Bot Reply vs. AI Agent
One of the most common mistakes when building Dialog Flows is trying to script every possible visitor question as rigid static replies. Instead, match each part of the conversation to the right tool:
| Layer or Node | How It Works | Best Used For | Example (Deployment & BYOC Questions) |
|---|---|---|---|
| Knowledge Base (No Flow) | Answers any free-form question directly from your indexed docs and pages with citations. | Standalone FAQs and deep product questions that do not require a multi-step process. | Visitor asks cold: "How does BYOC work?" or "What security controls do you support?" |
Bot Reply (BOT node) | Strictly deterministic—always sends your exact text, Saved Fields, and clickable Quick-Reply buttons. | Greetings, option menus, exact policy or pricing statements, form prompts, and confirmation messages. | "We support Hosted Cloud and BYOC. Which would you like to explore?" with buttons: Hosted Cloud, How BYOC Works, Talk to Sales. |
AI Agent (AGENT node) | Uses AI with your scoped instructions and your bot's Knowledge Base inside a specific flow step. | Open-ended questions, tailored explanations, or summaries inside a guided workflow. | Visitor enters the Deploy branch and asks "Can you support BYOC in our own cloud account?" — the Deployment Specialist agent answers directly from your KB. |
Rule of thumb: Use your Knowledge Base for open-ended reference knowledge, BOT nodes for predictable menus and exact wording, and AGENT nodes when a guided flow branch needs flexible, doc-grounded answers.
How Open AI Agent (AGENT) Steps Handle Follow-Ups & Exit Naturally
Unlike a static Bot Reply (BOT) step that sends one fixed message and moves on, an AI Agent (AGENT) step acts as an open conversational specialist:
- Stays Active for Follow-Up Questions: When a visitor reaches an
AGENTstep (such as a Product Specialist or Solutions Advisor), the conversation stays inside that specialist so the visitor can ask natural follow-up questions ("At what condition should I choose BYOC?", "What about security?") without losing context or restarting the flow. - Advances to Following Steps or Quits Cleanly: When the visitor indicates their question is answered (for example, "Makes sense, thank you!") or switches topics:
- If the
AGENTstep has a following step (such as a Bot Reply offering to book a walkthrough, or child User Input branches), the flow advances to that next step. - If the
AGENTstep is the last step in its branch, Zervice automatically quits the flow and hands the visitor's message back to the caller flow on the session stack (offering to resume any interrupted task) or to Default Consulting Mode, which has the full picture to respond naturally.
- If the
How a Dialog Flow Starts (Triggers, Smart Routing & Deep Entry)
Each Dialog Flow starts with a Flow Start (START) node where you define its name, description, and trigger phrases (for example, "book a demo", "schedule call", or "product tour").
- Exact Trigger Matching & Smart Description Routing: When a visitor types a message matching a flow’s trigger phrase—or asks a natural request that matches the flow's description and intent branches—Zervice automatically starts the Dialog Flow.
- Smart Deep-Entry & Automatic Field Pre-Filling: If a visitor provides extra details right in their opening message (for example, "I'd like to book a demo for [email protected]" or "Walk me through BYOC deployment"), Zervice can jump straight into the matching sub-branch and pre-fill any Saved Fields they already mentioned—skipping redundant questions automatically.
- Shared Workspace Library & Bot Assignment: Dialog Flows live in your shared Workspace Library and start unassigned until you connect them to one or more bots using Assign to Bots or the Flow Access Matrix.
- Lifecycle Stages (
Build,Publish,Archive): Only flows in the Publish stage trigger for live website visitors. Whenever you edit a node or branch, the flow automatically moves back to Build mode so you can test your changes safely in the Flow Test Runner before clicking Publish. - Multiple Flows & Reusable Subflows: You can assign multiple specialized Dialog Flows to the same bot (for example, Guided Product Tour, Book a Demo, and Verify Email), and one flow can even call another flow as a reusable subroutine and continue where it left off.
Saved Fields (Remembering Visitor Answers)
As a Dialog Flow asks questions (such as name, work email, team size, or preferred date), it stores each response in a Saved Field (a named variable like work_email or team_size).
Later steps in the same flow can:
- Insert values & fallback defaults into messages: Use curly braces like
{work_email}or{{bot.name}}to personalize messages, with optional fallback defaults such as{first_name | 'there'}when a field is not set yet. - Access nested external data: Read nested fields from external API responses using dot paths like
{api_result.data.status}or{api_result.items.0.id}. - Branch with multi-case Condition rules: Route visitors across TRUE, Else-If (
CASE 2–CASE 4), and ELSE branches using single or compound (AND/OR) rules. - Skip questions that are already answered: When Auto-skip prompt if already known is enabled on a
USERstep—or when a signed-in user's verified details (verified_user_email,verified_user_name,verified_user_role) are already provided—the flow skips asking again automatically.
The Off-Topic Escape Hatch ("↩ Resume Flow") & Flow Switching
Real visitors rarely follow a script from start to finish. Suppose a visitor is halfway through your Book a Demo flow and suddenly asks: "Wait—do you support BYOC?"
Instead of getting stuck or forcing you to draw fallback branches on every step, Zervice handles interruptions automatically:
- All already-collected Saved Fields stay safely preserved in the session.
- Zervice answers the visitor's side question immediately using your Knowledge Base (or switches to another matching flow while keeping the original flow on a call stack).
- Zervice displays a one-click "↩ Resume Flow" button—and if the visitor replies "Ok, thanks!" after their side question is answered, the assistant politely asks whether they would like to continue their unfinished flow (
Yes, Continue/No, Cancel). - Visitors can also type
exit flow,quit flow,stop flow, orreset flowat any time to cancel an active workflow cleanly.
Once a flow reaches its End step (or a final reply with no further branches, plus any optional Whole-Flow Epilogue wrap-up message), the chatbot smoothly returns to Default Consulting Mode, ready for any other questions.