Shop It Docs
Workflowscare-package

Care Package Workflow Overview

End-to-end flow for care package purchase, activation, redemption, and expiry.

Care Package Workflow Overview

1. What Is a Care Package

A care package is a service contract bundled with a physical product purchase. The customer selects a care package tier during the cart stage, pays for it as part of their order, and receives a subscription with a set of service features (repairs, on-site visits, diagnostics, etc.) for a fixed duration.

2. System Components

ComponentResponsibility
CarePackageCustomerServiceEligibility check — filters active packages by product kind + price rules
CarePackageCartServiceAttaches/detaches care package to cart item
OrderServiceCreates care_package_subscriptions rows at checkout; dispatches activation jobs on payment success
CarePackageProcessorBullMQ worker — activates subscriptions, sends reminders, expires, cancels
CarePackageWorkersSchedulerDaily cron — enqueues expiry sweep job
CarePackageSubscriptionsAdminServiceAdmin operations: list, detail, suspend, unsuspend, manual activate
CarePackageRedemptionCustomerServiceCustomer raises/views/cancels redemption requests
CarePackageRedemptionAdminServiceAdmin manages redemption status + usage tracking

3. Key Flows

  1. Purchase → Subscription: Add to cart → checkout → payment → BullMQ activate → active subscription.
  2. Feature Usage: Customer raises request → admin accepts (increments quota) → advances to completed.
  3. Expiry: Daily scheduler sweeps active subscriptions past expiryDateexpired.
  4. Reminders: Scheduled at activation for 30d + 7d before expiry → email notification.
  5. Admin Override: Suspend → unsuspend (restores correct status based on expiryDate); manual activate for support cases.

4. High-Level Diagram