Handle Customer Offboarding
A customer is leaving. This recipe covers cancelling entitlements, handling data retention, archiving the Organization, what is preserved versus deleted, and the Cancellation Policy grace period.
Prerequisites
- WordPress admin access.
- The customer has communicated their intent to leave, or a payment failure has exhausted the recovery period.
- You know which entitlements and resources are affected.
Steps
Part A: Review active entitlements
Step 1. Go to MIDDAG Account > Organizations and open the customer's Organization.
Step 2. Navigate to the Entitlements tab. List all entitlements with status active or suspended.
Step 3. For each entitlement, note:
- The class (PLG, ENV, SVC, ORD, AFL, EDU).
- Downstream resources attached (licenses, environments, services, contracts, credit balances).
- Whether there is remaining credit balance or prepaid time.
Part B: Cancel entitlements
Step 4. For voluntary cancellation (customer requested):
- Open each entitlement.
- Click Cancel Entitlement.
- Select the cancellation reason (dropdown: customer request, business closure, switching provider, etc.).
- Add optional notes.
- Click Confirm Cancellation.
Step 5. The Cancellation Policy determines what happens next. Check the policy values:
| Setting | Default | What it means |
|---|---|---|
portal_visibility_days | 90 | How long the cancelled entitlement remains visible in the portal. |
data_retention_days | 365 | How long data is retained before purging. |
allow_reactivation | true | Whether the entitlement can be reactivated after cancellation. |
reactivation_window_days | 90 | How many days after cancellation reactivation is allowed. |
refund_eligible | false | Whether the customer is eligible for a prorated refund. |
Step 6. For cancellation due to payment failure: the system auto-cancels after the grace period expires (default: 30 days). See Suspend for Non-Payment. No manual action needed unless you want to intervene.
Part C: Downstream resource cleanup
Step 7. When an entitlement is cancelled, the ProvisioningPolicy's deprovision_on_cancel setting governs what happens to downstream resources:
PLG entitlements:
- License status transitions to
cancelled. - Existing site activations stop receiving updates but continue functioning on the currently installed version.
- Download access is revoked.
ENV entitlements:
- Environment record is marked
deprovisioned. - The admin should export customer data from the environment before shutting down the server.
- Schedule infrastructure teardown according to your data retention policy.
SVC entitlements:
- Service record transitions to
cancelled. - Open service requests are completed or cancelled (admin review required).
- Contract transitions to
cancelled. - Remaining credit balance is frozen (no new consumption).
Step 8. For environments, export customer data before teardown:
- Go to the Environment record.
- Click Export Data (if the platform supports automated export) or manually create a backup.
- Provide the export to the customer.
Part D: Data retention period
Step 9. After cancellation, data enters the retention period (default: 365 days). During this time:
- All Organization data (entitlements, orders, invoices, contracts, documents) is preserved in the database but no longer visible in the customer portal after
portal_visibility_daysexpires. - The admin can still access all data from the WordPress admin panel.
- The customer can request a data export at any time during the retention period.
Step 10. Offer the customer a data export:
- Go to the Organization detail page.
- Click Generate Data Export.
- The system creates a ZIP file containing the Organization's entitlements, orders, invoices, contracts, and documents.
- Send the download link to the customer.
Part E: Archive the Organization
Step 11. Once all entitlements are cancelled and the customer has been notified:
- Go to the Organization detail page.
- Click Archive Organization.
- Confirm the action.
Step 12. An archived Organization:
- Is no longer visible in the default Organization list (use the "Show Archived" filter to find it).
- Cannot accept new quotes or orders.
- Collaborator portal access is disabled.
- All data remains in the database per the retention policy.
Part F: Reactivation (win-back)
Step 13. If the customer comes back within the reactivation window:
- Open the archived Organization (use the "Show Archived" filter).
- Click Unarchive Organization.
- Open the cancelled entitlement(s) and click Reactivate.
- Process a new payment or link a new order.
- Downstream resources are re-provisioned.
Part G: Final data purge
Step 14. After the data_retention_days period expires, the system flags the Organization's data for purging. A cron job handles the purge:
- Entitlements, orders, invoices, and related records are permanently deleted.
- The Organization record itself is kept as a tombstone (name, tax ID, dates) for legal compliance.
Step 15. Review the purge queue under MIDDAG Account > Settings > Data Retention before the cron runs. You can extend retention for specific Organizations if needed.
Expected result
- All active entitlements are cancelled with a recorded reason.
- Downstream resources are cleaned up per the ProvisioningPolicy.
- The customer received a data export if requested.
- The Organization is archived -- no new transactions can occur.
- Data is retained for the configured period (default: 365 days) and purged afterward.
Further reading
- Suspension and Recovery -- the complete suspension-to-cancellation flow.
- Policies -- Cancellation Policy and data retention settings.
- Customer Lifecycle -- the full lifecycle from onboarding to offboarding.