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

# Output Settings

> Configure what data your agent extracts from each call

## What are Output Settings?

Output Settings define what information your agent should extract and capture from each conversation. This data is then available via webhooks or API for use in your CRM, analytics, or other systems.

<Info>
  Well-configured output settings turn every call into structured, actionable data.
</Info>

## AI Copilot Smart Suggestions

The AI Copilot provides intelligent assistance for configuring output settings with advanced change management capabilities. It analyzes your agent's purpose and conversation goals to recommend optimal data extraction fields.

### How AI Suggestions Work

<Steps>
  <Step title="Analyze Agent Context">
    The AI examines your agent's role, system prompt, and knowledge base to understand its purpose.
  </Step>

  <Step title="Generate Smart Suggestions">
    Based on the analysis, it suggests relevant output parameters and enrichment settings tailored to your use case.
  </Step>

  <Step title="Review Granular Changes">
    You can review, modify, or selectively accept/reject individual parameter suggestions with one click.
  </Step>

  <Step title="Apply Changes">
    Accept all suggestions at once or choose specific ones that fit your needs.
  </Step>
</Steps>

<Info>
  AI suggestions adapt to different agent types - sales agents get lead qualification fields, support agents get issue tracking fields, and scheduling agents get appointment-related outputs.
</Info>

### Example AI Suggestions by Agent Type

| Agent Type        | Suggested Parameters                                                         | Description                            |
| ----------------- | ---------------------------------------------------------------------------- | -------------------------------------- |
| **Sales Agent**   | `lead_score`, `budget_range`, `decision_timeline`, `pain_points`             | Qualify leads and track sales progress |
| **Support Agent** | `issue_type`, `resolution_status`, `satisfaction_score`, `follow_up_needed`  | Track support tickets and outcomes     |
| **Booking Agent** | `appointment_date`, `service_type`, `confirmation_sent`, `preferred_time`    | Manage appointment scheduling          |
| **Survey Agent**  | `survey_responses`, `feedback_rating`, `follow_up_needed`, `completion_rate` | Collect structured feedback            |

## Copilot Change Management

The AI Copilot features an advanced change management system that allows you to review and control all modifications before they're applied.

### Pending Changes System

<Info>
  When the Copilot suggests changes to your output parameters or enrichment settings, you'll see a pending changes banner that lets you review each modification individually.
</Info>

### Managing Pending Changes

<Tabs>
  <Tab title="Review Changes">
    Each pending change shows:

    * **Operation Type**: Add, Remove, or Modify
    * **Parameter Name**: The field being changed
    * **Data Type**: String, number, or boolean
    * **Description**: What the parameter extracts
  </Tab>

  <Tab title="Granular Control">
    You can:

    * Accept all changes at once
    * Reject all changes
    * Accept/reject individual parameters
    * Modify suggestions before accepting
  </Tab>

  <Tab title="Change Types">
    The system tracks:

    * **Add**: New parameter suggestions
    * **Remove**: Parameters to be deleted
    * **Modify**: Changes to existing parameters
  </Tab>
</Tabs>

### Change Operation Labels

| Operation  | Color | Description                      |
| ---------- | ----- | -------------------------------- |
| **Add**    | Green | New parameter to be created      |
| **Remove** | Red   | Existing parameter to be deleted |
| **Modify** | Blue  | Changes to existing parameter    |

<Warning>
  Review all pending changes carefully before accepting. Once applied, changes will update your agent's output configuration immediately.
</Warning>

## Output Parameters with Templates

Output Parameters are custom fields that your agent extracts from the conversation, now with enhanced template support.

### Parameter Templates System

The new template system provides quick access to common parameter configurations:

<Steps>
  <Step title="Access Templates">
    Click the "Templates" button in Output Settings to see available parameter templates.
  </Step>

  <Step title="Browse Categories">
    Templates are organized by common use cases like customer information, lead qualification, and UTM tracking.
  </Step>

  <Step title="Add Templates">
    Click "Add" next to any template to include it in your output parameters.
  </Step>

  <Step title="Customize After Adding">
    Modify template parameters after adding them to match your specific needs.
  </Step>
</Steps>

### Available Parameter Templates

