Daily sweep finds subscriptions where cancelAt <= NOW() AND status != 'cancelled'. Transitions them to status='cancelled', updates the associated customer's status to reflect cancellation if no other active subscriptions remain, and triggers a win-back campaign creation event.
Type: state_machine Trigger: Scheduled: 0 6 * * * Entities: subscriptions,customers,winBackCampaigns Recommendation: