loreal-global-kickoff/config.php
DJP 80b170a735 Add Global to Local CSV transformation backend
Services Created:
- OMGService.php: OMG API integration with detailed error handling
- CSVTransformer.php: CSV parsing and transformation logic
- EmailService.php: Mailgun email notifications
- process-csv.php: Multi-stage CSV processing with progress tracking
- upload-to-box.php: Box upload with approval workflow

Features:
- Comprehensive validation at each stage (upload, parse, campaign, API, transform)
- Detailed error reporting with actionable messages
- Warning system for non-critical issues
- Progress tracking through all stages
- Session-based CSV storage for preview before upload
- Date transformation (parse + add 1 month per blueprint)
- 16x market multiplication per ISO codes
- Business unit mapping per Make.com blueprint logic

Dependencies Added:
- league/csv for CSV parsing
- nesbot/carbon for date manipulation

Configuration:
- Added global_to_local settings (ISO codes, business unit map)
- Added omg_api settings (placeholder for API key)
- Added email settings (Mailgun placeholders)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 16:44:48 -05:00

103 lines
3.3 KiB
PHP

<?php
/**
* L'Oréal Box Asset Submission Form - Configuration
*/
return [
// SSO Configuration
'sso' => [
// KILL SWITCH: Set to false for local development, true for production
'enabled' => false,
// Azure AD Configuration (for production use)
'tenant_id' => '', // Add your Azure tenant ID when enabling SSO
'client_id' => '', // Add your Azure client ID when enabling SSO
// Local development user (used when SSO is disabled)
'local_user' => [
'name' => 'Dave Porter',
'email' => 'daveporter@oliver.agency'
]
],
// Box API Configuration
'box' => [
'jwt_config_path' => __DIR__ . '/43984435_77m2ujl3_config.json',
'enterprise_id' => '43984435',
// Box API endpoints
'api_base_url' => 'https://api.box.com/2.0',
'oauth_url' => 'https://api.box.com/oauth2/token',
// Token caching (in seconds)
'token_cache_duration' => 3600 // 1 hour
],
// Webhook Configuration
'webhook' => [
'url' => 'https://hook.us1.make.celonis.com/ddxrhuykysnbxqvb25uxsg0pjngqytiv',
'api_key' => 'E4P9923eBaUTKrEr.iqvHtVHcZ6L!WH',
'timeout' => 30 // seconds
],
// Global to Local CSV Transformation
'global_to_local' => [
'output_box_folder_id' => 'XXXXXXXXX', // Box folder for output CSVs
'max_file_size' => 5242880, // 5MB max upload
'iso_codes' => [
'en-GB', 'es-ES', 'pt-PT', 'en-IE', 'fr-CH', 'de-AT',
'de-DE', 'cs-CZ', 'hu-HU', 'sk-SK', 'da-DK', 'fi-FI',
'nb-NO', 'sv-SE', 'en-NN', 'de-CH'
],
'business_unit_map' => [
'VICHY' => 'VICHY',
'LA ROCHE' => 'LA ROCHE',
'PPD - MULTIBRAND' => 'MULTIBRAND',
'SKINCEUTICAL' => 'SKINCEUTICAL',
'BIOLAGE' => 'BIOLAGE',
'KERASTASE' => 'KERASTASE',
'LOREAL PROFESSIONNEL PARIS' => 'LPP',
'MATRIX' => 'MATRIX',
'MIZANI' => 'MIZANI',
'PUREOLOGY' => 'PUREOLOGY',
'REDKEN' => 'REDKEN',
'SHU UEMURA ART OF HAIR' => 'SHUUEMURA',
'LP' => 'LPP',
'KER' => 'KERASTASE',
'SKINC' => 'SKINCEUTICAL',
'LAROCHEPOSAY' => 'LA ROCHE',
'CERAVE' => 'CERAVE',
'LDB - MULTIBRAND' => 'LDB MULTIBRAND',
'VICHY TEST' => 'Vichy Test'
]
],
// OMG API Configuration
'omg_api' => [
'base_url' => 'https://api2.omg.oliver.solutions/loreal/v1',
'api_key' => 'PLACEHOLDER_OMG_API_KEY', // Replace with actual key
'timeout' => 30
],
// Email Service Configuration
'email' => [
'enabled' => true,
'service' => 'mailgun', // 'mailgun' or 'smtp'
'from' => 'admin@oliver.solutions',
'domain' => 'mail.dev.oliver.solutions',
// Mailgun credentials (to be provided)
'mailgun_api_key' => 'PLACEHOLDER_MAILGUN_KEY',
// SMTP credentials (alternative)
'smtp_host' => '',
'smtp_port' => 587,
'smtp_username' => '',
'smtp_password' => ''
],
// Application Settings
'app' => [
'name' => 'L\'Oréal Box Asset Submission',
'timezone' => 'UTC',
'debug' => true // Set to false in production
]
];