INTEGRATION-ARCHITECTURE-DESIGNER practice question 7 of 25
The director of customer service at Northern Trail Outfitters (NTO) wants to capture and trend specific business events that occur in Salesforce in…
Full set: 106 questionsDomain Evaluate the Current System Landscape
This scenario requires capturing two types of business events in real-time: those initiated by record creation (a customer creating a Case) and those initiated by a specific user action (a rep clicking a menu item). Platform Events provide a scalable, decoupled, and real-time mechanism to broadcast these events to external subscribers, such as an analytics system.
- Option C addresses the events triggered by Case creation. An after insert trigger on the Case object is the standard mechanism to execute logic upon record creation, and from this trigger, a Platform Event can be published.
- Option D addresses the events triggered by user interface clicks. A custom menu item would invoke a custom Apex controller, which can then publish the appropriate Platform Event. Combining these two solutions creates a comprehensive and robust event-driven integration.
A. Case after insert Trigger that executes a callout. This creates a tightly coupled integration. A synchronous callout in a trigger would cause the user's transaction to wait for the remote system's response and fail if the endpoint is down.
B. Case Workflow Rule that sends an Outbound Message. Outbound Messages are triggered by record creation or updates, not by UI actions like a menu click. This option only solves half of the requirement and is a legacy automation tool. ---
1. Platform Event Developer Guide, "Publish Platform Events": This guide details the methods for publishing Platform Events. It explicitly states, "You can publish event messages from Apex... For example, you can publish an event message in an Apex method or a trigger." This directly supports using both a trigger (Option C) and another Apex class like a controller (Option D) to publish events.
2. Apex Developer Guide, "Triggers": The section on "Trigger and Bulk Request Best Practices" implicitly supports using triggers for actions related to record events. The guide also contains a section on "Callouts from Triggers," which warns that callouts must be asynchronous to avoid holding the database connection open, making a direct, synchronous callout (Option A) a poor pattern.
3. Salesforce Integration Patterns and Practices, "Fire and Forget": This official Salesforce whitepaper describes the "Fire and Forget" integration pattern, which is ideal for this use case. It lists Platform Events as a recommended solution for notifying external systems of an event in Salesforce without needing to wait for a response. This validates the architectural choice of Platform Events (Options C and D) over a request-response callout (Option A).
4. Lightning Web Components Developer Guide, "Call Apex Methods": This guide explains how a UI element, such as a custom button or menu item implemented as a Lightning Web Component, can invoke a method in an Apex controller. This is the mechanism that enables the solution described in Option D, where a UI click triggers the publication of a Platform Event via an Apex controller.
Keep practicing
Take the free INTEGRATION-ARCHITECTURE-DESIGNER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other INTEGRATION-ARCHITECTURE-DESIGNER practice questions
- Question 1Northern Trail Outfitters has a requirement to encrypt few of widely used standard fields…
- Question 2An Integration Developer is developing an HR synchronization app for a client. The app sy…
- Question 3Northern Trail Outfitters submits orders to the manufacturing system web-service. Recentl…
- Question 4Customer is evaluating Platform Events solution and would like help in comparing/contrast…
- Question 5Universal Containers (UC) is a large printing company that sells advertisement banners. T…
- Question 6A large consumer goods manufacturer operating in multiple countries is planning to implem…
