Salesforce Certified Integration Architect — Question 55
A company that is a leading provider of courses and training delivers courses using third-party trainers. The trainer for the company has to be verified by 10 different training accreditation verification agencies before providing training for the company. Each training accreditation agency has its own response time, which means it could take days to confirm a trainer.
The company decided to automate the trainer accreditation verification process by integrating it with the agency's web services.
What is the recommended approach to automate this process?
Answer options
- A. Make an Apex callout using @future annotation to make the callout to all different agencies. The response should update the trainer status to “verified”.
- B. Use middleware to handle the call out to the 10 different verification services, the middleware will handle the business logic of consolidating the verification result from the 10 services, then make a call-in to Salesforce and update the verification status to “verified”.
- C. Create a trigger on the trainer record to make a callout to each verification agency’s, write business logic to consolidate the verification then update the trainer status to “verified”.
- D. Use Salesforce External Service to make the call out; Salesforce External Service should check the verification agencies until the result is verified, then update the trainer status to “verified”.
Correct answer: B
Explanation
Option B is the most effective as it uses middleware to manage multiple callouts and consolidate results, enhancing efficiency and reducing complexity. Option A is less optimal because using @future may not effectively handle multiple callouts due to governor limits. Option C relies on a trigger which may lead to issues with bulk processing and limits. Option D depends on Salesforce External Service, which may not be the best fit for managing complex logic across multiple agencies.