Skip to main content
In this guide, we’ll introduce you to Phonely’s powerful variable system that serves as the backbone for capturing, storing, and reusing information throughout your call workflows. Variables are the backbone of your agents. They capture data during a call, pass it between blocks, and export it after the call for follow-ups and analytics. This page extracts key concepts from the video and includes a complete, paste-ready catalog of live and post-call variables.
If a block didn’t run, its variable appears blank in post-call context. That’s intentional so you can safely reference variables without breaking integrations.

Key Concepts

What variables are Structured data (caller phone, name, intent, outcomes, etc.) that your agent reads/writes at runtime and exposes after the call. Where they live Live-call variables exist while the conversation is running and power real-time logic (branching, transfers, API requests, messages). Post-call variables are the finalized record (transcript, summary, sentiment, outcomes, links) used in emails, webhooks, CRMs, or BI. How they’re created Prebuilt/telephony: injected automatically (numbers, timestamps, caller geo, caller ID). Custom: you define once (e.g., an API key) and reuse anywhere. Auto-gather: the agent asks for a value at the moment a block needs it (e.g., ask for name inside an API Request block). Referencing variables Type @ in any field to insert an available variable. You can also reference knowledge base docs via the same menu. Live vs. post-call actions
  • Live actions happen during the call (API request, SMS, email, transfer, booking).
  • Post-call actions run only if the call ends at/after a specific node, useful for sending a recap email with recording, logging outcomes, or notifying a team.

Variable Types & Capture Methods

Prebuilt (Telephony/System)

Injected automatically when the call connects (numbers, timestamps, basic geo, caller ID).

Custom

Define a key/value once (for example, api_key) and reuse across blocks and flows.

Auto-gather

Prompt the caller at the moment a block needs a value (name, email, date, etc.) no extra Talk block required.
In an API Request block, add a query/body field → choose “Auto-gather” → set type (Text, Email, Phone, Date, Time) and “Required.” At runtime, the agent asks, then proceeds with the request.

Type Safety, and Backward Compatibility

Phonely now maintains an explicit type for variables to improve reliability in API requests, code blocks, and post-call automation while remaining fully backward compatible with existing workflows. Variable Types at a Glance Variables can now carry an explicit type, such as: text, number, boolean, date, time, email, list(text), json, array,enum etc.When hovering over a variable in the builder, its type is displayed to help you understand how it will be handled at runtime. Backward Compatibility Existing variables are not affected. Any variables that were already added to blocks before this update continue to behave as strings. Only newly added variables will automatically carry and preserve a type in the backend. This ensures older flows continue working exactly as before. Typed vs. Untyped Variables
  • Untyped variables: Legacy variables (or plain string variables) do not display a type and are treated as strings.
  • Typed variables: New variables, especially those created via AI extraction, Auto-gather, API Request blocks, or Code blocks, retain their type.
Type And Untyped Variables

Type Conversion Rules

Phonely performs type conversion only when the variable is the sole content of a field. Conversion occurs when: The variable has a non-string type (for example, array or boolean), it is passed through to the backend as-is.
{{response_object}}
Conversion does NOT occur when: There is some additional text around the type variable. In this case, the entire field is treated as a string, even if the variable itself has a type.
{{response_object}} some additional text

Full Variable Catalog

Caller & Agent Context

VariableTypeWhen Set / SourceNotes
Business Phone NumberphoneTelephony (incoming)The phone number of the agent receiving or making the call
Customer Phone NumberphoneTelephony (incoming)The phone number of the customer/caller
Agent IDstringPlatformUnique identifier for the AI agent handling the call
Agent NamestringPlatformDisplay name of the AI agent
ProviderstringTelephonyThe voice provider used for the call
Workflow IDstringPlatformInternal identifier for the active flow
Workflow NamestringPlatformDisplay name of the active flow

Telephony/System Timestamps & IDs

VariableTypeWhen Set / SourceNotes
Call StarteddatetimeTelephonyTimestamp when the call started
Call EndeddatetimeTelephonyTimestamp when the call ended
Call DatedateTelephonyDate of the call
Call DurationnumberTelephonyTotal duration of the call in seconds
Call IDstringTelephony/PlatformUnique identifier for the call in Firestore
Call TimedatetimeTelephonyAlternative timestamp for when the call started
Caller IDstringTelephony (if avail)Not always present
Caller CitystringTelephony (inferred)Area-code inferred; approximate
Caller ZipstringTelephony (inferred)Area-code inferred; approximate
VariableTypeWhen Set / SourceNotes
TranscriptjsonPost-call pipelineArray/list of messages containing the full conversation transcript
Transcript TexttextPost-call pipelinePlain text version of the transcript
Recording URLurlTelephony/StorageURL to access the call recording
Dashboard URLurlPlatformURL to view the call details in the dashboard

