Guides
Learn how to use Thoughtly's three data layers — in-agent variables, metadata, and contact attributes — to personalize every AI voice call. Step-by-step guide with real examples for insurance, mortgage, education, and home services teams.
Last updated
A generic script treats every caller like a stranger. For high-volume lead conversion teams in insurance, mortgage, home services, and education, that means lost context, repeated questions, and lower booking rates. Personalization fixes it — and in Thoughtly, the building blocks are variables, metadata, and contact attributes.
This guide walks through each data layer, shows you how to configure them in the Agent Builder and Automations, and ends with a working pattern you can adapt to your own pipeline. No invented features — everything here maps directly to current Thoughtly product mechanics.
Personalization in Thoughtly isn't a single toggle. It runs across three distinct data layers, each scoped to a different stage of the call lifecycle. Understanding which layer to use — and when — keeps your agent logic clean and your data reliable.
| Data Layer | Scope | Lifespan | Set From | Access Syntax |
|---|---|---|---|---|
| In-agent variables | Single node or full conversation | Current call only | Speak node extraction | Variable name directly |
| Metadata | Single call | Discarded after call ends | Automation steps (Call Phone Number, Call Contact) | {{metadata.VARIABLE_NAME}} |
| Attributes | Contact record | Persistent across all calls | Automations, API, manual update | {{metadata.system.contact.attributes.ATTRIBUTE_NAME}} |
Think of it this way: variables are what your agent learns during the conversation. Metadata is context you attach to a specific call before it starts. Attributes are persistent facts about the contact that survive across every call, inbound or outbound.
Variables live inside Speak nodes. They extract data from the caller's response in real time, before Outcomes evaluate — which means your branching logic always sees the freshest values.
Goal: Extract the specific home service the caller needs.
If multiple services mentioned: choose the most recent, highest-priority one.
If absent or unclear: return an empty value (no placeholder text).
Normalization: lowercase, trim spaces. Use canonical names: plumbing, hvac, electrical, roofing, general.
Do not invent values.Once extracted, this variableVariableA named value the voice agent stores during a conversation — caller name, intent, qualifying answers — and uses to drive routing and post-call actions. is immediately available in Outcomes. A rule-based Outcome can route emergency plumbing calls to a live dispatcher while scheduling non-urgent requests for the next available window.
Each time the agent visits a node that defines a variable, it retries extraction and overwrites the previous value if it finds a better one. This is useful for confirmation flows — ask the caller to repeat their email, and the variable updates to the confirmed version. Use Current speak node as the source for confirmation nodes to avoid pulling older, unverified mentions from the conversation history.
Metadata is a per-call context layer. It travels with the call and is discarded afterward. Use it when you want the agent to know something before the conversation starts — without permanently attaching it to the contact record.
{
"campaign": "summer_enrollment",
"lead_source": "facebook_form",
"intent": "schedule_tour",
"program_interest": "nursing"
}Inside any Speak node prompt, reference metadata with the {{metadata.VARIABLE_NAME}} syntax. For example:
The caller submitted a form expressing interest in {{metadata.program_interest}}.
Their lead source is {{metadata.lead_source}}.
If the lead source is "facebook_form", acknowledge that they filled out a form online
before asking qualification questions.Remember: metadata does not persist after the call. If you need a value to carry over to future calls, copy it into an Attribute in a post-call automation step.
Attributes live on the Thoughtly contact record and persist across every call. They are the right choice for data that should influence future interactions — preferred language, region, plan tier, consent timestamps, or lifetime value.
Use the Create or Update Contact step or the Add Attributes to Contact step in any automation. Example payload for a mortgage lead:
{
"region": "southeast",
"loan_type": "conventional",
"pre_approved": true,
"preferred_language": "spanish",
"last_called_at": "2026-06-10T14:30:00Z"
}Attributes use a longer reference path: {{metadata.system.contact.attributes.ATTRIBUTE_NAME}}. In a Speak node prompt:
This contact is in the {{metadata.system.contact.attributes.region}} region.
Their preferred language is {{metadata.system.contact.attributes.preferred_language}}.
If preferred_language is "spanish", greet the caller in Spanish and continue
the conversation in Spanish unless they switch to English.| Scenario | Use Metadata | Use Attributes |
|---|---|---|
| Campaign tracking for a single dial | Yes | No |
| A/B test variant for one call | Yes | No |
| Contact's preferred language | No | Yes |
| VIP status for routing | No | Yes |
| Lead source on first contact | Yes (pass to call) | Yes (store for future calls) |
| Consent timestamp | No | Yes |
| CRM deal stage for follow-up context | Yes (current value) | Yes (persistent) |
The real power of variables shows up when you combine extraction, metadata, and attributes inside prompts and outcome rules. Here is a practical pattern for an insurance lead qualification agent.
Imagine an inbound agent for an insurance brokerage. Before the call connects, an On Inbound Call automation looks up the contact and passes metadata. The agent's advanced prompt references all three data layers:
The caller is {{metadata.system.contact.attributes.first_name}} from
{{metadata.system.contact.attributes.region}}.
They previously expressed interest in {{metadata.intent}} coverage.
Greet them by name. If intent is "auto", ask about their current coverage and
whether they are comparing quotes. If intent is "home", ask about property type
and desired coverage amount. If intent is unknown, ask what type of insurance
they are looking for.After a Speak node extracts a variable, you can branch on its value with rule-based Outcomes. For example:
coverage_amount >= 500000 → route to a senior agent via Transfer nodezip_code matches your service area → continue qualificationemail is empty → loop back to re-ask (self-loop pattern)consent_to_record == false → end the call with a polite opt-out messageRule-based Outcomes evaluate from top to bottom, and the first match wins. Place your most specific rules above more general ones to avoid misrouting.
Mid-call Actions can reference extracted variables in their payloads. A webhook Action, for example, can include the caller's extracted zip code and service type in the request body so your backend can return real-time availability or pricing without a separate lookup.
Variables extracted during the call are available to post-call automations. An On Call Completed automation can write every captured field back to your CRMCRMThe system of record for leads, contacts, deals, and activity. Thoughtly reads from and writes to your CRM continuously. as structured data — no manual entry, no transcriptionSpeech-to-Text (STT)The system that turns the caller's speech into text the agent can reason over. errors.
This closed loop — extract during the call, write back after — is what makes AI-driven lead conversion measurably better than manual follow-up. Every call produces structured, accurate data regardless of which agent handles it.
Personalization should improve measurable outcomes, not just feel better. Track these metrics before and after implementing variable-driven personalization:
Use Thoughtly's Analytics dashboard to segment call outcomes by agent, campaign (via metadata), and contact attributes. Compare conversion rates between personalized and non-personalized cohorts to quantify the lift.
Yes. Once a variable is extracted at any node, it remains available for the rest of the call. Reference it by name in any subsequent Speak node prompt, Outcome rule, or Action payload.
The variable returns empty. Build a fallback into your Outcomes — either a self-loop that re-asks, a default branch that continues without the field, or a Transfer to a human if the data is critical.
Yes. Post-call automations triggered by On Call Completed have access to all variables extracted during the call. Map them into your Send SMS or Send Email step templates for consistent, personalized follow-up.
Use the Test Agent text chat in the Agent Builder. Send representative caller messages and check that variables extract correctly. Then use Call Me to verify the full voice experience. Keep a list of 10–15 common caller phrases per branch and run them after each edit.
Thoughtly does not impose a hard limit, but keep it practical. Each variable adds extraction overhead. Group related fields logically across nodes — ask for name and email in one node, service details in another — rather than extracting everything in a single Speak node.
Thoughtly Variables documentation — full reference for in-agent variable extraction, formats, and best practices.
Attributes vs. Metadata in Automations — detailed guide to the two data layers that carry context into and out of calls.
Thoughtly Agent Builder Overview — how nodes, outcomes, variables, and actions fit together.
Thoughtly Automations: Actions and Steps — reference for automation steps including Call Phone Number, Call Contact, and CRM integrations.
How to Use Thoughtly Workflows for Multi-Step Lead Qualification — related guide on building qualification flows with Speak nodes, Variables, and Outcomes.
How to Write Lead-Qualification Prompts Without Overfitting — companion guide for writing prompts that work well with variable-driven personalization.
How to Sync AI Conversations Back to HubSpot — step-by-step CRM writeback setup for HubSpot users.
Thoughtly — AI agents that convert the leads companies are already getting by calling, texting, and emailing until someone is ready to talk.