256-724-8843
Contact Us Today

REVOLISM – APEX Code Troubleshoot and Cleanup

Background: REVOLISM is a recently-launched wellness and weight loss franchise providing clients with a program to revolutionize their metabolism and achieve wellness and weight loss goals. After unsuccessfully attempting to implement a franchisee management solution with Dynamics, REVOLISM switched to Salesforce. They originally worked with another Salesforce implementer for 8 months but terminated the relationship after a critical defect was discovered in the solution. REVOLISM then contracted with HigherEchelon to correct the defect.

Problem: Due to the complexity of the developed code, the customer requested that code refactoring be kept to a minimum to reduce the risk of breaking something elsewhere in the system.  Initially, sales tax calculations were failing to account for price discounts, resulting in a mistakenly high tax liability for the company. Apex unit tests didn’t validate any processing logic – they only ran through the code to achieve the required 75% code coverage. This meant that fixes had to be tested manually. Poor error handling resulted in some credit card transaction records not being saved, creating a situation for potential double-charging of the customer. Because of inefficient code, batch processing was failing due to SOQL limits being exceeded.

Solution: HigherEchelon first properly configured sandboxes for development and testing. We then corrected logic around sales tax calculations and franchisee cut calculations. Error handling was modified to allow for saving of as many records as possible during batch processing. In cases where an error occurred during batch processing, HE added logic to create a Case to handle the issue. Next, we corrected SOQL inefficiencies to ensure governor limits wouldn’t be reached during batch processing.  From a fit and finish perspective, we updated page layouts and created list views to give the customer easier access to critical information. Finally, we added logic to allow for fine-grained monitoring of REST-based interactions between Salesforce and Shipstation.