> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.uponai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Extract Dynamic Variables

> Capture and store information from the conversation as dynamic variables for use later in the call.

## Overview

The Extract Dynamic Variables tool lets your agent capture specific pieces of information a caller provides — like their name, phone number, or appointment preference — and store them as variables that can be referenced throughout the rest of the call.

***

## Setup

<Steps>
  <Step title="Add the tool">
    In your agent's Functions section, select **Extract Dynamic Variable** from the dropdown.
  </Step>

  <Step title="Define each variable">
    For each variable you want to capture, provide:

    | Field          | Description                                                     |
    | -------------- | --------------------------------------------------------------- |
    | Reference name | The variable name used to reference it later (e.g. `user_name`) |
    | Description    | What this value represents                                      |
    | Data type      | One of: Text, Number, Enum, Boolean                             |
    | Enum options   | Required if type is Enum (e.g. `"Yes"`, `"No"`, `"Maybe"`)      |
  </Step>

  <Step title="Update your prompt">
    Tell the agent when to extract the information:

    ```txt theme={null}
    When the user states their name and phone number, extract the information by calling the extract_user_details function.
    ```
  </Step>
</Steps>

***

## Supported Data Types

| Type    | Example values               |
| ------- | ---------------------------- |
| Text    | `"John Smith"`, `"headache"` |
| Number  | `42`, `98.6`                 |
| Enum    | `"Yes"`, `"No"`, `"Maybe"`   |
| Boolean | `true`, `false`              |

***

## Using Extracted Variables

Once captured, reference variables anywhere in your conversation using `{{variable_name}}` syntax — in prompts, function parameters, SMS messages, and more.

Variables captured during the call also appear in the **Post-Call Analysis** panel, where you can review extracted data field by field.

<Frame>
  <img src="https://mintcdn.com/uponai/7QzWw_-VPReC-RSK/images/screenshots/image15.png?fit=max&auto=format&n=7QzWw_-VPReC-RSK&q=85&s=a06f8204f1d136fd4b8a829cd572ab11" alt="Post-Call Analysis panel showing default analysis fields and custom extracted variable fields like first_name, last_name, email_address" width="372" height="756" data-path="images/screenshots/image15.png" />
</Frame>
