Skip to main content
Auto-Gather Variables are one of the most powerful features in Phonely. They let your agent collect, validate, and format information at the exact moment it’s needed, directly inside a block such as a Payment block, API Request block, Calendar block, Email block, or even Post-Call workflows. Instead of creating Talk blocks just to gather data, Auto-Gather Variables let you define the variable inside the block where it will be used. This keeps your flows cleaner, shorter, and more intelligent.

Why Auto-Gather Variables Are Useful

Traditionally, collecting a variable required a Talk Block:
  • Ask the caller a question.
  • Define the variable inside that Talk Block.
  • Validate and confirm it.
  • Use it later in your flow.
This works, but becomes complicated when:
  • You need many variables
  • You want to gather them only at specific points
  • Your flow changes over time
  • You want fewer blocks and cleaner logic
Auto-Gather Variables solve all of this by letting you define variables exactly where they’re needed, with built-in validation, formatting, confirmation, and re-use.

Creating an Auto-Gather Variable

You can create an Auto-Gather variable from inside any block that supports it.
For example: inside API Request, Payment, Calendar, Email, and more.

How to Create One

  1. Open any block (e.g., API Request or Payment).
  2. Look for the Auto-Gather Variables section.
  3. Click + to create a new variable.
image.png
  1. Fill in the required fields:
  • Variable Name: A short, descriptive name.
  • Variable Type: Choose from several built-in types.
  • Description: Clarify what Phonely should gather, e.g. “The amount the customer wants to donate.”
This helps the AI understand exactly what to capture.

4. Validation Options

Depending on the type, you may see:
  • Required – forces the agent to collect the value before continuing
  • Confirm – agent asks: “You said 34 dollars, correct?”
  • Spell Back – useful for names, emails, or IDs

Using Custom Types

Custom types let you define a format using natural language, for example:
“Format this as a raw number with two decimal places. If someone says $34, output 34.00.”
This ensures the agent outputs values exactly the way your system expects them, without extra logic or multiple retries. Great for:
  • Currency formatting
  • Standardized dates (ISO format)
  • Phone numbers
  • IDs
  • Special codes
Custom Auto Gather Variables Pn

Auto-Gather in Action (Example: Payment Block)

Imagine you want to collect the payment amount from a caller.

Instead of:

  1. Adding a Talk Block
  2. Asking for the amount
  3. Validating the format manually
  4. Passing it to the Payment block

You simply:

  1. Open Payment Block
  2. Click + Auto-Gather Variable
  3. Create a variable:
    • Name: amount
    • Type: Custom
    • Custom Type Definition: “Format this as a raw number with two decimal places (e.g., 34 → 34.00).”
    • Description: “Amount the customer wants to pay.”
    • Enable Required and Confirm
Custom Auto Gather Variables Pn Now your agent automatically:
  • Asks for the payment amount right before the block runs
  • Formats it correctly
  • Confirms the value
  • Passes it to the Payment processor
No extra blocks. No manual logic.

Smart Behavior: Automatic Confirmation

Auto-Gather Variables are intelligent: If Phonely already knows a piece of information, like the caller’s name—it will not ask again. Instead, it confirms: “I have your name as Sarah Johnson. Is that correct?” This prevents frustrating repetition and builds smoother user experiences.