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

# Customization & AI Behavior

> Business rules, conversational handling, and personalization controls

# Customization and AI Behavior

<Note>
  Business rules (service areas, advance-notice windows, call-type eligibility, pricing) can be delivered two ways: **configured directly in Avoca** during onboarding — how current production integrations work — or **exposed via API** using shapes like the reference designs below for rules that change frequently. The endpoints on this page are a recommended specification for your API, not existing Avoca endpoints.
</Note>

### Business Rules API Options

**Eligibility & Validation Rules**

```http theme={null}
GET /api/v1/business-rules/eligibility
```

Response:

```json theme={null}
{
  "service_type": "inspection",
  "eligibility_rules": [
    {
      "rule_id": "RULE-001",
      "type": "geographic",
      "condition": "customer_zip_code in service_area",
      "service_areas": ["62701", "62702", "62703"]
    },
    {
      "rule_id": "RULE-002",
      "type": "temporal",
      "condition": "booking_advance_hours >= 24",
      "message": "Bookings require 24-hour advance notice"
    }
  ]
}
```

**Dynamic Pricing Rules**

```http theme={null}
GET /api/v1/business-rules/pricing
```

Response:

```json theme={null}
{
  "base_pricing": {
    "inspection": 150.0,
    "maintenance": 200.0
  },
  "modifiers": [
    {
      "type": "time_of_day",
      "condition": "hour < 8 OR hour > 18",
      "adjustment": "+25%",
      "label": "After-hours fee"
    },
    {
      "type": "urgency",
      "condition": "booking_advance_hours < 48",
      "adjustment": "+50.00",
      "label": "Rush service"
    }
  ],
  "promotions": [
    {
      "code": "SAVE20",
      "discount": "-20%",
      "valid_until": "2025-12-31",
      "conditions": ["first_time_customer"]
    }
  ]
}
```

**Upselling & Cross-Selling Opportunities**

```http theme={null}
GET /api/v1/services/{service_id}/recommendations
```

Response:

```json theme={null}
{
  "primary_service": "inspection",
  "recommendations": [
    {
      "service_id": "SVC-456",
      "name": "Maintenance Package",
      "description": "Annual maintenance plan",
      "price_increment": 100.0,
      "conversion_rate": 0.35,
      "talking_points": [
        "Save 20% compared to individual visits",
        "Priority scheduling for members"
      ]
    }
  ]
}
```

### Training & Fine-Tuning Data Requirements

**Historical Data for AI Training** – Request anonymized historical data:

**Booking Patterns**

```http theme={null}
GET /api/v1/analytics/bookings/export
```

Parameters: `date_range_start`, `date_range_end`, `anonymized=true`\
Purpose: Understand booking patterns, peak times, conversion factors\
Data needed: timestamps, service types, booking lead times, completion rates, cancellation reasons, interaction counts before booking

**Conversation Transcripts (if available)** – Anonymized call transcripts, common questions and objections, successful booking flows, cancellation/modification patterns.

**Service Performance Metrics** – Popular services, seasonal demand, geographic distribution, pricing sensitivity.

**Data Privacy Commitments**

* All training data fully anonymized (no PII)
* Data used solely for AI improvement
* Retention limited to training purposes
* Compliance with GDPR and CCPA processing requirements
* Data processing agreement (DPA) established before transfer

### Branding & Content APIs

**Dynamic Script Content**

```http theme={null}
GET /api/v1/content/scripts/{script_id}
```

Response:

```json theme={null}
{
  "script_id": "welcome_call",
  "version": "2.1",
  "content": {
    "greeting": "Thank you for calling {company_name}. How can I help you today?",
    "service_intro": {
      "inspection": "Our certified inspectors provide comprehensive...",
      "maintenance": "Regular maintenance ensures..."
    },
    "closing": "Is there anything else I can help you with today?"
  },
  "variables": {
    "company_name": "Your Company",
    "phone_number": "1-800-555-0123"
  },
  "updated_at": "2025-10-15T10:00:00Z"
}
```

**Service Descriptions**

```http theme={null}
GET /api/v1/content/services/{service_id}/description
```

Response:

```json theme={null}
{
  "service_id": "SVC-123",
  "name": "Residential Inspection",
  "short_description": "Comprehensive home inspection service",
  "long_description": "Our certified inspectors examine...",
  "key_benefits": [
    "Certified professionals",
    "Same-day reporting",
    "Satisfaction guaranteed"
  ],
  "duration": "60 minutes",
  "what_to_expect": "Our inspector will arrive...",
  "updated_at": "2025-10-15T10:00:00Z"
}
```

**Voice Prompts & Branding**

```http theme={null}
GET /api/v1/content/voice-prompts
```

Response:

```json theme={null}
{
  "prompts": [
    {
      "prompt_id": "hold_music",
      "url": "https://cdn.example.com/audio/hold.mp3",
      "duration_seconds": 180
    },
    {
      "prompt_id": "business_hours",
      "text": "Our business hours are Monday through Friday...",
      "audio_url": "https://cdn.example.com/audio/hours.mp3"
    }
  ]
}
```

**Caching Strategy for Content**

* Scripts and content cached with 24-hour TTL
* Webhook notifications (`content.updated`) for immediate updates
* Version numbers enable cache validation

<hr />
