Salesforce Certified Platform Developer II — Question 71
Sometimes events on Salesforce need to be handled by an external system due to the scale or type of process being executed. Consider the use case of a user in
Salesforce needing to get pricing for an order they are building in Salesforce while on the phone with a customer.
The pricing logic already exists in a third-party system. Instead of recreating this logic in Salesforce, it will be leveraged by making a request of the third-party system. The response, in this case the pricing, will be returned and stored back in Salesforce.
What is the optimal solution?
Answer options
- A. A Visualforce page that can make a real-time Apex callout to display and save the pricing back in Salesforce
- B. An Apex trigger that upon saving the Order will make a real-time Apex callout, saving the pricing back in Salesforce
- C. A Process Builder process and Outbound Message to fetch the pricing upon save and store the pricing in Salesforce
- D. An ETL tool to process batches of newly saved Orders every few minutes to store the pricing back in Salesforce
Correct answer: A
Explanation
The correct answer is A because a Visualforce page allows for real-time interaction with the user, enabling immediate pricing retrieval and storage back in Salesforce. Option B relies on an Apex trigger which may not provide the same user experience during the phone call. Option C, while functional, introduces delays since Process Builder and Outbound Messages are asynchronous. Option D uses an ETL tool, which is not suitable for real-time pricing needs as it processes data in batches, leading to latency.