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

# Outcome Parameters

> Extract structured data from conversations using custom schema definitions

## What are Outcomes?

Outcomes allow you to extract structured, formatted data from your AI agent conversations. Define a schema that specifies exactly what information to capture, and your agent will automatically extract and return that data in a consistent JSON format after each call, enabling seamless integration with your CRM, databases, and business systems.

<Info>
  **Key Features:**

  * **Structured Data Extraction** - Convert free-form conversations to JSON
  * **Custom Schemas** - Define any data structure you need
  * **Type Safety** - Support for strings, numbers, booleans, objects, and arrays
  * **Visual Builder** - Create schemas without writing code
  * **JSON Editor** - Advanced users can edit raw JSON Schema
  * **Real-time Validation** - Catch errors before saving
</Info>

## How It Works

The outcome system transforms unstructured conversations into structured data:

1. **Define Schema** - Specify what data to extract (name, email, intent, etc.)
2. **Configure Agent** - Add the schema to your agent's outcome settings
3. **Conduct Call** - Agent has a conversation with the user
4. **Extract Data** - AI analyzes the conversation against your schema
5. **Return Results** - Structured data sent via webhook or available in call history

## Supported Data Types

**Primitive Types**

* **String** - Text data, names, descriptions, notes
* **Number** - Quantities, amounts, ratings, scores
* **Boolean** - Yes/no questions, flags, binary decisions

**Complex Types**

* **String with Enum** - Predefined categories and classifications
* **Object** - Nested structures for grouped related data
* **Array** - Lists of items, collections, repeated data

## Common Use Cases

**Sales Call Qualification**

* Extract lead information and company details
* Capture budget ranges and purchase timelines
* Identify pain points and qualification status

**Appointment Scheduling**

* Gather patient/customer information
* Capture preferred dates and time slots
* Record appointment types and requirements

**Customer Feedback Collection**

* Collect satisfaction ratings and scores
* Identify positive and negative aspects
* Capture additional comments and follow-up preferences

**Order Processing**

* Extract customer and shipping information
* Capture ordered items with quantities and prices
* Record payment methods and order totals

## Getting Started

Choose your implementation path based on how you want to work with outcomes:

<CardGroup cols={2}>
  <Card title="Configure in Dashboard" href="/agents/single-prompt/configure-settings" icon="browser">
    Build outcome schemas using the visual builder or JSON editor. Perfect for defining data structures and testing extraction logic.
  </Card>

  <Card title="Access via API" href="/developers/guides/api-integration" icon="code">
    Retrieve outcome data programmatically from completed calls. Ideal for integrating extracted data with your systems.
  </Card>
</CardGroup>

## Learn More

<CardGroup cols={2}>
  <Card title="Webhooks" href="/overview/features/webhooks">
    Receive outcome data in real-time
  </Card>

  <Card title="Call History" href="/agents/call-history/introduction">
    View outcome results in the dashboard
  </Card>

  <Card title="Single Prompt Agents" href="/agents/single-prompt/configure-settings">
    Configure outcomes for Single Prompt Agents
  </Card>

  <Card title="Flow Agents" href="/agents/flow-agent/global-settings">
    Set up outcomes in Flow Agents
  </Card>
</CardGroup>
