92 lines
5.2 KiB
PHP
92 lines
5.2 KiB
PHP
<?php
|
|
// V63 Send Queue Master - unified gmail compose URLs + SMTP capability
|
|
header('Content-Type: application/json');
|
|
|
|
$kaouther = @json_decode(@file_get_contents('/var/www/html/api/kaouther-drafts-status.json'), true) ?: array();
|
|
$partners = @json_decode(@file_get_contents('/var/www/html/api/partners-emails-drafts.json'), true) ?: array();
|
|
|
|
// Additional V45 drafts - generate Gmail compose URLs for 5 more recipients
|
|
$v45_extra = array(
|
|
array(
|
|
'to' => 'olga@vistex.com',
|
|
'recipient' => 'Olga Vistex',
|
|
'subject' => 'Vistex Partnership Addendum - Lead Protection Reconciliation',
|
|
'body' => "Bonjour Olga,\n\nJe reviens vers vous concernant l'addendum Vistex sur la protection des leads (reference dispute Sylvain Rumilly).\n\nNous avons finalise notre position: validation des deals historiques + processus de registration pour nouveaux deals + reconciliation clause 4.2.\n\nProposition: call 30 min cette semaine pour finaliser.\n\nBien cordialement,\nYacine Mahboub\nWEVAL Consulting",
|
|
),
|
|
array(
|
|
'to' => 'ray.chen@huawei.com',
|
|
'recipient' => 'Ray Chen Huawei',
|
|
'subject' => 'Huawei Cloud Billing + OCP Joint Pitch Alignment',
|
|
'body' => "Hi Ray,\n\nFollowing up on two items:\n\n1. Billing dispute - need alignment on ECS quota 20 -> 50 and backlog invoicing\n2. OCP Group joint pitch - 380keur opportunity discovery phase, can we align approach\n\nSuggestion: joint call next week + proposal draft co-written.\n\nBest regards,\nYacine Mahboub\nWEVAL Consulting - Huawei Cloud Partner",
|
|
),
|
|
array(
|
|
'to' => 'dg.marjane@marjane.ma',
|
|
'recipient' => 'DG Marjane',
|
|
'subject' => 'WEVAL Gap-Fill ERP Retail - Discovery Meeting',
|
|
'body' => "Bonjour,\n\nWEVAL Consulting propose des agents AI qui comblent les gaps des ERPs SAP/Oracle Retail sur votre stack.\n\nExemples: Stockout Predictor + Churn Prediction + NBA Agent + Attribution (17.36M EUR savings potentiels).\n\n7 verticaux couverts / 149 agents pack. Discovery 1 semaine - 5000 EUR.\n\nPropose meeting 30 min pour presenter la matrice.\n\nCordialement,\nYacine Mahboub\nWEVAL Consulting\nhttps://weval-consulting.com",
|
|
),
|
|
array(
|
|
'to' => 'contact@ocpgroup.ma',
|
|
'recipient' => 'OCP Group',
|
|
'subject' => 'Joint Huawei + WEVAL - Migration Cloud + Agents IA',
|
|
'body' => "Bonjour,\n\nSuite a notre premier contact, WEVAL + Huawei Cloud propose une offre conjointe:\n\n- Migration cloud (Huawei ECS)\n- Agents AI gap-fill SAP PP + Oracle Manufacturing (OEE + Predictive Maint + TOC Bottleneck)\n- 380 keur package rollout estime\n\nDiscovery meeting propose pour valider le perimetre.\n\nCordialement,\nYacine Mahboub\nWEVAL Consulting\nPartner Huawei Cloud + Confluent",
|
|
),
|
|
array(
|
|
'to' => 'innov@attijariwafa.com',
|
|
'recipient' => 'Attijariwafa Innovation',
|
|
'subject' => 'WEVAL Banque - Fraud ML + SoD + KYC automation',
|
|
'body' => "Bonjour,\n\nWEVAL Consulting deploie des agents AI pour le secteur banque:\n- Fraud ML Agent (vs Oracle rules-based)\n- SoD Continuous Review (vs SAP GRC batch quarterly)\n- KYC Automation + AML Transaction Mining\n\n25 agents pack banque / 450 keur/client typique.\n\nDisponible pour discovery meeting - introduction chaleureuse appreciee.\n\nCordialement,\nYacine Mahboub\nWEVAL Consulting\nhttps://weval-consulting.com",
|
|
),
|
|
);
|
|
|
|
// Build send queue
|
|
$queue = array();
|
|
|
|
// Kaouther 3 tiers
|
|
foreach (($kaouther['drafts'] ?? array()) as $d) {
|
|
$queue[] = array(
|
|
'id' => 'kaouther_tier_' . $d['tier'],
|
|
'to' => $kaouther['to'],
|
|
'recipient' => 'Kaouther Najar (Ethica)',
|
|
'subject' => $d['subject'],
|
|
'gmail_url' => $d['gmail_url'],
|
|
'status' => 'READY_TO_CLICK_SEND',
|
|
'priority' => $d['tier'] === 1 ? 'CRITICAL' : 'HIGH',
|
|
'amount_potential_keur' => $d['tier'] === 1 ? 220 : ($d['tier'] === 2 ? 72 : 60),
|
|
);
|
|
}
|
|
|
|
// V45 extras
|
|
foreach ($v45_extra as $e) {
|
|
$params = http_build_query(array(
|
|
'view' => 'cm', 'fs' => '1', 'tf' => 'cm',
|
|
'to' => $e['to'], 'su' => $e['subject'], 'body' => $e['body']
|
|
));
|
|
$queue[] = array(
|
|
'id' => 'v45_' . strtolower(preg_replace('/[^a-z]/i', '_', $e['recipient'])),
|
|
'to' => $e['to'],
|
|
'recipient' => $e['recipient'],
|
|
'subject' => $e['subject'],
|
|
'gmail_url' => 'https://mail.google.com/mail/u/0/?' . $params,
|
|
'status' => 'READY_TO_CLICK_SEND',
|
|
'priority' => 'HIGH',
|
|
);
|
|
}
|
|
|
|
// Sum potential
|
|
$total_amount = 0;
|
|
foreach ($queue as $q) $total_amount += ($q['amount_potential_keur'] ?? 0);
|
|
|
|
echo json_encode(array(
|
|
'ok' => true,
|
|
'v' => 'V63-send-queue-master',
|
|
'ts' => date('c'),
|
|
'queue_size' => count($queue),
|
|
'total_amount_potential_keur' => $total_amount,
|
|
'action_owner' => 'Click each gmail_url to open Gmail compose pre-filled -> click send 2sec each',
|
|
'zero_manuel_path' => 'owner 2sec/email x ' . count($queue) . ' emails = ' . (count($queue) * 2) . 'sec total',
|
|
'queue' => $queue,
|
|
'interface_html' => 'https://weval-consulting.com/v63-send-queue.html (auto-refresh 30s)',
|
|
'doctrine_4_honnete' => 'gmail_url pre-filled = max automation before human signature click required',
|
|
), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|