Integrations-Anwendungsfall

Route Incoming Calls Automatically Based on CRM Data

Learn how to look up callers in your CRM and route them to the right team automatically, before the call is even answered.

Smart IVRs

Overview

Not every caller deserves the same experience. Registered customers should reach your support team immediately; unknown numbers should go to a general queue. Manually maintaining routing rules in the phone system does not scale — and it breaks the moment your CRM data changes.

This guide shows how to use Web Service-Based Smart IVRs to query your CRM in real time and return a routing decision before the call is even answered.

How It Works

When a call arrives, Hipcall’s Smart IVRs feature calls your HTTP endpoint with the caller’s phone number. Your server looks up the number in your CRM and responds with an extension number. Hipcall routes the call accordingly — all in milliseconds, before the caller hears a single ring.

Architecture

flowchart TD
    A[Incoming call] --> B[Hipcall Smart IVRs fires]
    B --> C[POST to your endpoint\nwith caller number]
    C --> D{Found in CRM?}
    D -- Yes --> E[Return VIP extension\ne.g. 1093]
    D -- No --> F[Return general extension\ne.g. 1094]
    E --> G[Call routed to VIP queue]
    F --> H[Call routed to general queue]

Step 1: Configure Smart IVRs in Hipcall

  1. Go to Settings > Phone System > Smart IVRs in your Hipcall dashboard.
  2. Click New and choose Webservice as the route type.
  3. Enter your endpoint URL (e.g. https://your-server.example.com/api/smart-ivr).
  4. Save the rule and assign it to the phone number or IVR menu you want to control.

Local development: Use ngrok to expose your local server. Run ngrok http 5008 and use the generated URL as your endpoint.

Step 2: Receive the Webhook

Hipcall sends a POST request to your endpoint with the caller’s phone number as soon as the call arrives.

Example request from Hipcall:

{
  "caller": "+442045205757"
}

The caller field contains the caller’s phone number in E.164 format. Your endpoint must respond within the timeout window — keep the CRM lookup fast.

Step 3: Look Up the Caller

Normalize the phone number to match your database format, then query your CRM.

Example normalization (Python):

def normalize_phone(phone):
    # Strip non-numeric characters
    phone = ''.join(filter(str.isdigit, phone))
    # Handle Turkish local formats
    if phone.startswith('0') and len(phone) == 11:
        phone = '9' + phone
    elif len(phone) == 10:
        phone = '90' + phone
    return phone

Query your database using the normalized number:

caller = data.get('caller')
normalized = normalize_phone(caller)

customer = db.execute(
    'SELECT id FROM customers WHERE phone = ?',
    (normalized,)
).fetchone()

Step 4: Return the Routing Decision

Respond with a JSON object containing the extension to route the call to. Use one extension for known customers, another for unknown callers.

Registered customer:

{ "extension": "1093" }

Unknown caller:

{ "extension": "1094" }

Hipcall reads the extension value and transfers the call to that extension immediately. The caller never experiences a delay.

Tools Used

ToolPurpose
Web Service-Based Smart IVRsTriggers your endpoint on incoming calls and routes based on the response

Next Steps

Community fragen

Haben Sie Fragen oder möchten Sie Ihre Integration teilen? Treten Sie der Diskussion bei.

Tools & APIs

Sechs Möglichkeiten, Hipcall in Ihre Systeme zu erweitern und zu integrieren.

REST API

Greifen Sie programmgesteuert auf Ihre Hipcall-Daten zu. Verwalten Sie Nebenstellen, starten Sie Anrufe, rufen Sie Anrufaufzeichnungen ab und mehr über eine RESTful HTTP API mit OAuth 2.0 und API-Schlüssel-Authentifizierung.

Webhooks

Erhalten Sie Echtzeit-HTTP-Benachrichtigungen für 13+ Ereignistypen – eingehende Anrufe, beantwortete Anrufe, Auflegungen, Voicemails und mehr. Übertragen Sie Anrufdaten sofort in jedes System.

Web-Service-basiertes intelligentes Routing

Leiten Sie eingehende Anrufe dynamisch mit Ihrer eigenen Geschäftslogik weiter. Hipcall ruft Ihren Webservice beim Klingeln auf und leitet den Anruf basierend auf Ihrer JSON-Antwort weiter.

Schnellanruf

Lösen Sie ausgehende Anrufe programmgesteuert aus. Initiieren Sie einen Anruf von der Nebenstelle eines Agenten zu einer beliebigen Nummer über eine einzige API-Anfrage – ideal für Click-to-Call-Integrationen.

Externe Verwaltung

Verwalten Sie Ihr Hipcall-Konto von externen Systemen aus. Stellen Sie Benutzer bereit, aktualisieren Sie Anrufabläufe und steuern Sie Einstellungen, ohne sich in das Dashboard einzuloggen.

Insight Card

Zeigen Sie den Echtzeit-Anruferkontext auf dem Bildschirm des Agenten an, sobald ein Anruf verbunden wird. Übertragen Sie beliebige Daten – Name, Unternehmen, Kontostand – aus Ihrem CRM oder ERP über die API.