Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Plat-Arch-204 Exam - Topic 1 Question 14 Discussion

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?
C) Build a Lightning component that makes a synchronous Apex REST callout to the OMS when a button is clicked.
A) Write a trigger that invokes an Apex proxy class to make a REST callout to the OMS.
B) Develop a batch Apex job that aggregates closed opportunities and makes a REST callout to the OMS hourly.

Salesforce Plat-Arch-204 Exam - Topic 1 Question 14 Discussion

Actual exam question for Salesforce's Plat-Arch-204 exam
Question #: 14
Topic #: 1
[All Plat-Arch-204 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: C

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.


Contribute your Thoughts:

0/2000 characters
Magdalene
3 days ago
Closed/Won opportunities need immediate OMS updates, so A makes sense.
upvoted 0 times
...
Winfred
8 days ago
Wait, can we really rely on triggers for this?
upvoted 0 times
...
Ashlyn
13 days ago
A synchronous callout is definitely needed here.
upvoted 0 times
...
Bettyann
18 days ago
I think B could work, but hourly seems too slow for fulfillment.
upvoted 0 times
...
Pilar
23 days ago
Option A is the best choice for real-time updates!
upvoted 0 times
...
Juliann
29 days ago
B) seems too slow for fulfillment needs, though.
upvoted 0 times
...
Misty
1 month ago
A) makes sense, triggers are designed for this!
upvoted 0 times
...
Corazon
1 month ago
Wait, can we really do synchronous callouts in Apex?
upvoted 0 times
...
Willow
1 month ago
I disagree, B) could work too, but it's not real-time.
upvoted 0 times
...
Ozell
2 months ago
A) is the best choice for synchronous callouts.
upvoted 0 times
...
Giuseppe
2 months ago
I recall that Lightning components can handle synchronous calls, but I wonder if that would be overkill for just passing opportunity details to the OMS.
upvoted 0 times
...
Serita
2 months ago
I feel like batch Apex might not be suitable here since we need real-time processing. I think it has to be immediate, right?
upvoted 0 times
...
Lenita
2 months ago
I think option A sounds familiar because we practiced a similar question about triggers and callouts, but I’m a bit hesitant about the implications of governor limits.
upvoted 0 times
...
Shaniqua
2 months ago
I remember we discussed the importance of synchronous callouts in class, but I'm not sure if a trigger is the best approach for this scenario.
upvoted 0 times
...

Save Cancel