Guides
Learn how to use Thoughtly Outcomes, Variables, Actions, Transfer nodes, and testing workflows to build complex AI call flows that route leads correctly.
Last updated
Linear call scripts break the first time a real lead acts like a real person. They ask a pricing question before qualification. They say they are busy but still interested. They want a text instead of a call. They qualify for one branch in your CRMCRMA CRM is the system used to manage leads, contacts, accounts, opportunities, activity, ownership, and follow-up. and another branch based on what they just said.
Thoughtly handles those situations with explicit call flows: Nodes structure the conversation, Outcomes decide the next path, Variables capture facts, Actions bring in outside data, and Transfer or End nodes close the loop. This guide shows how to design complex call flows without turning the agent into one giant prompt that nobody wants to maintain.
Use this playbook for high-volume inbound lead conversionInbound lead conversionInbound lead conversion turns opted-in calls, form submissions, quote requests, and other inquiries into qualified conversations, appointments, or transfers. teams in insurance, mortgage, education enrollment, healthcare, home services, real estate, automotive, financial services, legal, and similar consumer funnels where the next best action depends on intent, eligibilityEligibilityEligibility is the set of conditions that determines whether a prospect can move to a service, quote, appointment, application, or specialist., urgency, service areaService areaA service area is the geography in which a business can provide a particular service, product, appointment, or licensed activity., consent, and availability.
Start with the business decision, not the script. A complex call flow should answer one question at every branch: what should happen next for this lead? The wording can vary. The next best action should not.
For example, a mortgage lead who says “I’m shopping rates this week” may need a licensed loan officer transfer. A home services lead who says “I need someone today” may need urgent routing. An education inquiry who says “text me the program list” may need SMS follow-upSMS follow-upSMS follow-up uses compliant two-way text messages to continue a conversation after an inquiry, call, voicemail, or prior interaction. and a later callback. Different phrases, different branches, different operational outcomes.
| Caller signal | Best Thoughtly routing pattern | Example next node |
|---|---|---|
| High intent plus available now | Prompt-based outcome or rule on a captured intent variable | Transfer to a rep or book an appointment |
| Eligible but not ready | Prompt-based outcome for interest level plus callback variable | Nurture, SMS follow-up, or scheduled callback |
| Missing required field | Rule-based outcome on a variable such as service area or eligibility | Clarify the missing field |
| Needs external record lookup | Action followed by rule-based outcomes on lookup result | Enriched path or collect more details |
| Opt-out or do-not-contact request | Rule-based safety branch where possible | End cleanly and suppress follow-up |
Keep this map short enough for an operator to understand. If you need 30 tiny branches, the problem is usually not the Agent Builder. It is an unclear sales process wearing a headset.
Thoughtly agents use four node types in the Agent Builder: Start, Speak, Transfer, and End. Use those deliberately. The Start node is for the opener the caller hears first, and the docs note that the Start message is spoken exactly as written. Keep it tight, especially when it includes identity or consent language.
Use Speak nodes for the actual conversation. Choose Speak → Message when the agent should say a fixed line, such as a short confirmation or required disclosure. Choose Speak → Prompt when the agent must compose an adaptive response using caller context, CRM fields, integration outputs, or prior answers.
Create Transfer nodes for human handoffs and End nodes for clean endings. Do not leave loose branches that rely on the agent to “figure it out.” Complex flows become reliable when every major path has a clear next node.
Outcomes are the routing layer after a caller response. Thoughtly supports two outcome types: prompt-based outcomes, where AI interprets the caller’s intent, and rule-based outcomes, where deterministic conditions decide the path.
Use prompt-based outcomes when the caller’s wording is open-ended. Good labels are concrete and distinct: “Wants appointment now,” “Interested but busy,” “Asks pricing question,” and “Not interested.” Avoid fuzzy pairs like “positive” and “very positive.” If a human cannot tell the difference quickly, the branch is probably mush.
Use rule-based outcomes when the branch depends on structured data, an integration result, or a compliance-sensitive condition. The docs are clear that rule-based outcomes are evaluated top to bottom and the first matching rule wins. Put the most specific or highest-risk rule first, and always add a final Else or default outcome so the agent does not get stuck.
One important design constraint: a node can use either prompt-based or rule-based outcomes, not both. If a flow needs natural-language classification and deterministic validation, split it into two nodes. Classify intent in one node, capture or validate fields in the next.
Variables let the agent capture structured caller data and reuse it across the call. Thoughtly extracts variables immediately after the caller’s latest reply and before outcome evaluation, which means outcomes can branch on fresh values right away.
For lead conversion flows, use consumer-fit signals instead of generic sales-framework fields. Useful variables include intent_need, urgency, service_area, eligibility_status, consent_status, availability_window, and preferred_next_step.
Use Current speak node as the variableVariableA variable is a named value captured, calculated, or retrieved during a conversation and reused in logic, messages, actions, or integrations. source when you asked a precise question and only want the latest answer. Use Conversation history when the caller may have already given the answer earlier. In extraction instructions, state the goal, what to do if multiple candidates appear, how to normalize the value, and that the agent should not invent values.
A practical example: in an insurance quote flow, capture service state, coverage type, urgency, and permission to continue. Then use rule-based outcomes to route in-service leads to qualification, out-of-service leads to a polite ending, and unclear answers to a clarification loop.
Some branches cannot be decided from the conversation alone. The agent may need to look up a CRM record, check appointment availability, validate an email, triggerTriggerA trigger is an event or condition that starts, resumes, changes, or stops an automated workflow. a webhookWebhookA webhook sends event data from one system to another through an HTTP request when a defined event occurs., or create a follow-up task. Add Actions to a Speak node when the flow needs that outside data during the call.
Thoughtly’s Actions docs describe the timing change clearly: with Actions, the agent speaks, the action runs, variables update from action results, and outcomes evaluate. Because the caller does not speak before those outcomes fire, use rule-based outcomes that check action results such as lookup found, booking confirmed, or validation failed.
Keep action payloads lean. Send only the fields required for the decision, add a short expectation-setting line like “One moment while I check that,” and build error branches. A failed CRM lookup should not end a high-intent call. It should collect the missing detail, retry once where appropriate, or transfer to a human.
Loops are useful for answering follow-up questions or re-asking for a required field, but they need exits. Thoughtly supports connecting an outcome back to the same node for a Q&A loop or clarification pattern. Use that carefully.
A good loop has a narrow purpose: answer questions about the appointment, clarify the email address, confirm service area, or collect a callback time. It also has a fallbackFallbackA fallback is a safe alternate path used when input is unexpected, a tool fails, or the agent cannot complete the intended step confidently.: after one or two unclear attempts, route to a human, send a follow-up channel, or close the call with a useful next step.
For opt-outs, complaints, sensitive eligibility decisions, or legal/medical/financial thresholds, avoid loose AI interpretation. Use deterministic branches where possible and route conservative cases to a human or a safe ending.
When a lead is human-worthy, use a Transfer node. Thoughtly supports Phone Router transfers to a specific phone number and Agent Transfer to another agent in the same account. Phone Router transfers can include a pre-transfer message, and phone numbers are validated in real time when static values are used.
For complex flows, use early summaries on Transfer or End nodes when another system or person needs context immediately. The handoff should explain why the caller is being transferred, what was captured, and what the receiving team should do next.
End nodes matter too. Create distinct endings for booked appointment, nurture, out-of-service, opt-outOpt-outAn opt-out is a person’s request to stop receiving a particular category of calls, texts, emails, or other communications., no-match, and unresolved error paths. A graceful ending is not decoration. It is how you prevent half-finished calls from turning into messy CRM notes.
Use Test Agent first. It is the fastest way to validate outcome paths, variable extraction, and action outputs without placing a real call. Test happy paths and awkward paths: rushed callers, partial answers, pricing questions, wrong service areas, unclear consent, callback requests, and direct human requests.
Then use Call Me for the live voice experience. Listen for timing, interruptions, mispronunciations, transfer behavior, and whether the agent feels natural when the branch changes. If the agent cuts people off or waits too long, tune Presence settings such as sensitivity, silence timeout, silence retries, and utterance end.
Keep a regression list of 10 to 15 caller phrases per branch. Run it after any change to outcomes, variables, actions, or transfer logic. Complex flows stay healthy when testing becomes part of the operating rhythm, not a one-time launch chore.
A complex call flow is working when it routes more leads correctly with less human cleanup. Track both conversion outcomes and flow health.
Use Thoughtly Analytics and your CRM reporting together. Thoughtly shows conversation quality, outcomes, and call-level records; the CRM shows whether those routed leads become pipeline, policies, appointments, enrollments, applications, or jobs.
Use as many as the business process requires, but keep the top-level map simple. Most lead-conversion flows need a happy pathHappy pathThe happy path is the ideal route where expected inputs are available and the conversation reaches its intended outcome without detours., a clarification path, a nurture or callback path, a human transfer path, an opt-out path, and an error fallback. Add more only when reporting shows a real routing need.
Use prompt-based outcomes to classify open-ended intent, then use variables and rule-based outcomes for structured qualification facts. For example, AI can classify that a caller wants an appointment, while rules can check service area, eligibility, consent, or appointment availability.
Yes. Add the Action to a Speak node, map the required variables, and use rule-based outcomes on the action result. If the lookup succeeds, continue the enriched path. If it fails, collect more detail, retry within a capped loop, or transfer to a human.
Rule-based nodes should always have an Else or default path. Prompt-based nodes should use distinct labels and a fallback path for unclear answers. The fallback should either clarify, transfer, send a follow-up channel, or end gracefully.
Split mixed logic into multiple nodes, name outcomes by next action, keep variables explicit, avoid redundant actions, and keep a regression test list. If an operator cannot explain the flow from the canvas, the caller will probably feel the same confusion.