Courseiva

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

A developer is designing a Platform Event-driven integration where an external system publishes order events and Apex subscribers update Order records. The team wants to guarantee that a transient downstream outage does not silently drop events, while also preventing duplicate order updates when the same event is redelivered. (Choose two.)

⚠ Common exam trap

The trap here is believing that Platform Events deliver exactly once, so no idempotency logic is needed in the subscriber.

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

✓

Make the Order update idempotent by keying on a unique event identifier stored on the Order, and skip the update if that identifier is already recorded.

Durability across an outage comes from persisting the last processed replayId and resubscribing from it, which replays events still inside the retention window. Because delivery is at least once, duplicate suppression must be handled in the consumer, and idempotent updates keyed on a unique event identifier accomplish that without relying on transport guarantees.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Increase the event delivery allocation by purchasing additional Platform Event add-on capacity so that redelivery cannot occur.

    Why it's wrong here

    Additional capacity raises the volume of events and deliveries the org can handle, but it does not change the at-least-once delivery semantics of Platform Events. Redelivery can still happen after a subscriber error or reconnect, so buying capacity does not address duplicate updates and is not a correctness mechanism.

  • ✓

    Make the Order update idempotent by keying on a unique event identifier stored on the Order, and skip the update if that identifier is already recorded.

    Why this is correct

    Platform Events deliver at least once, so a redelivered event can trigger the same update twice. Recording a unique event identifier on the Order and checking it before updating makes the handler idempotent, which neutralizes duplicates regardless of how many times the event is delivered within the retention window.

  • ✓

    Subscribe with a CometD client using the replayId of -1 and persist the last processed replayId, resubscribing from that stored replayId after a disconnect.

    Why this is correct

    Storing the last successfully processed replayId and resubscribing from it lets the subscriber resume after a disconnect without skipping events still within the retention window. Replay from a specific ID is the mechanism that bridges transient outages, and persisting the ID ensures the resume point survives a client restart rather than defaulting to new events only.

  • ✗

    Configure the subscriber to use replayId -2 so that only new events are received, and rely on the external publisher to resend anything missed.

    Why it's wrong here

    ReplayId -2 means new events only, so anything published during the outage is never delivered to this subscriber. Delegating retransmission to the publisher shifts responsibility and assumes the publisher tracks per-subscriber state, which is fragile and can itself produce duplicates if the publisher resends blindly.

  • ✗

    Use a Streaming API push topic on the Order object instead of a Platform Event so that only committed changes are streamed and duplicates are impossible.

    Why it's wrong here

    Push topics stream record changes rather than arbitrary event payloads, so they do not fit a design where the external system publishes order events. Switching the transport also does not guarantee exactly-once processing; subscribers can still reconnect and reprocess, so duplicates remain possible and the original design intent is lost.

About these practice questions

Courseiva writes every SF-PD2 question from scratch — 226 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.