# ShiftOps Quick Reference

**Last Updated:** 2026-01-09

Quick lookup guide for common ShiftOps tasks and key information.

## Quick Links

- [Overview](01-overview.md) - Tool purpose and use cases
- [User Flow](02-user-flow.md) - Complete user journey
- [Technical Implementation](03-technical-implementation.md) - Code structure
- [Scoring System](04-scoring-system.md) - Calculation formulas
- [API Endpoints](05-api-endpoints.md) - API reference
- [Content Strategy](06-content-strategy.md) - Copy and SEO
- [Testing & Maintenance](07-testing-maintenance.md) - Maintenance procedures

## Key Information

### Tool Details

- **URL:** `https://www.ordio.com/shiftops`
- **Status:** Available (Beta)
- **Two-Phase Loading:** Essential (< 2s) + Enhanced (3-5s background)
- **Total Score Range:** 0-100
- **Pillar Scores:** 0-20 each (5 pillars)
- **Grade Range:** A+ through F

### File Locations

**Frontend:**
- `v2/pages/shiftops.php` (4,416 lines)
- `v2/pages/shiftops-report.php` (18,310 lines)
- `v2/js/shiftops-pdf-generator.js` (1,468 lines)

**API:**
- `v2/api/shiftops.php` (6,084 lines) - Main endpoint
- `v2/api/shiftops-cost-calculator.php` (922 lines)
- `v2/api/shiftops-competitive-analyzer.php` (910 lines)
- `v2/api/shiftops-recommendations-engine.php` (947 lines)
- `v2/api/shiftops-customer-matcher.php` (918 lines)
- `v2/api/shiftops-hubspot.php` (325 lines)
- `v2/api/shiftops-nps.php` (238 lines)

### localStorage Keys

**Primary:**
- `shiftops_report_data` - Essential analysis data
- `shiftops_enhanced_data` - Enhanced analysis data
- `shiftops_report_unlocked` - Unlock status ('true'/'false')
- `shiftops_email` - Email address
- `shiftops_nps_submitted` - NPS submission status

### API Endpoints

**Main:**
- `POST /v2/api/shiftops.php` - Main analysis endpoint

**Supporting:**
- `POST /v2/api/shiftops-hubspot.php` - Lead submission
- `POST /v2/api/shiftops-nps.php` - NPS survey submission
- `GET /v2/api/shiftops-health-check.php` - Health check

### Constants (2026)

- **Ordio Monthly Cost:** €89 per location per month
- **Customer Score Cap:** 95 (maximum for customers)
- **Cache TTL:** 1 hour
- **Essential Mode Timeout:** 15 seconds
- **Enhanced Mode Timeout:** 5 seconds (competitive analysis)

### Scoring Quick Reference

**5 Pillars:**
1. Scheduling Efficiency (0-20)
2. Absence Stability (0-20)
3. Time Tracking Hygiene (0-20)
4. Compliance Docs (0-20)
5. Payroll Readiness (0-20)

**Grade Scale:**
- 90-100: A+
- 80-89: A
- 75-79: A-
- 70-74: B+
- 65-69: B
- 60-64: B-
- 55-59: C+
- 50-54: C
- 45-49: C-
- 40-44: D+
- 35-39: D
- 30-34: D-
- 0-29: F

### Customer Boost

**Applied to Ordio Customers:**
- Baseline bonus: +2-3 points per pillar
- Percentage boost: +20-35% per pillar
- Maximum scores: 18-20 per pillar
- Total score cap: 95

### Data Completeness Multipliers

- 4 fields: 1.0 multiplier
- 3 fields: 0.90 multiplier
- 2 fields: 0.75 multiplier
- 1 field: 0.65 multiplier
- 0 fields: 0.60 multiplier

### HubSpot Configuration

**Lead Form:**
- Form ID: `41d07332-6697-4daa-b27e-dd60515f9c0f`
- Portal ID: `145133546`

**NPS Form:**
- Form ID: `804459f7-c18d-4da6-8a0b-a81f44bb8275`

### Common Functions

**Search Page:**
- `initAutocomplete()` - Initialize Google Places autocomplete
- `handlePlaceSelection(place)` - Handle business selection
- `runChatSequence(place, analysisData)` - Chat-style loading sequence
- `fetchEssentialData(place)` - Fetch essential mode data
- `fetchEnhancedData(place)` - Fetch enhanced mode data

**Report Page:**
- `progressiveDataLoad(reportData)` - Progressive rendering
- `handleEmailUnlock(email, name, phone)` - Email gating
- `loadEnhancedDataInBackground()` - Background enhanced data fetch
- `generatePDF()` - PDF export

**API:**
- `ShiftOpsAnalyzer::analyzeBusiness($businessData)` - Main analysis
- `ShiftOpsAnalyzer::calculateShiftOpsScore($businessData, $isOrdioCustomer)` - Scoring
- `ShiftOpsCostCalculator::calculateCostSavings($businessData, $shiftopsScores)` - Cost savings
- `ShiftOpsCustomerMatcher::matchCustomer($businessData)` - Customer matching

### Error Handling

**Common Errors:**
- API timeout → Fallback data used
- Missing data → Graceful degradation
- localStorage full → Continues without storage
- Invalid business → Error message displayed

**Log Files:**
- `logs/shiftops-debug.log` - General errors
- `logs/shiftops-hubspot.log` - HubSpot submissions
- `logs/shiftops-nps.log` - NPS surveys

### Testing Checklist

**Before Deployment:**
- [ ] Test search flow
- [ ] Test loading sequence
- [ ] Test report rendering
- [ ] Test email gating
- [ ] Test PDF export
- [ ] Test NPS survey
- [ ] Test error scenarios
- [ ] Test mobile responsiveness
- [ ] Test accessibility

### Maintenance Tasks

**Daily:**
- Check error logs
- Monitor API performance

**Weekly:**
- Review user feedback
- Check API usage

**Monthly:**
- Update customer list (if needed)
- Review benchmarks
- Performance audit

**Annually (January):**
- Update year references
- Review benchmarks
- Update meta tags
- Full testing cycle

## Related Documentation

- [System Quick Reference](../../../systems/shiftops/SHIFTOPS_QUICK_REFERENCE.md) - System-level quick reference
- [Scoring Quick Reference](../../../systems/shiftops/SHIFTOPS_SCORING_QUICK_REFERENCE.md) - Scoring quick reference
