system-prompts-and-models-o.../salesflow-saas/backend/app/api/v1
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
..
webhooks 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
__init__.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
admin.py feat(dealix): D0 launch hardening — DLQ, PostHog, circuit breaker, pricing, runbook 2026-04-23 10:32:53 +00:00
affiliates.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
agent_system.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
agents.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
ai_agents.py Migrate SalesMatic to Dealix + Add complete affiliate recruitment & AI sales system 2026-03-30 15:49:58 +00:00
analytics.py Dealix OS Frontend implementation v1 2026-03-31 19:53:49 +03:00
approval_center.py fix(dealix): fully lazy API imports to fix CI + add Revenue Activation system 2026-04-17 04:43:57 +00:00
auth.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
automation.py feat(dealix): full automation outreach system — draft queue + pipeline + send 2026-04-25 17:33:30 +00:00
autonomous_foundation.py Dealix: OpenClaw safe core, SLA phase 2.5, full-ops UI 2026-04-08 23:31:02 +03:00
calls.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
channels.py feat: Complete Omnichannel Intelligence — 7 AI brains for every channel 2026-04-12 03:21:53 +00:00
commissions.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
companies.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
complaints.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
compliance.py feat: Add conversation intelligence, message writer, sales agent, APIs, and templates 2026-04-11 07:43:11 +00:00
connector_governance.py fix(dealix): fully lazy API imports to fix CI + add Revenue Activation system 2026-04-17 04:43:57 +00:00
consents.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
contacts.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
contradiction.py fix(dealix): fully lazy API imports to fix CI + add Revenue Activation system 2026-04-17 04:43:57 +00:00
customer_onboarding.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
dashboard.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
deals.py feat(dealix): enforcement layer + weekly pack + auto evidence + sales pack 2026-04-17 06:15:59 +00:00
disputes.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
drafts.py feat(dealix): full automation outreach system — draft queue + pipeline + send 2026-04-25 17:33:30 +00:00
evidence_packs.py fix(dealix): fully lazy API imports to fix CI + add Revenue Activation system 2026-04-17 04:43:57 +00:00
executive_room.py feat(dealix): enforcement layer + weekly pack + auto evidence + sales pack 2026-04-17 06:15:59 +00:00
forecast_control.py fix(dealix): replace all placeholder services + wire frontend to APIs 2026-04-17 05:05:10 +00:00
golden_path.py feat(dealix): golden path service + correlation_id + stack recommendations 2026-04-17 05:59:32 +00:00
guarantees.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
health.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
hermes.py fix: Enhanced Hermes API, router registration, and observability service 2026-04-11 08:36:50 +00:00
inbox.py fix: Update inbox API and router registration 2026-04-11 07:44:20 +00:00
intelligence.py feat: Finalize all systems + add 20 production libraries 2026-04-11 07:56:24 +00:00
knowledge.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
lead_prospector.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
leads.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
marketing_hub.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
master.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
meetings.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
model_routing.py fix(dealix): replace all placeholder services + wire frontend to APIs 2026-04-17 05:05:10 +00:00
operations.py Dealix: OpenClaw safe core, SLA phase 2.5, full-ops UI 2026-04-08 23:31:02 +03:00
outreach_engine.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
payouts.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
pipeline.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
presentations.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
pricing.py feat(dealix): D0 launch hardening — DLQ, PostHog, circuit breaker, pricing, runbook 2026-04-23 10:32:53 +00:00
proposals.py fix: Finalize proposals API, sales agent, and quote engine 2026-04-11 07:46:37 +00:00
prospecting.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
revenue_room.py 🚀 Complete Dealix AI Sales Empire Update - Security Scrubbed, Lead Engine & Multi-Channel Ready 2026-04-02 17:17:13 +03:00
router.py feat(dealix): full automation outreach system — draft queue + pipeline + send 2026-04-25 17:33:30 +00:00
sales_os.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
saudi_compliance.py fix(dealix): fully lazy API imports to fix CI + add Revenue Activation system 2026-04-17 04:43:57 +00:00
saudi_workflow.py feat(dealix): wire ALL 17 schemas + Saudi workflow + release gate 2026-04-17 06:27:15 +00:00
sectors.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
sequences.py feat: Add conversation intelligence, message writer, sales agent, APIs, and templates 2026-04-11 07:43:11 +00:00
strategic_deals.py feat: Add Strategic Deals Engine — autonomous B2B deal-making system 2026-04-11 09:15:29 +00:00
strategy_summary.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
structured_outputs.py feat(dealix): wire ALL 17 schemas + Saudi workflow + release gate 2026-04-17 06:27:15 +00:00
supervisor.py Add complete launch infrastructure: models, APIs, agents, compliance, docs, knowledge base 2026-03-31 07:57:48 +00:00
tenants.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
users.py Add SalesMatic AI Sales SaaS Platform - Complete Foundation 2026-03-28 03:06:53 +00:00
value_proposition.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
webhooks.py chore: snapshot Dealix salesflow phase2 for audit worktree 2026-04-04 18:04:21 +03:00
whatsapp_webhook.py feat: Add WhatsApp AI Brain — central intelligence for Dealix number 2026-04-12 02:40:28 +00:00