Skip to content

Workflow Index

Quick reference for all 10 documented workflows with visual diagrams.


Find Your Workflow

I need to... Workflow Complexity
Understand the master orchestrator Master Sync Critical
Debug KPN SP16 sync issues KPN SP16 Sync High
Debug Vodafone sync issues Vodafone Sync Medium
Debug T-Mobile sync issues T-Mobile Sync Medium
Debug KPN EEN sync issues KPN EEN Sync Medium
Debug Yielder/Odido issues Yielder Sync Medium
Understand CDR processing CDR Processing Very High
Debug manual totals recalc Manual Totals Low
Debug addon activation Addon Management Low
Understand API calculations API Calculation Import Medium

All Workflows

1. Master Sync Orchestration

Complexity: Critical Duration: 5-10 minutes (all providers) Frequency: Every 5 minutes Trigger: Cron */5 * * * *

Purpose: Master orchestrator that runs all provider syncs

Entry Point: sync:manager console command

Flow:

Cron → sync:manager → SyncManagementService
  → Query active SyncProfiles
  → For each profile: Create SyncTask
  → Dispatch SyncProfileCommand
    → SyncProfileHandler routes to provider
    → Provider handler executes
    → Dispatch totals calculation

Key Handler: SyncProfileHandler (master router)

Single Point of Failure: If sync:manager stops, ALL automation stops

Full Documentation


2. KPN SP16 Complete Sync

Complexity: High (4-command chain) Duration: 3-8 minutes Trigger: SyncProfileHandler routes KPN_SP16 type

Commands: 1. KpnSp16SyncCommand 2. KpnSp16ImportCommand 3. PupeteerKpnSp16SyncCommand 4. DispatchTotalsCommand

Special Features: - Import queue processing - Puppeteer browser automation - 3 external API calls - 8 database tables

Database Operations: - Reads: kpn_import_queue, sync_profile, customer - Writes: call_detail_record, subscription, invoice, totals, totals_backup

Full Documentation


3. Vodafone Sync

Complexity: Medium (2-command chain) Duration: 2-5 minutes Trigger: SyncProfileHandler routes MY_VODAFONE type

Commands: 1. VodafoneSyncCommand 2. DispatchTotalsCommand 3. DispatchTotalsBackupCommand

Features: - Queue processing - Portal scraping - 2 API calls - 7 database tables

CDR Volume: 5k-20k per sync

Full Documentation


4. T-Mobile Calvi Sync

Complexity: Medium (2-command chain) Duration: 2-4 minutes Trigger: SyncProfileHandler routes T_MOBILE type

Commands: 1. TMobileCalviSyncCommand 2. DispatchTotalsCommand 3. DispatchTotalsBackupCommand

Special Features: - Calvi partner structure support - Partner-level totals - Monthly partner calculation (18th)

Console Command:

php bin/console calculate-totals:calvi-partners 2025-01-01

Full Documentation


5. KPN EEN Sync

Complexity: Medium (2-command chain) Duration: 2-5 minutes Trigger: SyncProfileHandler routes KPN_EEN type

Commands: 1. KpnEenSyncCommand 2. DispatchTotalsCommand 3. DispatchTotalsBackupCommand

Features: - KPN EEN Platform API - CDR and subscription import

CDR Volume: 3k-10k per sync

Full Documentation


6. Yielder Sync

Complexity: Medium (3-command chain) Duration: 2-6 minutes Trigger: SyncProfileHandler routes YIELDER type

Commands: 1. YielderSyncCommand 2. CalculateSubscriptionTotalsCommand 3. DispatchTotalsCommand 4. DispatchTotalsBackupCommand

Special Features: - Queue handling (every minute) - SIM card activation queue - Subscription-level totals

Queue Command:

# Runs every minute
php bin/console odido:handle:queue

Full Documentation


7. Routit CDR Complete Lifecycle

Complexity: Very High (6-phase workflow) Duration: 10-30 minutes Trigger: routit:cdr:sync console command

Phases: 1. Request CDRs - Request from Routit API 2. Download CDRs - Download ZIP files 3. Import CDRs - Bulk insert 10k-50k records 4. Generate Invoice - Create Routit invoice 5. Calculate Totals - Calculate billing 6. Finalize - Generate insights, save status

Commands: 6 distinct commands across all phases

Bottleneck: Import phase (2-5 minutes for bulk insert)

Performance: 5k-10k CDRs per second during import

Full Documentation


8. Manual Totals Recalculation

