system-prompts-and-models-o.../salesflow-saas/backend/app
Claude 738a7b5bf2
feat: Add WhatsApp AI Brain — central intelligence for Dealix number
WhatsApp Brain (4 files, ~1,200 lines):

whatsapp_brain.py (350 lines):
- Central router: identify caller → detect intent → route → respond
- 5 modes: SALES, SUPPORT, MARKETER, DEALS, GENERAL
- Connected to DB: queries leads, users, affiliates by phone
- Arabic/English language detection
- 11 intent types with keyword matching
- Conversation history (last 50 messages per caller)
- Contextual responses using caller profile data

whatsapp_knowledge.py (250 lines):
- 6 features with Arabic descriptions + selling points
- 3 pricing plans with Arabic feature lists
- 8 objection responses (Arabic + English)
- 3 competitor battlecards (Zoho, Salesforce, HubSpot)
- 10 FAQ + 5 Marketer FAQ
- FAQ search by keyword matching

comparison_engine.py (200 lines):
- 5 competitors × 12 dimensions scoring (0-10)
- Chart data for radar/bar charts (frontend-ready)
- Feature comparison matrix (8 features × 5 competitors)
- "Why Dealix Wins" lists (Arabic + English)
- Per-competitor comparison summaries

whatsapp_webhook.py (120 lines):
- POST /webhooks/whatsapp/incoming — Meta + Twilio format parsing
- GET /webhooks/whatsapp/verify — Meta challenge verification
- POST /webhooks/whatsapp/status — Delivery/read receipts

https://claude.ai/code/session_01LsnvBa7HwF5hs99VZbgLGj
2026-04-12 02:40:28 +00:00
..
agents chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
ai chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
api feat: Add WhatsApp AI Brain — central intelligence for Dealix number 2026-04-12 02:40:28 +00:00
flows chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
integrations Dealix OS Frontend implementation v1 2026-03-31 19:53:49 +03:00
middleware chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
models feat: Add Strategic Deals Engine — autonomous B2B deal-making system 2026-04-11 09:15:29 +00:00
openclaw Dealix: OpenClaw safe core, SLA phase 2.5, full-ops UI 2026-04-08 23:31:02 +03:00
schemas chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
services feat: Add WhatsApp AI Brain — central intelligence for Dealix number 2026-04-12 02:40:28 +00:00
utils chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
workers fix: Wire all new systems into project — models, services, workers 2026-04-11 07:51:53 +00:00
__init__.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
config.py Dealix: OpenClaw safe core, SLA phase 2.5, full-ops UI 2026-04-08 23:31:02 +03:00
database.py fix: Add SessionLocal and async_session_factory aliases to database.py 2026-04-11 09:36:50 +00:00
main.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
sqlite_patch.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00