I have developed a quote preview feature in Salesforce, using a Visualforce page that calls the Quote Document API, then uses the returned URL to retrieve the quote document to present to the user for review.
The problem is that it is slow - it can take ~25 seconds to make the two callouts to generate and then retrieve the PDF to display to the user.
I would like to address this by calling the Quote Document API as soon as the quote is created or edited, and then store the URL for the generated document on the Salesforce record. Then when the user invokes preview, I can just retrieve the PDF using the URL without having to generate it, saving time.
But I don't know for how long the generated URL from the Quote Document API is valid. What if my user creates a Quote, then does not preview it for a week? Will the URL still work?
Any other ideas as to how to make type of feature perform better would be welcome.
Solved! Go to Solution.