Complexity: Low (user-triggered) Duration: 10-30 seconds Trigger: User clicks "Recalculate" button

Entry Point: UsageController.php:617

Commands: 1. CalculateTotalsCommand 2. BillingInsightTotalsCommand 3. SaveStatusCommand 4. DispatchTotalsBackupCommand

Use Cases: - Correct calculation errors - Apply updated rate plans - Reprocess after CDR import - Manual verification

User Experience: - Loading spinner - Async execution - Page refresh after 10-30 seconds

Full Documentation


9. User Addon Management

Complexity: Low (user-triggered) Duration: 2-5 seconds Trigger: User clicks "Activate/Cancel Addons" button

Entry Point: TmobileSimcardController.php:696,700

Commands: - ActivateRoutitAddonsCommand - CancelRoutitAddonsCommand

Features: - Routit Nina API integration - Rate limiting (10 requests/min per customer) - Permission validation - Activity logging

Database:

-- Log addon activation
INSERT INTO addon_log (customer_id, user_id, action, addon_type)
VALUES (123, 456, 'activate', 'data_boost');

Full Documentation


10. API-Triggered Calculation Import

Complexity: Medium Duration: Variable (depends on data size) Trigger: API endpoint call

Command: CalculationImportCommand

Purpose: Import calculations from external API

Features: - API integration - Data validation - Async processing - Error handling

Full Documentation


Workflow Comparison

By Complexity

Complexity Count Workflows
Critical 1 Master Sync
Very High 1 Routit CDR Lifecycle
High 1 KPN SP16
Medium 5 Vodafone, T-Mobile, KPN EEN, Yielder, API Import
Low 2 Manual Totals, Addon Management

By Command Chain Length

Chain Length Workflows
6 phases Routit CDR Lifecycle
4 commands KPN SP16, Manual Totals
3 commands Yielder
2 commands Vodafone, T-Mobile, KPN EEN
1 command Addon Management, API Import

By CDR Volume

Volume Workflows
10k-50k KPN SP16, Routit CDR
5k-20k Vodafone
5k-15k T-Mobile
3k-10k KPN EEN
2k-8k Yielder
N/A Manual Totals, Addon Management, API Import

By Duration

Duration Workflows
10-30 minutes Routit CDR Lifecycle
5-10 minutes Master Sync (all providers)
3-8 minutes KPN SP16
2-6 minutes Vodafone, T-Mobile, KPN EEN, Yielder
10-60 seconds Manual Totals
2-5 seconds Addon Management

Workflow Dependencies

Master Sync → All Provider Workflows

graph TB
    Master[Master Sync<br/>sync:manager]
    Master --> KPN[KPN SP16 Sync]
    Master --> VOD[Vodafone Sync]
    Master --> TMO[T-Mobile Sync]
    Master --> EEN[KPN EEN Sync]
    Master --> YIELD[Yielder Sync]

    KPN --> Totals1[Totals]
    VOD --> Totals2[Totals]
    TMO --> Totals3[Totals]
    EEN --> Totals4[Totals]
    YIELD --> Totals5[Totals]

    style Master fill:#ff6b6b
    style Totals1 fill:#51cf66
    style Totals2 fill:#51cf66
    style Totals3 fill:#51cf66
    style Totals4 fill:#51cf66
    style Totals5 fill:#51cf66

Common Pattern

ALL provider syncs follow this pattern:

  1. Sync - Import data from provider
  2. Calculate - Run totals calculation
  3. Backup - Backup totals to historical table
  4. Save - Update status

Critical Workflow Points

Single Points of Failure

If these fail, entire workflows stop:

  1. MessageConsumedHandler - Enables ALL command chaining
  2. SyncProfileHandler - Routes ALL provider syncs
  3. DispatchTotalsHandler - Routes ALL totals calculations
  4. sync:manager cron - Triggers ALL automated syncs

See: Single Points of Failure →


Troubleshooting Workflows

Workflow Not Running

  1. Check cron status: sync:manager running every 5 min?
  2. Check SyncProfile active status in database
  3. Check SyncTask table for errors
  4. Review handler logs

Workflow Failing

  1. Identify which command in chain is failing
  2. Check handler logs for that command
  3. Verify external API access (if sync workflow)
  4. Check database connectivity
  5. Review Common Issues →

Workflow Slow

  1. Check CDR volume - is it unusually high?
  2. Check database query performance
  3. Check external API response times
  4. Review bulk insert optimization (for import workflows)

See: Debugging Guide →