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

# Zoho CRM Integration

> Automatic lead creation and management in Zoho CRM directly during customer calls for structured sales processes

# Zoho CRM Integration Template

Integrate Zoho CRM into your Mid-call Actions and enable your AI assistant to automatically create qualified leads, categorize them, and initiate sales workflows during customer conversations.

## Overview & Features

<CardGroup cols={2}>
  <Card title="Intelligent Lead Creation" icon="user-plus">
    * Automatic lead generation from conversations
    * BANT qualification and lead scoring
    * Industry-specific categorization
    * Multi-channel lead source tracking
  </Card>

  <Card title="Sales Process Automation" icon="diagram-project">
    * Automatic assignment rules and territory management
    * Lead nurturing workflow triggers
    * Sales team notifications
    * CRM analytics and performance tracking
  </Card>
</CardGroup>

## Zoho CRM API Setup

### 1. Configure Zoho OAuth 2.0

<Steps>
  <Step title="Zoho API Console">
    * Visit [Zoho API Console](https://api-console.zoho.eu)
    * Create a "Server-based Application" client
    * Note the client ID and client secret
  </Step>

  <Step title="Configure OAuth Scopes">
    ```yaml theme={null}
    Required scopes:
      - ZohoCRM.modules.leads.CREATE
      - ZohoCRM.modules.leads.READ
      - ZohoCRM.modules.contacts.READ (for duplicate check)
      - ZohoCRM.users.READ (for assignment)
    ```
  </Step>

  <Step title="Generate Refresh Token">
    ```yaml theme={null}
    Initial authorization flow:
      1. Visit the authorization URL  
      2. Grant user consent  
      3. Receive authorization code  
      4. Exchange code for refresh token  
      5. Use refresh token for API calls  
    ```
  </Step>
</Steps>

## Configure Lead Creation Tool

### Configuration in the Famulor Interface

<Tabs>
  <Tab title="Tool Details">
    | Field                      | Value                                                                                                                       |
    | -------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
    | **Name**\*                 | `Zoho CRM Lead erstellen`                                                                                                   |
    | **Description**            | "Automatically creates a new lead in Zoho CRM with complete conversation information"                                       |
    | **Function Name**\*        | `create_zoho_lead`                                                                                                          |
    | **Function Description**\* | "Creates a lead in Zoho CRM. Use this when a potential customer shows interest or you identify new business opportunities." |
    | **HTTP Method**            | `POST`                                                                                                                      |
    | **Timeout (ms)**           | `5000`                                                                                                                      |
    | **Endpoint**\*             | `https://www.zohoapis.eu/crm/v2/Leads`                                                                                      |
  </Tab>

  <Tab title="Header Configuration">
    ```json theme={null}
    {
      "Authorization": "Zoho-oauthtoken {{ZOHO_TOKEN}}",
      "Content-Type": "application/json",
      "User-Agent": "Famulor-MidCall-Zoho/1.0"
    }
    ```
  </Tab>

  <Tab title="Request Body Template">
    ```json theme={null}
    {
      "data": [
        {
          "Company": "{company}",
          "Last_Name": "{last_name}",
          "First_Name": "{first_name}",
          "Email": "{email}",
          "Phone": "{phone}",
          "Lead_Source": "{lead_source}",
          "Lead_Status": "{lead_status}",
          "Description": "{description}",
          "Industry": "{industry}",
          "No_of_Employees": "{employees}",
          "Annual_Revenue": "{revenue}",
          "Street": "{street}",
          "City": "{city}",
          "Zip_Code": "{zip}",
          "Country": "{country}",
          "Rating": "{rating}",
          "Website": "{website}",
          "Lead_Score": "{lead_score}",
          "Budget": "{budget}",
          "Timeline": "{timeline}",
          "Pain_Points": "{pain_points}",
          "Competitor": "{competitor}",
          "Call_Source": "Famulor Mid-call Action"
        }
      ],
      "trigger": ["workflow"],
      "duplicate_check_fields": ["Email", "Phone"]
    }
    ```
  </Tab>
</Tabs>

### Parameter Schema

```json theme={null}
{
  "type": "object",
  "properties": {
    "company": {
      "type": "string",
      "description": "Company name of the lead"
    },
    "first_name": {
      "type": "string",
      "description": "First name of the contact person"
    },
    "last_name": {
      "type": "string",
      "description": "Last name of the contact person"
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "Email address"
    },
    "phone": {
      "type": "string",
      "description": "Phone number"
    },
    "lead_source": {
      "type": "string",
      "enum": ["Phone Call", "Website", "Trade Show", "Referral", "Advertisement"],
      "description": "Source of the lead",
      "default": "Phone Call"
    },
    "lead_status": {
      "type": "string",
      "enum": ["New", "Contacted", "Qualified", "Lost"],
      "description": "Current lead status",
      "default": "Contacted"
    },
    "description": {
      "type": "string",
      "description": "Detailed notes from the conversation"
    },
    "industry": {
      "type": "string",
      "description": "Industry of the company"
    },
    "employees": {
      "type": "string",
      "enum": ["1-10", "11-50", "51-200", "201-1000", "1000+"],
      "description": "Number of employees"
    },
    "revenue": {
      "type": "number",
      "description": "Annual revenue in Euros"
    },
    "rating": {
      "type": "string",
      "enum": ["Hot", "Warm", "Cold"],
      "description": "Lead rating based on conversation",
      "default": "Warm"
    },
    "lead_score": {
      "type": "integer",
      "description": "Calculated lead score (0-100)",
      "minimum": 0,
      "maximum": 100
    },
    "budget": {
      "type": "string",
      "description": "Available or stated budget"
    },
    "timeline": {
      "type": "string",
      "description": "Timeframe for purchase decision"
    },
    "pain_points": {
      "type": "string",
      "description": "Identified challenges and issues"
    },
    "competitor": {
      "type": "string",
      "description": "Mentioned competitors or alternative solutions"
    }
  },
  "required": ["last_name", "company"]
}
```

## Practical Use Cases

### Scenario 1: Lead Qualification During Cold Call

<Steps>
  <Step title="Lead Opportunity Detection">
    ```yaml theme={null}
    Cold Call Context:
      Prospect: "Yes, we are actually looking for a CRM solution..."
      
    AI: "Great! Let me document this as a lead..."

    create_zoho_lead:
      company: "Example AG"
      first_name: "Max"
      last_name: "Mustermann" 
      phone: "+49123456789"
      lead_source: "Phone Call"
      lead_status: "Contacted"
      description: "Looking for a CRM solution for 50 employees. Current system is too slow."
      employees: "51-200"
      rating: "Warm"
      pain_points: "Performance issues with current CRM"
    ```
  </Step>

  <Step title="BANT Qualification Integration">
    ```yaml theme={null}
    Automatic Lead Scoring Logic:
      
    Budget Assessment:
      "Under 10k" → lead_score: 40
      "10-50k" → lead_score: 70
      "Over 50k" → lead_score: 90
      
    Authority Level:
      "CEO/Managing Director" → +20 points
      "IT Manager" → +15 points  
      "Employee" → +5 points
      
    Need Urgency:
      "Immediate" → rating: "Hot"
      "This year" → rating: "Warm"
      "Sometime" → rating: "Cold"
    ```
  </Step>
</Steps>

### Response Handling

```json theme={null}
{
  "data": [
    {
      "code": "SUCCESS",
      "details": {
        "Modified_Time": "2024-01-15T10:30:00+01:00",
        "Modified_By": {
          "name": "Famulor Integration",
          "id": "123456789"
        },
        "Created_Time": "2024-01-15T10:30:00+01:00",
        "id": "987654321098765432",
        "Created_By": {
          "name": "Famulor Integration",
          "id": "123456789"
        }
      },
      "message": "record added",
      "status": "success"
    }
  ]
}
```

### Natural Language Integration

**Agent Message**: `"I am creating the lead for {{company}}..."`

**Success Template**: `"Lead created for {{first_name}} {{last_name}} from {{company}}. Lead ID: {{leadId}}"`

**Enhanced Customer Communication**:

```yaml theme={null}
With follow-up information:
  "The lead has been created. Our sales team will contact you within 24 hours with further information."

With lead score context:
  "Based on our conversation, you have a high lead score. You will be prioritized by our senior account manager."
```

***

<Tip>
  Related pages: [Introduction](/en/automation-platform/introduction) and [Building Flows](/en/automation-platform/building-flows), and [Debugging Runs](/en/automation-platform/debugging-runs).
</Tip>

<Tip>
  Need a whole toolset instead of building HTTP actions one by one? Connect an external **MCP server** — tools are discovered automatically. See [MCP Servers](/en/platform/mcp-servers).
</Tip>