<Tabs>
  <Tab title="Customer Information">
    * `firstname`, `lastname` - Customer name fields
    * `email`, `phone` - Contact information
    * `company`, `position` - Business details
    * `address`, `city`, `state`, `zip` - Location data
  </Tab>

  <Tab title="Lead Qualification">
    * `lead_score` (number) - Qualification score 1-10
    * `lead_status` (string) - New, Qualified, Disqualified
    * `budget` (number) - Mentioned budget amount
    * `decision_maker` (boolean) - Is decision maker
    * `pain_points` (string) - Customer challenges
  </Tab>

  <Tab title="UTM Tracking">
    * `utm_source`, `utm_medium` - Traffic source tracking
    * `utm_campaign`, `utm_content` - Campaign tracking
    * `utm_term` - Keyword tracking
  </Tab>
</Tabs>

### Creating Custom Parameters

<Steps>
  <Step title="Add Parameter">
    Click "Add Parameter" to create a new custom field.
  </Step>

  <Step title="Configure Properties">
    Set name, type, and description for accurate extraction.
  </Step>

  <Step title="Use AI Assistance">
    Let the Copilot suggest optimal parameters based on your agent's purpose.
  </Step>

  <Step title="Test Extraction">
    Use the Playground to verify the parameter extracts correctly.
  </Step>
</Steps>

### Parameter Properties

| Property    | Description                  | Example                                 |
| ----------- | ---------------------------- | --------------------------------------- |
| Name        | Field identifier (no spaces) | `customer_interest`                     |
| Type        | Data type                    | string, number, boolean                 |
| Description | Clear extraction instruction | "Product the customer is interested in" |

## Advanced Text Mode with Syntax Highlighting

The enhanced text mode now includes full syntax highlighting and error detection for JSON editing.

### Text Mode Features

<Info>
  Text Mode now provides a rich editing experience with syntax highlighting, bracket matching, and real-time error detection for JSON parameter configuration.
</Info>

### Using Text Mode

<Steps>
  <Step title="Switch to Text Mode">
    Toggle the "Text" switch to enter advanced JSON editing mode.
  </Step>

  <Step title="Edit with Syntax Highlighting">
    Benefit from color-coded JSON syntax and automatic formatting.
  </Step>

  <Step title="Real-time Error Detection">
    See validation errors immediately as you type.
  </Step>

  <Step title="Auto-format">
    JSON is automatically formatted for readability.
  </Step>
</Steps>

### Example JSON Configuration

```json theme={null}
[
  {
    "name": "customer_interest",
    "type": "string",
    "description": "Product or service the customer is interested in"
  },
  {
    "name": "appointment_scheduled",
    "type": "boolean", 
    "description": "Whether an appointment was successfully scheduled"
  },
  {
    "name": "satisfaction_score",
    "type": "number",
    "description": "Customer satisfaction rating from 1-5"
  }
]
```

<Tip>
  Text Mode is ideal for copying configurations between agents, bulk editing parameters, or importing from external sources.
</Tip>

## AI-Enhanced Output Enrichment

The AI Copilot now provides intelligent enrichment recommendations based on your agent's specific use case.

### Smart Enrichment Suggestions

<Info>
  The AI analyzes your agent's purpose, industry, and conversation goals to recommend which enrichment fields will provide the most value for your downstream processing needs.
</Info>

### Enrichment Change Management

Just like output parameters, enrichment changes are managed through the pending changes system:

* Review suggested enrichment configurations
* See which fields the AI recommends enabling/disabling
* Accept or reject enrichment suggestions separately from parameter changes

### Available Enrichment Fields

| Field                | Description                                 | AI Suggests For                                             |
| -------------------- | ------------------------------------------- | ----------------------------------------------------------- |
| 📝 **Transcription** | Full conversation transcript                | Quality assurance, compliance, training agents              |
| 📋 **Summary**       | AI-generated call summary                   | Management reporting, CRM integration, executive dashboards |
| ✅ **Success Status** | Whether call achieved its goal              | Performance tracking, conversion optimization               |
| 🆔 **Call ID**       | Unique call identifier                      | System integration, debugging, support tickets              |
| 🤖 **Agent ID**      | Playbook/agent identifier                   | Multi-agent tracking, performance analytics                 |
| ⏱️ **Duration**      | Call length in seconds                      | Performance metrics, billing, efficiency analysis           |
| 📅 **Created**       | Call start timestamp                        | Scheduling analysis, trend reporting                        |
| 📊 **Call Status**   | Final call status (completed, failed, etc.) | Operational monitoring, success rate tracking               |
| ✅ **Evaluations**    | Results of evaluation tests                 | Quality assurance, agent training, compliance               |
| 🏷️ **Call Type**    | Inbound/outbound classification             | Campaign analysis, channel performance                      |

