Build smarter workflows with the AI Agent canvas.
A reference for product, ops, and design teams. Learn how Pre-chat, Escalation, and Process Tools workflows fit together — with industry examples.
The three workflow types
Every conversation in eGain AI Agent flows through these three categories. Pick the right one
based on where in the conversation you need to take control.
Before the AI takes over
Collect context, route by topic, and hand a clean userQuery to the AI Agent. Always ends with
Send to AI Agent.
When AI hits its limit
The AI couldn’t resolve it — capture context, set expectations, and hand off to a queue, agent,
or callback. Ends with Chat Transfer, Send Email, or Trigger Call.
Tools the AI can call
Reusable, deterministic flows the agent invokes mid-conversation. This is where the
API node lives — fetch a record, write a ticket, look something up.
All available nodes
The block sidebar groups nodes into Display, Input, Logic, Action, and Connector Actions. Filter by category to focus on one group.
Input
Logic
Action
Connector Actions
Read-only message from the bot. Supports {{var}}.
Two modes: Text (free-text into a variable) or Select (each option becomes its own outgoing edge).
Calendar input with format validation. Skip + Invalid handles.
Clock-style time input. Pairs well with Date for scheduling.
Numeric input. Works with the gt/lt/gte operators in Condition nodes.
Validated email input. Skip + Invalid handles included.
Phone-number input with format validation.
Branch on rule groups. Always has an implicit Else path. Each rule references a workflow variable via variableName.
/policies/{{id}}
Call any HTTP endpoint. Three required handles: Success, On Error, On Timeout. Map JSON fields to workflow variables via output_variables: [{ mapped_variable, response_path }].
Direct jump to another node. Useful for loops or shared “thanks” endings.
Pause the flow. Often used to space out bot messages so they feel less robotic.
Assign a static value, copy from another variable, or evaluate an expression.
Narrow KB retrieval by attribute or filter tag. Requires sendQueryOps:true downstream.
Pre-chat terminator. Hands the session over to the agent. Requires that userQuery has been set upstream (e.g. by a Question Text with isUserQuery: true) — otherwise publish-checks fail.
Routes the live conversation to a human queue. Escalation terminator.
Send an email mid-flow. Non-terminal — has a default handle that continues.
Initiate an outbound voice call from the workflow.
Workflow Examples
Three industries, with one example for each workflow type. None of these use KB filter tags or KB
attributes — they’re portable patterns you can drop into any workspace.
Note: All API calls (URLs, payloads, responses) shown across these workflows are dummy / placeholder values for representation purposes only — they’re meant to illustrate the workflow shape, not point to real endpoints.
Health
Pre-chat
MercyCare triage intake
What it does
Greets a returning member, captures name + email, asks them to pick a topic so the AI Agent
starts the chat with the right context, and hands off cleanly.
Build order
Start → Statement (welcome) → Question · Text (name) → Email → Question · Select (3 topics) → Question · Text “How can we help today?” with isUserQuery: true → Send to AI Agent.
Highlights
- All three options on the select question fan into the same userQuery node — standard “deflection” pattern.
- Use
skipIfPresent: trueon Name and Email so returning users aren’t re-asked. - Pre-chat must assign userQuery before Send to AI Agent — add a Question Text with
isUserQuery: trueandvariableKey: "userQuery", otherwise publish-checks will fail. - Forward captured variables in Send to AI Agent → variables so the agent sees them.
Escalation
MercyCare nurse handoff
What it does
Triggered when the AI couldn’t resolve a clinical question. Asks one question to route by
urgency, shows a 911 disclaimer for the emergency branch, then transfers to the right queue —
or schedules a callback for non-urgent.
Build order
Start → Statement → Question · Select (3 urgency tiers) → branch into 3 statements → Chat Transfer / Trigger Call.
Highlights
- Use three Question Select options instead of a Condition node when the user is choosing — it’s clearer than a one-deep condition.
- Each terminal action node (Chat Transfer / Trigger Call) needs an
escalationMessage. - Pass
chatHistoryin contextVariables so the human picks up where the AI left off.
Process Tools
Find next available appointment (API)
What it does
The AI agent calls this tool when a member asks “when’s my next appointment?” It captures the
specialty, hits the scheduling API, then either shows the next slot, offers a waitlist, or
falls back gracefully on error/timeout.
Build order
Start → Question · Text → API GET → Condition on slotCount → 2 outcome statements + 2 fallback statements.
Highlights
- The API node has three required output handles — Success, On Error, On Timeout. All three must be wired or publish fails.
- Use
output_variablesto map response paths (data.slots[0].time→nextSlot) into workflow variables. - The Condition reads the variable the API just wrote — operator
gtagainst0. - Process Tools are reusable: any AI Agent in the department can call this tool.
Expert Sample Use Cases
Patient Access Workflow
Patient Access
Drives a Patient Access agent through eligibility verification, PA requirements, pre-submit
validation, package submission, status monitoring with SLA tracking, denial & appeal, and
financial clearance — all from one screen, with AI assembling the patient record and
surfacing payer-specific KM articles.
Coverage & Cost Estimation
Health Payer
Live coverage check + cost estimation for a member call. Pulls plan benefits from Facets,
gates on coverage and network status, retrieves accumulators, queries UM for prior auth,
gates on PA-required disclosure, and synthesizes a member-friendly cost estimate.
Care Coordination Workflow
High Complexity
High-complexity case orchestration. Sequences a 4-appointment chain
(labs → imaging → surgical consult → same-day surgery block) with PA checks, special
services (interpreter / transport), patient confirmation gate with rollback, and
outgoing patient communications.
Banking
Pre-chat
Northpoint Bank intent capture
What it does
Two-fork pre-chat. Existing customers verify with the last 4 of their account; prospects skip
ahead. Both branches converge on the AI Agent with the right context flag.
Build order
Start → Statement → Question · Select (Yes/No) → 2 different paths → Question · Text “How can we help?” with isUserQuery: true → Send to AI Agent.
Highlights
- This is the canonical returning vs. new pattern. The variable (
wsIsCustomer) is visible inside the AI session. - Don’t put real account numbers into chat — capture only the last 4 as a reference, not for auth.
- Both branches converge on the same userQuery question — that satisfies the “pre-chat must assign userQuery” publish-check.
Escalation
Fraud-priority routing
What it does
Captures the issue type from a select, then a Condition node groups fraud and
lost_card as urgent while locked falls into the standard
queue. Each branch ends in a Chat Transfer (collapsed in the diagram for clarity).
Build order
Start → Statement → Question · Select → Condition (urgent vs else) → 2 statements → Chat Transfer.
Highlights
- The Condition’s first group has rule
wsBankIssue equals [fraud, lost_card]— note OR across values in a single rule. - Every Condition has an implicit
elsehandle. You must wire it or publish-checks fails. - Statements before the transfer set expectations — useful for SLA reasons.
Process Tools
Recent transactions lookup (API)
What it does
Customer asks “what’s my recent spending?” The agent calls this tool, which collects the
last-4 + range, hits the transactions API, then formats the result with a Set Variable
expression before showing it.
Build order
Start → 2 questions → API GET → Set Variable (expression on response) → Statement.
Highlights
- Set Variable + expression is how you reshape API responses without writing code outside the workflow.
- Pass query params via
{{var}}interpolation in the API node’surl. - Don’t include account numbers in any URL — the last 4 only as a reference token.
Expert Sample Use Cases
Fraud & ATO Response
High Risk
Drives fraud triage and account-takeover response: identity verification, account &
transaction pull, fraud classification, immediate containment, Reg E/Z routing, BSA silent
SAR protocol, provisional credit decisioning, and dispute filing.
Business banking triage
Front-door triage for the business banking line. The visitor picks the path that fits — opening a business checking account, applying for a commercial loan, or ‘something else’ — and gets a short routing message before the AI Agent takes over with the right context.
Open business checking
Pre-chat intake for opening a business checking account. Captures entity type and document readiness, surfaces the full BSA / CIP document checklist when anything is missing, then collects deposit size — flagging $25,000+ for the Member Business Services Officer’s mandatory secondary review.
Open commercial loan
Pre-chat intake for a commercial loan inquiry. Captures purpose, amount band, collateral, and years in business, then routes to the right approval authority — Senior Loan Officer, VP of Business Services, the Loan Committee, or the Board — with the SLA on each path so the visitor knows what turnaround to expect before the loan officer even reaches out.
Member fraud claim escalation
High Risk
Routing brain for an active fraud call. Captures the fraud type, whether the member authorized the payment (the scam-vs-unauthorized distinction), the dollar amount, and any high-risk flag. A single Condition node ranks all seven escalation triggers and either lifts the call to a Fraud Supervisor or hands off to a standard fraud-claim agent.
Fraud claim filing procedure
High Risk
Agent-side guided procedure for handling any fraud call from start to finish. Gates on identity verification, branches to the right security actions for the specific fraud type, then surfaces escalation triggers and approved closing language so notes and member expectations land exactly the way the procedure requires.
Insurance
Pre-chat
Delta Insurance line-of-business intake
What it does
Captures Line of Business as a select (so reporting can attribute by LOB), plus a free-text
“what brings you here?” that becomes the AI Agent’s userQuery.
Build order
Start → Statement → Question · Select (5 LOB options, all converging) → Question · Text with isUserQuery: true → Send to AI Agent.
Highlights
- Five-option converge → one downstream node: still readable, no Condition needed.
- Setting
isUserQuery: trueon the text question writes the answer into the systemuserQueryvariable — the AI Agent treats that as the opening message. - Don’t filter the KB on LOB here unless you’ve explicitly added a Query Filter — this example deliberately uses LOB as context only, not a KB filter.
Escalation
Claim escalation by severity
What it does
Asks for a numeric claim amount (validated by the Number node), then a Condition node with
three groups (high, mid, low/else) routes to the appropriate queue. The
high-severity branch also emails the senior adjuster team before the transfer.
Build order
Start → Statement → Number → Condition (3 groups) → Send Email + 3 × Chat Transfer.
Highlights
- Multi-group conditions: groups are evaluated top-down, first match wins. Order them most-specific-first.
- Send Email is non-terminal — it has a
defaulthandle that continues the workflow. Useful for “alert someone but keep going”. - Numeric operators (
gt,gte,lt) work on string-typed variables that contain numerics.
Process Tools
Policy lookup tool (API)
What it does
The agent invokes this when a customer asks “is my policy active?” One question collects the
policy number, the API node fetches the record, a Condition reads the returned status, and the
response goes back to the agent verbatim. Errors and timeouts each get their own friendly
message.
Build order
Start → Question · Text → API GET with three handles wired → Condition on wsPolicyStatus → 4 outcome statements.
Highlights
- The three API handles (Success / On Error / On Timeout) must all be wired — even a simple Statement is enough on the failure paths.
- Use
output_variableswithresponse_pathlikedata.statusto map JSON fields into workflow vars. - Statements support
{{varName}}templating, so the inactive branch can echo back the actual status without a separate Set Variable. - This is a true Process Tool — give it a clear description so the agent knows when to invoke it.
Expert Sample Use Cases
Pre-Form Filtering Flow
Pre-chat · Routing
Routes the customer by line of business at the very start of the chat. Home / Auto / Life
each ask a follow-up qualifier (Product / State / System) before capturing the user
question and handing off to the AI Agent. Commercial and Health fall into a generic
statement branch (no AI handoff yet).
Escalation Flow
Escalation · Routing
One escalation flow handles three triggers: a thumbs-down on an AI answer, a direct
“speak to a human” request (with a 2-run reconfirm limit), and a knowledge-gap escalation
from upstream. An Hours of Operation API call gates routing to Email
(after-hours) or to a live channel — Message or Call — during business hours.
