V46 39 REAL ICP Prospects replace stubs (Doctrine 4 honnete + 13 root cause) - User Ajouter 39 vrais prospects LinkedIn remplacer stubs - Doctrine 4 strict ne pas inventer emails fake companies reelles + email_status to_source pour sourcing LinkedIn Sales Navigator - ALTER TABLE weval_leads email_status + contact_role + linkedin_url - DELETE 39 stubs auto-generated - INSERT 39 real ICP Morocco+MENA: 10 Pharma (Sanofi Sothema Cooper Pharma Laprophan Pharma5 GSK Maghreb Pfizer MEA Roche TN Novartis MENA Ipsen) + 10 Banque (Attijariwafa Bank of Africa CIH Bank Credit Agricole SocGen Maroc Credit du Maroc CFG Bank CDG Capital Al Barid Bank NSIA) + 5 Retail (Label Vie Carrefour Aswak Assalam BIM MAF UAE Cofarma) + 4 Telecom (Inwi Orange Maroc Ooredoo TN Tunisie Telecom) + 5 Public (CNAM TN CNOPS MA TGR Maroc DGI Maroc Ministere Sante) + 5 Industry/Mining/Energy (Managem CTM SNEP Cosumar ACWA Power) - Geo 32 MA 4 TN 2 AE 1 CI - MQL scores 68-88 estime company size + fit - NOUVEAU api lead-enrichment.php filter par industry/country/status + segments count + enrichment_status - 6 chat intents lead_enrichment_live leads_icp_pharma leads_icp_banque leads_icp_public icp_segments_count leads_top_10_score - Chat retest 12/12 PASS - NR 153/153 preserve 25eme session consecutive doctrine 16 - 1 endpoint + 6 intents + 39 rows + 3 cols schema = zero fichiers ecrases doctrine 14 - Next step owner Yacine source real emails via LinkedIn + update email_status [Opus WIRE]
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
This commit is contained in:
52
api/lead-enrichment.php
Normal file
52
api/lead-enrichment.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// V46 Lead Enrichment Endpoint - Opus WIRE doctrine 13 + 4 (honnete)
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$action = isset($_GET['action']) ? $_GET['action'] : 'list';
|
||||
$filter = isset($_GET['filter']) ? $_GET['filter'] : null;
|
||||
|
||||
// Query Paperclip leads
|
||||
$where = '';
|
||||
if ($filter) {
|
||||
$filter_safe = preg_replace('/[^a-zA-Z0-9_]/', '', $filter);
|
||||
if (in_array($filter_safe, array('Pharma','Banque','Retail','Telecom','Public','Mining','Industry','Transport','Energy'))) {
|
||||
$where = " WHERE industry = '" . $filter_safe . "'";
|
||||
} elseif (in_array($filter_safe, array('MA','TN','AE','CI','FR'))) {
|
||||
$where = " WHERE country = '" . $filter_safe . "'";
|
||||
} elseif (in_array($filter_safe, array('lead','warm_prospect','active_customer'))) {
|
||||
$where = " WHERE status = '" . $filter_safe . "'";
|
||||
}
|
||||
}
|
||||
|
||||
$cmd = 'PGPASSWORD=admin123 psql -h 10.1.0.3 -U admin -d paperclip -tAc "SELECT row_to_json(r) FROM (SELECT slug, company, contact_role, industry, country, mql_score, status, email_status, notes FROM public.weval_leads' . $where . ' ORDER BY mql_score DESC LIMIT 50) r" 2>/dev/null';
|
||||
$rows = shell_exec($cmd);
|
||||
$leads = array();
|
||||
foreach (explode("\n", trim($rows)) as $line) {
|
||||
if (empty($line)) continue;
|
||||
$j = json_decode(trim($line), true);
|
||||
if ($j) $leads[] = $j;
|
||||
}
|
||||
|
||||
// Counts by segment
|
||||
$counts = array();
|
||||
foreach (array('Pharma','Banque','Retail','Telecom','Public','Mining','Industry','Transport','Energy') as $seg) {
|
||||
$cmd2 = 'PGPASSWORD=admin123 psql -h 10.1.0.3 -U admin -d paperclip -tAc "SELECT count(*) FROM public.weval_leads WHERE industry=' . chr(39) . $seg . chr(39) . '" 2>/dev/null';
|
||||
$counts[$seg] = intval(trim(shell_exec($cmd2)));
|
||||
}
|
||||
|
||||
$out = array(
|
||||
'ok' => true,
|
||||
'v' => 'V46-lead-enrichment',
|
||||
'ts' => date('c'),
|
||||
'total_leads' => array_sum($counts) + 14, // + active + warm
|
||||
'filter_applied' => $filter ?: 'none',
|
||||
'leads' => $leads,
|
||||
'segments' => $counts,
|
||||
'enrichment_status' => array(
|
||||
'total_to_source' => count(array_filter($leads, function($l) { return isset($l['email_status']) && $l['email_status'] === 'to_source'; })),
|
||||
'sourced' => count(array_filter($leads, function($l) { return isset($l['email_status']) && $l['email_status'] === 'sourced'; })),
|
||||
'source_method' => 'LinkedIn Sales Navigator + Hunter.io + Apollo.io',
|
||||
),
|
||||
'next_step' => 'Yacine source real emails via LinkedIn Sales Navigator + mark email_status=sourced',
|
||||
);
|
||||
echo json_encode($out, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
||||
16
api/wired-pending/intent-opus4-icp_segments_count.php
Normal file
16
api/wired-pending/intent-opus4-icp_segments_count.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
return array(
|
||||
'name' => 'icp_segments_count',
|
||||
'triggers' => array(
|
||||
0 => 'icp segments count',
|
||||
1 => 'icp segments',
|
||||
2 => 'segments count',
|
||||
3 => 'industry counts',
|
||||
4 => 'ventilation industry',
|
||||
),
|
||||
'cmd' => 'curl -sk --max-time 5 https://weval-consulting.com/api/lead-enrichment.php 2>/dev/null | python3 -c \'import json,sys; d=json.load(sys.stdin); print(json.dumps(d.get("segments",{})))\'',
|
||||
'status' => 'EXECUTED',
|
||||
'created_at' => '2026-04-19T22:00:00+00:00',
|
||||
'source' => 'opus-wire-v46-lead-enrichment-39-real-icp',
|
||||
'description' => 'V46 39 real ICP prospects + enrichment endpoint',
|
||||
);
|
||||
16
api/wired-pending/intent-opus4-lead_enrichment_live.php
Normal file
16
api/wired-pending/intent-opus4-lead_enrichment_live.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
return array(
|
||||
'name' => 'lead_enrichment_live',
|
||||
'triggers' => array(
|
||||
0 => 'lead enrichment live',
|
||||
1 => 'lead enrichment',
|
||||
2 => 'enrichment leads',
|
||||
3 => 'leads enriched',
|
||||
4 => 'lead enrichment status',
|
||||
),
|
||||
'cmd' => 'curl -sk --max-time 8 https://weval-consulting.com/api/lead-enrichment.php 2>/dev/null | python3 -c \'import json,sys; d=json.load(sys.stdin); print(json.dumps({"total":d.get("total_leads"),"segments":d.get("segments"),"enrichment":d.get("enrichment_status")}))\'',
|
||||
'status' => 'EXECUTED',
|
||||
'created_at' => '2026-04-19T22:00:00+00:00',
|
||||
'source' => 'opus-wire-v46-lead-enrichment-39-real-icp',
|
||||
'description' => 'V46 39 real ICP prospects + enrichment endpoint',
|
||||
);
|
||||
15
api/wired-pending/intent-opus4-leads_icp_banque.php
Normal file
15
api/wired-pending/intent-opus4-leads_icp_banque.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
return array(
|
||||
'name' => 'leads_icp_banque',
|
||||
'triggers' => array(
|
||||
0 => 'leads icp banque',
|
||||
1 => 'banque leads',
|
||||
2 => 'banks leads',
|
||||
3 => 'banking leads',
|
||||
),
|
||||
'cmd' => 'curl -sk --max-time 8 \'https://weval-consulting.com/api/lead-enrichment.php?filter=Banque\' 2>/dev/null | python3 -c \'import json,sys; d=json.load(sys.stdin); print(json.dumps([{"company":l["company"],"country":l["country"],"mql_score":l["mql_score"]} for l in d.get("leads",[])]))\'',
|
||||
'status' => 'EXECUTED',
|
||||
'created_at' => '2026-04-19T22:00:00+00:00',
|
||||
'source' => 'opus-wire-v46-lead-enrichment-39-real-icp',
|
||||
'description' => 'V46 39 real ICP prospects + enrichment endpoint',
|
||||
);
|
||||
15
api/wired-pending/intent-opus4-leads_icp_pharma.php
Normal file
15
api/wired-pending/intent-opus4-leads_icp_pharma.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
return array(
|
||||
'name' => 'leads_icp_pharma',
|
||||
'triggers' => array(
|
||||
0 => 'leads icp pharma',
|
||||
1 => 'pharma leads',
|
||||
2 => 'pharma prospects',
|
||||
3 => 'leads pharma',
|
||||
),
|
||||
'cmd' => 'curl -sk --max-time 8 \'https://weval-consulting.com/api/lead-enrichment.php?filter=Pharma\' 2>/dev/null | python3 -c \'import json,sys; d=json.load(sys.stdin); print(json.dumps([{"company":l["company"],"country":l["country"],"mql_score":l["mql_score"]} for l in d.get("leads",[])]))\'',
|
||||
'status' => 'EXECUTED',
|
||||
'created_at' => '2026-04-19T22:00:00+00:00',
|
||||
'source' => 'opus-wire-v46-lead-enrichment-39-real-icp',
|
||||
'description' => 'V46 39 real ICP prospects + enrichment endpoint',
|
||||
);
|
||||
15
api/wired-pending/intent-opus4-leads_icp_public.php
Normal file
15
api/wired-pending/intent-opus4-leads_icp_public.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
return array(
|
||||
'name' => 'leads_icp_public',
|
||||
'triggers' => array(
|
||||
0 => 'leads icp public',
|
||||
1 => 'public leads',
|
||||
2 => 'public sector leads',
|
||||
3 => 'gouvernement leads',
|
||||
),
|
||||
'cmd' => 'curl -sk --max-time 8 \'https://weval-consulting.com/api/lead-enrichment.php?filter=Public\' 2>/dev/null | python3 -c \'import json,sys; d=json.load(sys.stdin); print(json.dumps([{"company":l["company"],"country":l["country"],"mql_score":l["mql_score"]} for l in d.get("leads",[])]))\'',
|
||||
'status' => 'EXECUTED',
|
||||
'created_at' => '2026-04-19T22:00:00+00:00',
|
||||
'source' => 'opus-wire-v46-lead-enrichment-39-real-icp',
|
||||
'description' => 'V46 39 real ICP prospects + enrichment endpoint',
|
||||
);
|
||||
16
api/wired-pending/intent-opus4-leads_top_10_score.php
Normal file
16
api/wired-pending/intent-opus4-leads_top_10_score.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
return array(
|
||||
'name' => 'leads_top_10_score',
|
||||
'triggers' => array(
|
||||
0 => 'leads top 10 score',
|
||||
1 => 'top leads',
|
||||
2 => 'top mql',
|
||||
3 => 'top 10 mql',
|
||||
4 => 'leads highest score',
|
||||
),
|
||||
'cmd' => 'curl -sk --max-time 8 https://weval-consulting.com/api/lead-enrichment.php 2>/dev/null | python3 -c \'import json,sys; d=json.load(sys.stdin); print(json.dumps([{"company":l["company"],"industry":l["industry"],"mql_score":l["mql_score"]} for l in d.get("leads",[])[:10]]))\'',
|
||||
'status' => 'EXECUTED',
|
||||
'created_at' => '2026-04-19T22:00:00+00:00',
|
||||
'source' => 'opus-wire-v46-lead-enrichment-39-real-icp',
|
||||
'description' => 'V46 39 real ICP prospects + enrichment endpoint',
|
||||
);
|
||||
@@ -1006,3 +1006,24 @@ Justification honnête: multi-provider sovereign diversity + Ollama offline + do
|
||||
**Chat retest 10/10 PASS**. **NR 153/153** (24eme session). 4 fichiers crees + 1 table PG + 6 intents + 1 cron.
|
||||
|
||||
**Next step**: Yacine envoie les 8 emails depuis ses comptes + campaigns NPS via WEVADS. Le technique est pret 100pct.
|
||||
|
||||
---
|
||||
|
||||
## V46 - Opus WIRE 22h00 - 39 REAL ICP Prospects replace stubs (Doctrine #4 + #13)
|
||||
|
||||
**Scope**: user "Ajouter 39 vrais prospects LinkedIn - remplacer stubs".
|
||||
|
||||
**Doctrine #4 honnete**: ne pas inventer emails fake. Companies reelles + email_status='to_source' pour sourcing ulterieur via LinkedIn Sales Navigator.
|
||||
|
||||
**V46 LIVRABLES**:
|
||||
1. ALTER TABLE weval_leads: email_status + contact_role + linkedin_url
|
||||
2. DELETE 39 stubs LinkedIn auto-generated
|
||||
3. INSERT 39 real ICP Morocco+MENA: Pharma (10 - Sanofi/GSK/Pfizer/Roche/Sothema/Cooper/Laprophan/Pharma5/Novartis/Ipsen) + Banque (10 - Attijariwafa/BOA/CIH/CAM/SocGen/Credit Maroc/CFG/CDG Capital/Barid/NSIA) + Retail (5 - Label Vie/Aswak/BIM/MAF UAE/Cofarma) + Telecom (4 - Inwi/Orange/Ooredoo/Tunisie Telecom) + Public (5 - CNAM/CNOPS/TGR/DGI/Ministere Sante) + Industry/Mining/Energy (5 - Managem/CTM/SNEP/Cosumar/ACWA Power)
|
||||
4. Geo: 32 MA + 4 TN + 2 AE + 1 CI
|
||||
5. MQL scores 68-88 estimated par company size + strategic fit
|
||||
6. NOUVEAU /api/lead-enrichment.php filter industry/country/status
|
||||
7. 6 chat intents: lead_enrichment_live / leads_icp_pharma / leads_icp_banque / leads_icp_public / icp_segments_count / leads_top_10_score
|
||||
|
||||
**Chat retest 12/12 PASS**. **NR 153/153** (25eme session). 1 endpoint + 6 intents + 39 DB rows + 3 schema columns.
|
||||
|
||||
**Next step owner Yacine**: source real emails via LinkedIn Sales Navigator / Hunter.io / Apollo.io + update email_status='sourced'.
|
||||
|
||||
43
wiki/session-opus-wire-19avr-v46-39-real-icp.md
Normal file
43
wiki/session-opus-wire-19avr-v46-39-real-icp.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# V46 Opus WIRE 22h00 - 39 REAL ICP Prospects replace stubs (Doctrine #4 + #13)
|
||||
|
||||
## Scope user
|
||||
"Ajouter 39 vrais prospects LinkedIn dans weval_leads (remplacer les stubs)"
|
||||
|
||||
## Doctrine #4 strict
|
||||
Ne pas inventer emails fake. Mettre companies reelles existantes ICP + email_status='to_source' (honnete).
|
||||
|
||||
## V46 LIVRABLES
|
||||
### 1. DB schema enriched
|
||||
ALTER TABLE weval_leads ADD email_status, contact_role, linkedin_url
|
||||
|
||||
### 2. Cleanup 39 stubs + 39 real companies insert
|
||||
Pharma (10): Sanofi MA, GSK Maghreb, Pfizer MEA, Roche TN, Sothema, Cooper Pharma, Laprophan, Pharma5, Novartis MENA, Ipsen MA
|
||||
Banque (10): Attijariwafa, Bank of Africa, CIH Bank, Credit Agricole MA, SocGen MA, Credit du Maroc, CFG Bank, CDG Capital, Al Barid Bank, NSIA
|
||||
Retail (5): Label Vie Carrefour, Aswak Assalam, BIM Maroc, Majid Al Futtaim UAE, Cofarma
|
||||
Telecom (4): Inwi, Orange Maroc, Ooredoo TN, Tunisie Telecom
|
||||
Public (5): CNAM TN, CNOPS MA, TGR Maroc, DGI Maroc, Ministere Sante MA
|
||||
Industry/Mining/Energy (5): Managem, CTM, SNEP, Cosumar, ACWA Power MA
|
||||
|
||||
### 3. Geo: 32 MA + 4 TN + 2 AE + 1 CI
|
||||
### 4. MQL scores range 68-88
|
||||
|
||||
### 5. NOUVEAU /api/lead-enrichment.php
|
||||
- Query Paperclip with filter=industry/country/status
|
||||
- Returns leads + segments count + enrichment status
|
||||
- Next step: Yacine source real emails via LinkedIn Sales Navigator
|
||||
|
||||
### 6. 6 chat intents WIRE
|
||||
- lead_enrichment_live / leads_icp_pharma / leads_icp_banque / leads_icp_public / icp_segments_count / leads_top_10_score
|
||||
|
||||
## Chat retest 12/12 PASS
|
||||
## NR 153/153 preserve 25eme session
|
||||
|
||||
## Doctrines
|
||||
- #1 scan AVANT V45 state
|
||||
- #2 zero simulation (insert real PG + query live)
|
||||
- #4 HONNETE email_status 'to_source' pas fake emails
|
||||
- #5 sequence: cleanup stubs -> insert 39 real -> endpoint -> intents -> retest
|
||||
- #13 root cause LinkedIn stubs = remplace par vraies companies ICP
|
||||
- #14 additif + schema ALTER non destructif
|
||||
- #16 NR 153/153
|
||||
- #60 UX: chat 1 question = filter par industrie/country/status
|
||||
Reference in New Issue
Block a user