### AI Enrichment Recommendations by Use Case

<Tabs>
  <Tab title="Quality Assurance">
    **Recommended Fields:**

    * Transcription (compliance review)
    * Evaluations (quality scoring)
    * Duration (efficiency tracking)
    * Agent ID (performance monitoring)
  </Tab>

  <Tab title="Sales Operations">
    **Recommended Fields:**

    * Success Status (conversion tracking)
    * Summary (deal progress)
    * Call ID (CRM integration)
    * Duration (sales cycle analysis)
  </Tab>

  <Tab title="Customer Support">
    **Recommended Fields:**

    * Transcription (issue documentation)
    * Summary (resolution tracking)
    * Evaluations (satisfaction scoring)
    * Call Status (operational metrics)
  </Tab>
</Tabs>

<Warning>
  Enable only the enrichment fields you need to keep webhook payloads manageable and reduce processing overhead. The AI helps optimize this selection.
</Warning>

## Webhook Configuration

Send call results to your external systems automatically with enhanced security and reliability features.

### Setting Up Webhooks

<Steps>
  <Step title="Enable Webhook">
    Toggle on the webhook option in Output Settings.
  </Step>

  <Step title="Configure Endpoint">
    Enter your webhook URL and select the HTTP method.
  </Step>

  <Step title="Add Authentication">
    Configure secure authentication headers (Bearer tokens, API keys).
  </Step>

  <Step title="Test Connection">
    Use the built-in test feature to verify your webhook receives data correctly.
  </Step>
</Steps>

### Enhanced Webhook Features

| Feature               | Description                                | Benefit              |
| --------------------- | ------------------------------------------ | -------------------- |
| **Retry Logic**       | Automatic retries for failed webhook calls | Improved reliability |
| **Authentication**    | Secure header-based authentication         | Enhanced security    |
| **Payload Filtering** | Send only enabled enrichment fields        | Reduced bandwidth    |
| **Error Logging**     | Detailed webhook delivery logs             | Better debugging     |

### Example Enhanced Webhook Payload

```json theme={null}
{
  "call_id": "call_abc123",
  "agent_id": "agent_xyz789", 
  "created_at": "2024-01-15T10:30:00Z",
  "duration": 245,
  "status": "completed",
  "success": true,
  "call_type": "outbound",
  "output_params": {
    "customer_interest": "Premium Plan",
    "appointment_scheduled": true,
    "preferred_date": "2024-01-20",
    "satisfaction_score": 5,
    "lead_score": 8,
    "decision_maker": true,
    "pain_points": "Current solution is too expensive",
    "utm_source": "google",
    "utm_campaign": "premium_plan_q1"
  },
  "transcription": "Complete conversation transcript...",
  "summary": "Customer inquired about Premium Plan, qualified as hot lead, appointment scheduled.",
  "evaluations": {
    "greeting_quality": 4.8,
    "needs_assessment": 4.5,
    "closing_effectiveness": 4.2
  }
}
```

## Best Practices for AI-Enhanced Output Configuration

<Warning>
  Write clear, specific descriptions for output parameters. The AI uses these descriptions to understand what to extract. Clear descriptions lead to more accurate data extraction and better AI suggestions.
</Warning>

### Optimization Guidelines

1. **Leverage AI Suggestions** - Start with AI-generated parameters for your agent type
2. **Use Template Library** - Quickly add common parameters from the template system
3. **Review Pending Changes** - Always review AI suggestions before accepting
4. **Be Specific in Descriptions** - "Customer's budget range in USD" vs "budget"
5. **Choose Appropriate Types** - Boolean for yes/no, number for quantities, string for text
6. **Optimize Enrichment** - Enable only necessary enrichment fields based on AI recommendations
7. **Test in Playground** - Verify parameter extraction accuracy before deploying
8. **Secure Webhooks** - Use authentication for sensitive data transmission
9. **Monitor Performance** - Review extraction accuracy and adjust descriptions as needed

### AI Suggestion Acceptance Strategy

