Bulk Operations
TheBulkOperations service lets you perform administrative billing changes across many subscriptions at once. Use it for price increases, mass plan swaps, global coupon campaigns, and cleanup tasks.
Available operations
| Operation | What it does |
|---|---|
swapPlans | Move a set of subscriptions to a new plan |
cancelSubscriptions | Cancel a set of subscriptions |
updatePrices | Apply a price override to a set of subscription items |
applyCoupons | Apply a coupon to a set of subscriptions |
Using the BulkOperations service
Inject or resolve the service and pass a query scope or collection:Swap plans
Cancel subscriptions
Update prices (bulk price override)
Apply a promotional price to a set of subscription items. Useful for grandfathered pricing — existing subscribers keep their old price while new subscribers pay the new rate.Apply coupons
Artisan command
Thesubscribd:bulk-operations command reads a JSON file of operation definitions and executes them in sequence. Useful for deployment scripts and cron-driven operations.
Admin Livewire component
Theadmin.bulk-operations Livewire component provides a UI for running bulk operations from the admin panel:
- Plan swap with plan picker and proration option
- Bulk cancel with immediately/grace-period toggle
- Price override with per-item targeting and expiry date
- Coupon application with code lookup
- Progress indicator for large batches
- Confirmation step before executing
SubscribdFilamentPlugin.
Error handling
Bulk operations apply changes one subscription at a time inside a transaction per subscription. A failure on one subscription is logged and skipped — the operation continues with the remaining subscriptions. Check your logs forBulkOperation.failed entries after a run.
To treat any failure as fatal (stop on first error), pass stopOnError: true:
Next steps
- Proration — How proration is calculated during plan swaps
- Coupons — Coupon validation rules
- Hooks and Events — Events fired during bulk operations