Case Study

Travel and Hospitality Company Optimizes Apex Classes

Apex Limits and Technical Debt

A large, multinational travel and hospitality company faced significant challenges managing their Salesforce org. Rapid growth, coupled with years of custom development, led to a sprawling and complex environment. Their Apex code base was nearing the 6MB limit, hindering future development. Technical debt was accumulating due to poorly written code, duplicate methods, and a lack of comprehensive testing, leading to performance bottlenecks and increased maintenance costs. The company struggled with:
  • Apex Limits: Approaching the 6MB limit for unpackaged Apex code, restricting future development.
  • Technical Debt: Accumulation of poorly written code, duplicate methods, and inadequate testing.
  • Performance Issues: Apex Triggers invoking too many Classes and Flows
  • Code Quality: Inconsistent code quality leading to bugs and security vulnerabilities.
  • Visibility: Lack of clear visibility into Apex Class dependencies and unused code.
  • Testing Gaps: Insufficient code coverage and a need for more robust testing strategies.
The travel company needed a solution to streamline their Salesforce org, reduce technical debt, and optimize Apex code management to ensure continued scalability and innovation.

Apex Class and Method Management

The company turned to Metazoa Snapshot, a comprehensive Salesforce org management platform, to address their Apex code challenges. Metazoa Snapshot provided a suite of tools and reports that enabled the company to gain control over their Apex environment. Key Metazoa Snapshot features utilized:

  • Forgotten Assets Report: Identified unused Apex Classes and Methods for decommissioning.
  • Duplicate Apex Methods Report: Located duplicate code blocks, enabling code consolidation and reducing overall Apex size.
  • Apex Code Quality Report: Leveraged PMD static code analysis to identify code quality issues and potential security vulnerabilities. Automated AI code fixes.
  • Code Coverage Report: Monitored code coverage to ensure adequate testing and identify areas needing improvement.
  • Org Health Scan Report: Flagged Apex Classes with excessive duplicate lines, those not recently executed, and potential trigger-related issues.
  • Profiles and Permissions Sets Report: Identified Apex Classes not enabled in any Profile or Permission Set, highlighting potential security risks.
  • Impact Analysis Report: Provided comprehensive dependency analysis to understand how Apex Classes are invoked and what other assets they reference.
  • Smart Deploy Interface: Tested deletions of Apex Classes to confirm they were not in use before permanent removal.
The company turned to Metazoa Snapshot, a comprehensive Salesforce org management platform, to address their Apex code challenges. Metazoa Snapshot provided a suite of tools and reports that enabled the company to gain control over their Apex environment. Key Metazoa Snapshot features utilized:

Implementation and Results

The travel and hospitality company implemented Metazoa Snapshot with the following steps:
  1. Comprehensive Analysis: They ran the Forgotten Assets, Duplicate Apex Methods, and Apex Code Quality reports to gain a clear understanding of their Apex code base.
  2. Code Cleanup: Based on the reports, they decommissioned unused Apex Classes and Methods, consolidated duplicate code, and addressed code quality issues identified by the AI-assisted Apex Code Quality Report.
  3. Improved Testing: They used the Code Coverage Report to identify areas with insufficient test coverage and implemented more robust Test Methods.
  4. Ongoing Monitoring: They scheduled regular Org Health Scans to proactively identify potential issues and maintain a healthy Apex environment.
  5. Managed Packages: Began a strategic migration of some functionality to Managed Packages to alleviate the Apex Limits problem.

Time and Cost Savings

By leveraging Metazoa Snapshot, the travel and hospitality company achieved significant improvements:
  • Reduced Apex Code Size: Decommissioned unused code and consolidated duplicate methods, reducing their Apex code footprint by 15% and freeing up valuable space for future development.
  • Improved Code Quality: Addressed code quality issues, resulting in a 20% reduction in bugs and a more stable Salesforce environment.
  • Enhanced Performance: Optimized Apex Triggers and improved code efficiency, leading to a 10% improvement in overall Salesforce performance.
  • Reduced Technical Debt: Proactively addressed technical debt, reducing maintenance costs by 12%.
  • Increased Developer Productivity: Gained better visibility into Apex dependencies and code quality, enabling developers to work more efficiently and effectively.
“Metazoa Snapshot has been instrumental in helping us manage our complex Salesforce org,” said the Salesforce Architect at the travel company. “The platform’s comprehensive reports and tools have enabled us to reduce technical debt, improve code quality, and optimize our Apex code base. We are now well-positioned to continue scaling our Salesforce environment and delivering innovative solutions to our customers.”

Conclusion

The travel and hospitality company’s success story demonstrates the power of Metazoa Snapshot in optimizing Salesforce orgs, reducing technical debt, and ensuring continued scalability. By leveraging Metazoa Snapshot’s comprehensive suite of tools, organizations can gain control over their Apex code, improve code quality, and drive significant time and cost savings. For companies facing Apex limits, technical debt, or performance challenges in their Salesforce environments, Metazoa Snapshot offers a powerful and effective solution.

Learn more about how Metazoa Snapshot can help your organization!

🎉 Congratulations! 🎉

You’ve successfully completed the Metazoa Metadata Studio Certification Class. With the skills you’ve acquired, you’re now adept at harnessing the power of Metazoa’s Metadata Studio, seamlessly integrating artificial intelligence into Salesforce org management. You have earned you a certificate! Well done, and we wish you continued success in your future endeavors!