Skip to content

🧾 CRM Lead Creation

Goal: Automatically save visitor data and messages as leads in your CRM.


🧩 Example Flow

  1. A visitor types:
    “I’d like a demo of your product.”

  2. Your assistant detects intent and triggers the createLead API action.

  3. Ainisa sends a POST request to your CRM endpoint:

    POST https://crm.example.com/api/leads

  4. Example request body:

    {
      "name": "{{user_name}}",
      "email": "{{user_email}}",
      "message": "{{user_message}}"
    }
  5. Example success response:

    {
      "status": "success",
      "lead_id": 1248,
      "created_at": "2025-11-04T12:50:00Z"
    }
  6. The assistant replies with a confirmation message:
    “✅ Thanks! Our team will reach out to you soon.”


🧠 Notes

  • Use Ainisa’s dynamic placeholders (, , etc.) to automatically include chat user info.
  • The Custom API action can include additional headers like X-CRM-Token for authentication.