<Steps>
  <Step title="Review Agent Context">
    Ensure the AI correctly understands your agent's purpose and industry.
  </Step>

  <Step title="Evaluate Suggestions">
    Review each suggested parameter for relevance to your specific use case.
  </Step>

  <Step title="Customize Descriptions">
    Modify AI-generated descriptions to match your exact requirements.
  </Step>

  <Step title="Test Integration">
    Verify that suggested parameters work with your downstream systems.
  </Step>
</Steps>

## Smart Output Patterns by Industry

### AI-Optimized Sales Call Parameters

```json theme={null}
{
  "lead_qualification_score": "number",
  "interested_product": "string",
  "budget_range": "string", 
  "decision_timeline": "string",
  "pain_points": "string",
  "competitor_mentioned": "string",
  "next_steps": "string",
  "follow_up_needed": "boolean",
  "decision_maker_present": "boolean",
  "company_size": "string",
  "current_solution": "string",
  "implementation_timeline": "string"
}
```

### AI-Optimized Customer Support Parameters

```json theme={null}
{
  "issue_category": "string",
  "issue_severity": "string",
  "product_affected": "string",
  "resolution_provided": "boolean",
  "customer_satisfaction": "number",
  "escalation_needed": "boolean", 
  "resolution_time": "number",
  "follow_up_required": "boolean",
  "root_cause": "string",
  "solution_type": "string",
  "knowledge_base_used": "string"
}
```

### AI-Optimized Healthcare Scheduling Parameters

```json theme={null}
{
  "appointment_date": "string",
  "appointment_time": "string",
  "service_type": "string",
  "provider_requested": "string",
  "insurance_verified": "boolean",
  "symptoms_mentioned": "string",
  "urgency_level": "string",
  "confirmation_method": "string",
  "reminder_preference": "string",
  "special_accommodations": "string"
}
```

## Working with Copilot Suggestions

### Understanding Suggestion Context

When the AI Copilot suggests output parameters, you'll see:

* **Parameter Name** - Optimized field name following naming conventions
* **Data Type** - Recommended type (string, number, boolean) based on expected values
* **Description** - Clear, specific extraction instruction
* **Reasoning** - Why this parameter is relevant to your agent and industry
* **Usage Examples** - Sample values to expect

### Suggestion Management Workflow

<Tabs>
  <Tab title="Batch Operations">
    * **Accept All** - Apply all suggestions simultaneously
    * **Reject All** - Dismiss all pending changes
    * **Preview Impact** - See how changes affect your configuration
  </Tab>

  <Tab title="Individual Review">
    * **Parameter-by-Parameter** - Review each suggestion individually
    * **Modify Before Accept** - Edit parameter details before applying
    * **Selective Addition** - Choose only relevant suggestions
  </Tab>

  <Tab title="Advanced Management">
    * **Change Tracking** - See full history of modifications
    * **Rollback Options** - Undo recent changes if needed
    * **Template Integration** - Combine suggestions with template parameters
  </Tab>
</Tabs>

### Customizing AI Suggestions

<Info>
  You can modify AI suggestions before accepting them. This allows you to fine-tune parameter names, adjust descriptions for your specific business context, or change data types based on your integration requirements.
</Info>

## Advanced Integration Scenarios

### Multi-Agent Output Coordination

For organizations running multiple specialized agents:

1. **Consistent Naming** - Use AI suggestions to maintain parameter naming consistency
2. **Cross-Agent Fields** - Implement common fields across different agent types
3. **Enrichment Alignment** - Standardize enrichment settings for unified reporting

### CRM Integration Optimization

<Steps>
  <Step title="Map CRM Fields">
    Match AI-suggested parameters to your CRM field structure.
  </Step>

  <Step title="Data Type Alignment">
    Ensure parameter types match your CRM field requirements.
  </Step>

  <Step title="Webhook Testing">
    Test webhook integration with sample AI-generated data.
  </Step>

  <Step title="Error Handling">
    Implement proper error handling for parameter mapping issues.
  </Step>
</Steps>

## Next Steps

<CardGroup cols={2}>
  <Card title="Greetings" icon="hand-wave" href="/advanced-editor/greetings">
    Configure welcome messages with AI assistance
  </Card>

  <Card title="Evaluations" icon="check-double" href="/advanced-editor/evaluations">
    Set up quality tests and scoring
  </Card>
</CardGroup>
