Introduction
In complex healthcare organizations, multiple Lines of Business (LoB) often operate within a shared Salesforce environment, leveraging shared data, automation, and external integrations. When one LoB needs to migrate out, managing millions of records, files, and knowledge articles becomes a significant challenge. This case study details how Advantex successfully executed the migration of a healthcare LoB, ensuring seamless data management, system performance, and compliance while maintaining the operational integrity of the remaining business units.
Business Context
Client Overview:
Our client, a global healthcare provider, managed several LoBs within a shared Salesforce org. One LoB, focused on patient care, needed to migrate to its own Salesforce instance due to organizational restructuring. The shared org contained millions of healthcare records, 5 million files, and thousands of healthcare knowledge articles, all integrated with external systems such as Electronic Health Records (EHR) platforms and third-party health management tools.
Challenges:
- Handling millions of healthcare records, files, and knowledge articles while ensuring no data loss or compliance issues.
- Removing or deactivating 500 users related to the departing LoB without impacting the remaining LoBs.
- Ensuring the integrity of shared automations, integrations, and other metadata throughout the migration.
- Maintaining data security, system performance, and compliance with healthcare regulations.
Migration Strategy

1. Assessment and Discovery
The first step was a detailed assessment of data, metadata, and user access:
- Data Audit: We identified and cataloged over 3 million patient records, appointments, and healthcare notes tied to the departing LoB. Additionally, over 5 million files (e.g., clinical documents and medical images) were analyzed for migration.
- Knowledge Articles: Analyzed 10,000+ healthcare knowledge articles, including medical protocols and compliance documentation, ensuring appropriate segregation and migration.
- User and Role Audit: Reviewed the roles, profiles, and permissions of the 500 users tied to the departing LoB to ensure proper deactivation or reassignment.
- Shared Configurations: Conducted a comprehensive review of shared workflows, automations, and data integration points to assess their relevance and impact on the remaining LoBs.
2. Data Segregation and Migration
Data Segregation:
- Segregated healthcare data, including patient records and appointments, from shared records in the system. This required careful handling of data that spanned across multiple LoBs, particularly shared patient records and clinical history.
- Migrated millions of records, ensuring that no critical data was lost or duplicated during the process.
File and Knowledge Article Handling:
- Migrated over 5 million files (including medical images and documentation) while ensuring compliance with healthcare data regulations.
- Segregated and deactivated knowledge articles specific to the departing LoB while retaining important articles for the remaining LoBs, ensuring no impact on compliance protocols.
3. User Deactivation and Cleanup
User Deactivation:
- Deactivated 500 users related to the departing LoB, including healthcare staff and external partners. Removed all associated roles, permission sets, and profiles to ensure that no unauthorized access remained.
- Audited and reassigned licenses where necessary, ensuring the remaining LoBs continued uninterrupted access to the platform.
Profile and Permission Cleanup:
- Removed obsolete profiles and permission sets that were no longer relevant post-migration, ensuring a clean and secure environment for the remaining LoBs.
4. Code, Configuration, and Test Class Adjustments
Code and Configuration Review:
- Refactored Apex classes, triggers, and workflows that were shared across multiple LoBs, ensuring they functioned correctly after removing the logic tied to the departing LoB.
- Deactivated redundant components, such as unused workflows and automations, to streamline the org’s performance.
Test Class Updates:
- Maintained Test Coverage: Updated test classes to maintain Salesforce’s required 75% test coverage after removing or refactoring components related to the departing LoB. This safeguarded future deployments and ensured smooth functioning of existing processes.
5. Integration Management and Metadata Cleanup
Integration Management:
- Managed integration points with external systems to ensure continuity of data flow for the remaining LoBs, particularly with EHR platforms and external patient care systems. These integrations were updated to reflect the changes from the migration, ensuring no data loss or disruption to critical healthcare workflows.
Platform Events and Connected App Management:
- Reviewed and deactivated Platform Events that were no longer necessary, removing unnecessary system load. Additionally, any Connected Apps exclusive to the departing LoB were reviewed and removed, maintaining secure integration for the remaining LoBs.
6. Testing and Validation
Sandbox Testing:
- Performed extensive testing in sandbox environments to validate data integrity, the functionality of updated automations, and system performance. This allowed for a full validation before changes were deployed to the production environment.
User Acceptance Testing (UAT):
- Engaged healthcare administrators and key business users to perform user acceptance testing, ensuring that all processes, integrations, and automations continued to function correctly in the remaining LoBs post-migration.

Timeline
Phase 1: Assessment and Discovery (4 weeks)
- Conducted thorough audits of data, metadata, and user access, including shared integrations.
Phase 2: Data Segregation and Migration (5 weeks)
- Migrated millions of records and files, deactivated knowledge articles, and ensured compliance with healthcare regulations.
Phase 3: User Deactivation and Cleanup (3 weeks)
- Deactivated 500 users and removed related roles, profiles, and permissions.
Phase 4: Integration and Metadata Cleanup (2 weeks)
- Reviewed and deactivated unnecessary Platform Events, Connected Apps, and workflows.
Phase 5: Testing and Validation (2 weeks)
- Conducted extensive system and user testing to validate all changes.
Total Timeline: 16 weeks
Cleanup Options and Costs
Option 1: Comprehensive Cleanup (High Effort, Low Risk)
- Full removal of data, code, and integration dependencies, with extensive testing and validation.
- Cost: $$$$$ (high upfront effort, but minimal long-term risk)
- Effort: 400-450 man-hours
Option 2: Selective Deactivation (Moderate Effort, Moderate Risk)
- Deactivation of most components, with minimal removal and a focus on user deactivation and integration management.
- Cost: $$$$
- Effort: 250-300 man-hours
Option 3: Minimal Cleanup (Low Effort, Higher Risk)
- Minimal removal of components, focusing only on critical data migration and user deactivation.
- Cost: $$$
- Effort: 150-200 man-hours
- Risk: Higher risk of technical debt due to leftover components and metadata.
Outcome
- Seamless Data Migration: Successfully migrated over 3 million healthcare records, 5 million files, and thousands of knowledge articles with zero data loss.
- Maintained System Integrity: No disruption to system performance or critical integrations, ensuring continuous operation for the remaining LoBs.
- Secure User Cleanup: Deactivated 500 users, safely removing their roles and permissions, ensuring no lingering access to sensitive patient data.
- Optimized Test Coverage: Updated test classes and maintained over 75% test coverage, safeguarding future system deployments and releases.
Conclusion
Advantex’s strategic approach to LoB migration in a complex healthcare environment ensured minimal disruption, maintained critical healthcare operations, and preserved data security and compliance. By managing large-scale data migration, user deactivation, and shared metadata updates, Advantex delivered a risk-free solution tailored to the healthcare industry’s unique needs.