Blogs

What are the Pot Holes in the road to a good PDO Experience?
- May 30, 2019
 - Owen Hughes
 
Protect against governor limits.
Without protection against breaching Governor Limits, a product will not pass Salesforce’s stringent checks, but how can avoiding these limits help to deliver a good PDO experience?

Rather than talk about technology, lets work through an example.
Let’s consider you have built a system that performs some kind of action on Opportunity records and for each OpportunityProduct line associated with the Opportunity. Internally within an organisation you have far more control and are able to predict with fair accuracy that your system will not break governor limits.
However, building an app for an ISV is quite different. You have to anticipate the worst case scenario of OpportunityProduct lines for a future customer which currently you don’t have.

The question is “do you set your limit to 20 lines, 50, 100 or higher still?”. The likelihood a company that has very big Opportunities is likely to be one of your largest customers is high and if they require 100 lines, whereas your limit is 50 you might lose this customer.
Whatever approach you take working within a multitenant cloud environment there will always be a very maximum limit; however, you can design in a way in order to accommodate most, if not all, realistic large Opportunities. For example, 1 option to solve our problem would be to intelligently decide to process the Opportunity in real time or to use an asynchronous process to process the very large Opportunities. At run time you could first check if your Opportunity has less than 50 lines, if it does, process the Opportunity in real time. If it is greater than 50 you could divert the processing to an asynchronous batch process.
This is just one example of thousands of scenarios you may encounter and as you can tell the amount of extra thought, design, development and testing to build an ISV app is far greater than building an internal app and there are many different approaches to achieve your objectives.
To find out more about the challenges and the potential Pot Holes have a read of this article or contact us to find out how we would approach different challenges. Or if you want to find out how we can help email Steven.Fouracre@metacube.com