Northern Trail Outfitters leverages Sales Cloud. When an opportunity has changed its status to ''Closed/Won'' and there are products attached, the details should be passed to the OMS for fulfillment operations. The callout from Salesforce to the OMS should be synchronous. What should an integration architect do to satisfy these requirements?
A synchronous requirement in Salesforce implies a Request-Reply pattern where the user waits for a response. To implement this correctly while adhering to platform constraints, the architect must initiate the callout from the User Interface (UI) layer.3
Option C is the correct architectural choice. By using a Lightning component and a button (or a Quick Act4ion), the callout is initiated directly from the user's session. The component calls an Apex controller, which performs the synchronous REST callout to the OMS. This allows the user to receive immediate feedback---such as a 'Success' message or an 'Error' notification from the OMS---directly on the Opportunity page.
Option A is incorrect because Apex Triggers are prohibited from making synchronous callouts. If a trigger initiates a callout, it must be asynchronous (using @future or Queueable Apex), which violates the business requirement for synchronicity. Making a synchronous call from a trigger would block the database transaction and could lead to 'Uncommitted Work Pending' errors or system timeouts. Option B (Batch Apex) is inherently asynchronous and delayed; an hourly job would not provide the real-time, synchronous feedback required during the 'Closed/Won' transition. Therefore, moving the integration logic to a UI-driven button is the only way to satisfy the synchronous requirement while staying within Salesforce's execution and transaction limits.
Elfriede
14 days agoElly
19 days agoRikki
25 days ago