Courseiva

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

A developer is building a Flow that must invoke an external REST service to retrieve a customer's loyalty points. The external service requires a callout with a JSON body and returns a JSON response. The developer wants to use an External Service to simplify the integration. Which step must be completed before the Flow can use the External Service?

⚠ Common exam trap

Candidates often confuse External Services with traditional Apex callouts, which require Remote Site Settings and HttpCalloutMock for testing.

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

✓

Register the external service using a Swagger (OpenAPI) specification.

External Services allow declarative tools like Flow to call external REST services by importing an OpenAPI (Swagger) specification. This registration step generates the necessary Apex classes and invocable actions. Without registering the service, the Flow cannot reference its operations. The other options relate to authentication, testing, or traditional callout security, none of which are prerequisites for creating an External Service.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Create an Apex class that implements the HttpCalloutMock interface.

    Why it's wrong here

    HttpCalloutMock is used in Apex test classes to simulate callouts during testing; it does not enable a Flow to call an external service. While testing is important, it is not a prerequisite for using an External Service in a Flow. The developer would use HttpCalloutMock only when writing Apex tests for callouts, not when setting up the declarative External Service itself.

  • ✗

    Configure a Remote Site Setting for the external service endpoint.

    Why it's wrong here

    Remote Site Settings are required for Apex callouts to external endpoints, but External Services registered via Swagger/OpenAPI do not require a Remote Site Setting because they use the metadata-driven approach. The External Services framework handles the callout internally. While Remote Site Settings are common for traditional Apex callouts, they are not needed for External Services, making this option incorrect for the scenario.

  • ✓

    Register the external service using a Swagger (OpenAPI) specification.

    Why this is correct

    External Services in Salesforce are created by registering an external web service using a Swagger 2.0 or OpenAPI 3.0 specification. This generates Apex classes and Flow actions that can be used declaratively. The developer must first register the service in Setup, which parses the specification and exposes the operations as invocable actions. This is the required prerequisite before referencing the service in a Flow.

  • ✗

    Define a Connected App with OAuth settings for the external service.

    Why it's wrong here

    A Connected App is used when external systems need to authenticate to Salesforce, not when Salesforce calls out to an external service. External Services use Named Credentials or direct endpoints for authentication, but a Connected App is not required to register the service. The developer would configure authentication separately, such as through a Named Credential, but the Connected App itself is not the prerequisite.

About these practice questions

One of 226 original SF-PD2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.