A complete command-line based simulator for Salesforce Commerce Cloud (SFCC) support operations, designed for testing, training, and development purposes.
- Order Management: Simulate e-commerce orders with realistic data
- Payment Processing: Simulate payment transactions with random failures
- Failure Simulation: Generate system failures mimicking real SFCC environments
- API Simulation: Mock REST APIs for OCAPI and Data Warehouse operations
- Support Console: View and manage failed orders
- Automatic Retry: Retry failed jobs with configurable success rates
- Log Investigation: Advanced log analysis and pattern detection
- Manual Fixes: Apply fixes and track resolution times
- SLA Monitoring: Track service level agreement compliance
- Alert System: Real-time monitoring with email/Slack notifications
- Backup System: Automated backups with retention policies
- Reporting Engine: Generate HTML and CSV reports
- Webhook Simulator: Test webhook integrations
- Deployment Manager: Simulate CI/CD pipelines
- Health Monitoring: System resource monitoring
- Batch Processing: Automated order export and inventory sync
- Bash Shell (macOS Terminal, Linux Bash, or Windows WSL2)
- jq (for JSON processing) - Installation Guide
- Python 3 (optional, for advanced features)
- bc (for calculations) - usually pre-installed
# 1. Download or clone the project
git clone <repository-url>
cd scc-simulator
# 2. Run the universal installer
chmod +x install_universal.sh
./install_universal.sh
# 3. Grant execution permissions
chmod +x master_control.sh scripts/*.sh backend/*.sh# Create directory structure
mkdir -p scc-simulator/{backend,logs,orders,failures,scripts,backups,reports,webhook_events}
cd scc-simulator
# Install jq (if not installed)
# macOS:
brew install jq
# Linux (Debian/Ubuntu):
sudo apt-get update && sudo apt-get install -y jq
# Linux (RHEL/CentOS):
sudo yum install -y jq# Start the master control panel (recommended)
./master_control.sh
# Or start the main simulator directly
./scc_simulator.shFrom the master control panel (./master_control.sh):
- Start All Services - Launch all background services
- Stop All Services - Stop all running services
- Main Console - Open the primary SFCC simulator
- Alert Dashboard - Real-time monitoring and alerts
- Backup System - Automated backup management
- Advanced Reporting - Generate business intelligence reports
- Webhook Simulator - Test webhook integrations
- Deployment Manager - Simulate CI/CD deployments
- System Health Check - Verify system status and dependencies
- Log Viewer - Unified log monitoring
- Install Dependencies - Install missing packages
- Exit - Shutdown all services and exit
# 1. Start the system
./master_control.sh
# 2. In the master control, choose option 3 (Main Console)
# 3. From the main console:
# - Simulate orders (Option 1)
# - Process payments (Option 2) - some will fail randomly
# - Access support console (Option 4)
# - Resolve failures using auto-retry or manual fixes
# - Monitor logs in real-time (Option 5)scc-simulator/
βββ master_control.sh # Main control panel
βββ scc_simulator.sh # Primary simulator
βββ install_universal.sh # Installation script
βββ .env # Configuration file
βββ README.md # This file
β
βββ backend/ # API and service simulations
β βββ api_server.sh # REST API simulator
β βββ webhook_simulator.sh # Webhook testing
β βββ api_responses/ # Mock API responses
β
βββ scripts/ # Automation scripts
β βββ alert_system.sh # Real-time monitoring
β βββ auto_monitor.sh # Automated monitoring
β βββ backup_system.sh # Backup management
β βββ batch_processor.sh # Batch operations
β βββ deployment_manager.sh # CI/CD simulation
β βββ advanced_reporting.sh # Business reporting
β
βββ logs/ # System logs
β βββ orders.log # Order transactions
β βββ failures.log # Failure records
β βββ system.log # System events
β βββ alerts.log # Alert history
β βββ deployments.log # Deployment history
β
βββ orders/ # Simulated orders (JSON files)
βββ failures/ # System failures (JSON files)
βββ backups/ # Automated backups
βββ reports/ # Generated reports
βββ webhook_events/ # Webhook payloads
Edit .env file for system configuration:
# Salesforce Commerce Cloud Simulator Configuration
ENVIRONMENT=development
LOG_LEVEL=INFO
API_PORT=8080
WEBHOOK_PORT=9090
BACKUP_RETENTION_DAYS=7
FAILURE_RETRY_LIMIT=3- Creates realistic order data with customer information
- Simulates different order statuses (PENDING, PAID, FAILED, EXPORTED)
- Generates random order values and item quantities
- 20% random failure rate for realistic testing
- Multiple payment methods simulation
- Error code generation for troubleshooting
- Inventory sync failures
- Tax calculation errors
- Shipping rate unavailability
- Order export failures
- Cart pipeline errors
- OCAPI endpoints simulation
- Data Warehouse API responses
- Random latency and timeout simulation
- Error response generation
The alert system monitors:
- Critical failures (HIGH severity)
- SLA breaches (resolution time > 1 hour)
- System performance (CPU/Memory usage)
- Trend analysis (sudden failure spikes)
Alert notifications are logged and can be configured to simulate:
- Email notifications
- Slack alerts
- SMS notifications (simulated)
Automatic backup features:
- Database backup (simulated SQL dumps)
- Log rotation and archiving
- Configuration backup
- Retention policies (configurable days)
- Integrity verification
Generate various reports:
- Daily HTML reports with metrics and charts
- SLA compliance reports in CSV format
- Trend analysis for business intelligence
- Performance metrics and recommendations
Test webhook integrations with:
- Order created/updated/cancelled events
- Payment processed/failed events
- Inventory updated events
- Customer created events
- Retry logic for failed webhooks
Simulate CI/CD pipelines:
- Build process with testing
- Staging deployment
- Production deployment
- Rollback procedures
- Environment status monitoring
-
"command not found: free" (macOS)
- The system automatically uses alternative commands
- No action needed - the scripts are cross-platform
-
"jq not found"
# macOS brew install jq # Linux sudo apt-get install jq # Debian/Ubuntu sudo yum install jq # RHEL/CentOS
-
Permission denied
chmod +x *.sh scripts/*.sh backend/*.sh
-
Scripts not working from wrong directory
- Always run from the
scc-simulatorroot directory - Use
./master_control.shto navigate between services
- Always run from the
Run the built-in health check:
./master_control.sh
# Choose option 9: System Health CheckThis simulator demonstrates:
- Enterprise support workflows
- Incident management procedures
- SLA tracking and reporting
- System monitoring best practices
- Automated recovery processes
- Test SFCC integration code
- Simulate edge cases and failures
- Develop monitoring scripts
- Practice troubleshooting scenarios
- Train on SFCC support procedures
- Practice incident response
- Learn log analysis techniques
- Understand SLA management
- Test monitoring configurations
- Practice deployment procedures
- Develop backup strategies
- Implement alerting systems
# Typical development session
./master_control.sh # Start control panel
# β Start all services
# β Open main console
# β Simulate orders and failures
# β Practice troubleshooting
# β Generate reports
# β Check system healthThis project is for educational and demonstration purposes. Salesforce Commerce Cloud is a trademark of Salesforce.com, Inc.
This is a demonstration project. For educational purposes only.
This is a simulator project for learning purposes. For actual Salesforce Commerce Cloud support, contact Salesforce Support.