system-prompts-and-models-o.../salesflow-saas/backend
Claude 066ce32aa7
feat(dealix): full automation outreach system — draft queue + pipeline + send
Complete outreach automation that generates drafts → Sami approves → system sends:

1. OutreachDraft model (models/outreach_draft.py):
   DB-persisted draft queue. Every message starts as status='draft'.
   Fields: company, channel, subject, body, followups, sector, scores,
   status (draft→approved→sent→replied→opted_out→bounced), timestamps.

2. Daily Pipeline (automation.py → /daily-pipeline/run):
   Generates N targets per sector/city, runs compliance check,
   creates personalized emails with Arabic pain maps, stores as
   draft rows in DB. Returns batch_id for approval.

3. Draft Queue API (drafts.py):
   - GET /drafts — list by status/channel/batch
   - GET /drafts/stats — counts per status
   - GET /drafts/{id} — full draft with body + followups
   - POST /drafts/{id}/approve — mark approved
   - POST /drafts/approve-batch — approve entire batch
   - POST /drafts/{id}/send — dispatch via email/whatsapp/sms
   - POST /drafts/{id}/skip — archive draft
   - PATCH /drafts/{id} — edit before approving
   - POST /drafts/{id}/log-reply — paste reply → auto-classify →
     generate suggested response → update status

4. Send dispatch uses existing integrations:
   - Email: integrations/email_sender.py (SMTP)
   - WhatsApp: integrations/whatsapp.py (Business API + mock)
   - SMS: integrations/sms.py (Unifonic)
   - LinkedIn: manual_required (copy from dashboard)

Safety:
- All drafts require approval (approval_required=True default)
- Unsubscribe reply → immediate opt_out status
- Compliance gate blocks: opt_out, bounced, high_risk, no_source
- Personal email → warning to use manual channel
- Rate limits enforced at send level

https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
2026-04-25 17:33:30 +00:00
..
alembic feat(dealix): close ALL 4 Tier-1 runtime gaps (Programs E, F, G, K, J) 2026-04-17 10:12:04 +00:00
app feat(dealix): full automation outreach system — draft queue + pipeline + send 2026-04-25 17:33:30 +00:00
knowledge_base 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
scripts feat(dealix): k6 smoke test, SLO definition, fault-injection tests, env update 2026-04-23 10:46:57 +00:00
tests Merge remote-tracking branch 'origin/main' into claude/dealix-tier1-completion-gHdQ9 2026-04-23 13:37:01 +00:00
.env.phase2.example chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
alembic.ini Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
campaign_results.json 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
Dockerfile fix(docker): CPU-only torch + multi-stage build to fix Railway 4GB limit 2026-04-23 13:33:09 +00:00
main.py feat(intelligence): Revenue Intelligence OS — Lead Machine complete 2026-04-20 06:35:59 +00:00
pyproject.toml feat(dealix): execute ALL automatable blueprint tasks 2026-04-17 10:39:21 +00:00
pytest.ini fix(ci): restore pytest.ini to match passing commit + clean CI YAML 2026-04-17 05:54:32 +00:00
railway.toml fix(docker): CPU-only torch + multi-stage build to fix Railway 4GB limit 2026-04-23 13:33:09 +00:00
requirements-dev.txt fix(ci): pin pytest==8.3.4 + pytest-asyncio==0.24.0 exact versions 2026-04-17 05:02:44 +00:00
requirements.txt fix(ci): add import diagnostics + pin pytest-cov + verbose error output 2026-04-17 05:46:10 +00:00
seed_database.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
update_requirements.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00