Skip to main content

Overview

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.

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 (New)

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. Referencing Variables Pn

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.

Use Auto-Gather Where It Matters

Inside an API Request block, 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.”

Practical Pattern: Auto-Gather Inside an API Request

Scenario

You’re booking an appointment and need the caller’s first name.

Setup

In the API block, add a body field first_name → choose Auto-gather → Type Text → mark Required.

Result

At runtime, the agent asks: “What’s your first name?” and then proceeds to book without requiring an extra Talk block.

Summary

  • Prebuilt variables arrive from telephony (numbers, timestamps, caller geo).
  • Custom variables keep configuration consistent across blocks.
  • Auto-gather captures inputs exactly where you need them.
  • Post-call variables give you the complete record: transcript, links, AI summaries, entities, outcomes, and reasons.
  • Tag outcomes in-flow for clean reporting, and always guard for blanks.