6 months ago, my cell phone started to light up; it was late at night, and it takes three consecutive calls to come through for the phone to ring, and man, it was on fire. Calls, texts and a series of emails progressively getting stronger in the nature of alerting - an issue critical, system failure pending. I began to read the last communication first to see that my Salesforce CRM system was only now 2% away from completely crashing. I quickly got my team on the phone to understand what was going on and why. It was easy to see what was happening; we had run away code eating up all of the system's resources and was minutes away from being unrecoverable. I began by suspending and stopping all service from around the core data processing system, critical items, call centre data and call scheduling, and had team members calling the business owner. I remember telling Jason that I needed to shut down the call centre and I didn’t know when it could be back up and running. Jason was initially shocked but fully supportive of whatever we needed to do. I paused all services in the platform, and the runaway code started to slow down to a point we could stop the data progress loader. We got the systems down to 35% usage and removed triggers that were in turn activating further triggers, which had an immediate effect. We then started to bring back up services and the call centre in actual fact, when I rang Jason some 30 minutes later, he was relieved and excited that we were able to address the problem so quickly and again, I truly thank him for his partnership and his calming voice at the end of the phone. We have spent the last six months stabilizing this platform and removing bad code and misconfigurations out of the system. To enable me to get the best workable platform, I used Salesforces professional services team, who are the experts in their product we analyzed the system before we started working on it to see how bad or good the configurations were, we got a 42% bill of health this system needs to go to ER and ICU.

Today we have significantly improved the stability of the system and the way that it uses workflow to trigger the next business actions in the system. We have removed thousands of unused reporting pages and increased the performance capacity by over 75% allowing the core system to move and process data freely. We have not fixed every issue, but we certainly are in a better place today than we were six months ago.
Project outline - Salesforce Stabilization

Our team worked on stabilizing Salesforce functionality and supporting the most critical business functions by refactoring code that is either no longer needed or which does not follow the best practices or is not performant.
1) Reduce the Technical Debt around process automation loads
2) Improve the batch optimizations
3) Improve the code quality by removing the hard-coded ID and SOQL injection errors
4) Refactor the process builders, and workflows by converting them to Apex code and consolidating multiple triggers into one trigger.


Value & Benefits,
· Instituted a Quality Assurance program; we have documented the business workflow for the project object, understanding the prerequisites needed for each step of the process
· Instituted User Acceptance Testing
· Greatly improved statistics based on system logs
· Reduced Batch Apex max run time from 16 hours to 49 mins
· Fewer timeouts when the Sales Team hits the Go Solar button for PreSale to Salesforce Integration
· Reduced the number of calls to APIs for Project data integration
· Reduced SOQL limit from 74 to 0
· Improved error handling and scalability, and performance