Courseiva

SF-PD2 Process Automation, Logic, and Integration Practice Question

A developer is designing a solution where an external system must be notified in near real-time when a custom object record is created or updated. The external system exposes a REST endpoint that accepts JSON payloads. The solution must be scalable and minimize Salesforce governor limit consumption. Which approach is most appropriate?

⚠ Common exam trap

The trap here is assuming that Outbound Messages or synchronous callouts are suitable for real-time REST/JSON integrations, when Platform Events offer better scalability and decoupling.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use Platform Events to publish an event when the record changes, and have an external subscriber listen and call the external endpoint.

Platform Events enable a scalable, asynchronous, near real-time integration pattern. Publishing an event from Salesforce and having the external system subscribe decouples the systems and avoids governor limit issues. Synchronous callouts in triggers are risky, Batch Apex is not near real-time, and Outbound Messages are SOAP-based and less flexible. The event-driven approach is the most appropriate for this scenario.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Use Outbound Messages to send the record data to the external endpoint.

    Why it's wrong here

    Outbound Messages are a declarative way to send data to an external endpoint, but they are SOAP-based and do not support JSON payloads natively. They also have limitations in scalability and error handling. While they can be used for near real-time, they are not ideal for REST/JSON integrations and may not meet the scalability requirement. Thus, they are not the best choice here.

  • ✗

    Create a trigger on the custom object that makes a synchronous callout to the external endpoint.

    Why it's wrong here

    Synchronous callouts in triggers can cause performance issues and may hit governor limits, especially under high volume. They also increase transaction time and can lead to timeouts. Additionally, triggers cannot make callouts after DML operations in the same transaction. This approach is not scalable and is generally discouraged for near real-time notifications to external systems.

  • ✗

    Schedule a Batch Apex job to run every 5 minutes to query updated records and call the external endpoint.

    Why it's wrong here

    Batch Apex is designed for large data volumes and runs asynchronously, but it is not near real-time. A 5-minute schedule introduces latency and may not meet near real-time requirements. Also, batch jobs consume governor limits for each batch, and querying for updates can be inefficient. This approach is better for bulk data synchronization, not for immediate notifications.

  • ✓

    Use Platform Events to publish an event when the record changes, and have an external subscriber listen and call the external endpoint.

    Why this is correct

    Platform Events provide a scalable, asynchronous messaging mechanism. When a record is created or updated, a trigger or Flow can publish a Platform Event. An external system can subscribe to the event via CometD or Pub/Sub API and then process the event, calling its own REST endpoint. This decouples Salesforce from the external system, minimizes governor limits, and supports near real-time delivery. It is the recommended pattern for this scenario.

About these practice questions

This SF-PD2 question is part of Courseiva's 226-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Salesforce exam blueprint

This SF-PD2 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-PD2 exam.