AI Summaries & Classifications

VariableTypeWhen Set / SourceNotes
SummarytextPost-call AIBrief summary of the call conversation
Long SummarytextPost-call AIExtended/detailed summary of the call conversation
AI SuccessbooleanPost-call AIIndicates whether the AI successfully handled the call
SentimentenumPost-call AIDetected sentiment/tone of the conversation
TopictextPost-call AIMain topic(s) discussed during the call
PurposetextPost-call AIThe purpose or reason for the call
Key Pointslist(text)Post-call AIImportant points or highlights extracted from the conversation

Auto-Extracted Entities

VariableTypeWhen Set / SourceNotes
Mentioned Datelist(date)Post-call AIAny date mentioned during the call
Mentioned Timelist(time)Post-call AIAny time mentioned during the call
Mentioned Emaillist(email)Post-call AIAny email address mentioned during the call
Caller Namelist(text)Post-call AIName of the person calling (if captured)

Follow-Up Signals & Actionables

VariableTypeWhen Set / SourceNotes
Unanswered Questionslist(text)Post-call AIQuestions that were asked but not answered during the call
Follow UpbooleanPost-call AIWhether a follow-up is required
Follow Up ReasontextPost-call AIReason why a follow-up is needed
Action Itemslist(text)Post-call AIList of action items identified from the call

Outcomes & Endings

VariableTypeWhen Set / SourceNotes
Call OutcometextFlow / Post-call AIOverall outcome or result of the call
Ended ReasonenumTelephony/PlatformReason why the call ended
Last BlocktextPlatformThe last workflow block executed during the call
Call DirectionenumTelephonyDirection of the call (inbound/outbound)
Action Listlist(text)PlatformList of actions performed during the call
Workflow TriggeredbooleanPlatformWhether a workflow was triggered during the call
Call TransferredbooleanTelephony/PlatformWhether the call was transferred to another party
Stored VariablesjsonPlatformVariables stored during the call execution

System & Version Metadata

Variables that describe the execution environment, flow versioning, and infrastructure details. Useful for debugging, analytics, release tracking, and conditional routing.
VariableTypeWhen Set / SourceNotes
Flow VersiontextSystemVersion of the workflow executed during the call (useful when comparing behavior across versions)
Backend VersiontextSystemBackend build/version running the calls.
Voice Infra VersiontextSystemIndicates voice infrastructure version (useful for voice quality debugging or migration validation)
EnvironmenttextSystemShows where the call is running: production · staging · development. Used for routing behavior by stage or preventing test flows from triggering live actions

Ended Call Reason - Allowed Values

  • customer_hung_up
  • ai_hung_up
  • transferred
  • silence_timeout
  • voicemail_detected (outbound)
  • greeting_hangup

A/B Testing Fields

VariableTypeWhen Set / SourceNotes
AB Test IDstringExperiment runnerUnique identifier for the A/B test (if applicable)
AB Test NamestringExperiment runnerName of the A/B test (if applicable)
AB Test TypestringExperiment runnerType of A/B test variant (‘A’ or ‘B’, if applicable)

Working with Variables in the Builder

See What’s Available

In any block field, type @ to insert existing variables. You can also reference knowledge base docs with the same menu. Variables Window

Create Custom Variables

Open the Variables modal and add keys you’ll reuse (for example, api_key, org_id). This keeps requests consistent across flows.

Reorder Variables

You can reorder variables directly within the Variables panel to better match your workflow logic or preferred reading order. Drag and drop variables using the handle on the left side of each variable row to rearrange them. Reordering does not affect runtime behavior or data capture, it only changes how variables are displayed in the builder and selection menus. This is especially useful for keeping frequently used or related variables grouped together. Reorder Variables

Use Auto-Gather Where It Matters

For example, inside an API Request block, you can set a parameter’s source to “Auto-gather,” choose a type (Text, Email, Phone, Date, Time), and mark it required. The agent will ask at runtime and then proceed. Learn more about auto-gather variables here.

Separate Live vs Post-Call

Attach a Post-Call node off the block you care about. Anything wired here runs only if the conversation ends there or later (for example, send recap email with dashboard_url and recording_url).
AI can infer an outcome, but explicit tagging on key branches produces cleaner dashboards and more reliable automation triggers.
If you rely on a variable that might be blank (because a block didn’t run), add a fallback in your copy or condition. Example: “We couldn’t capture your email; reply here and we’ll add it.”