SF-PD2 Process Automation, Logic, and Integration Practice Question
An enterprise application requires integrating an external REST API that frequently times out. A developer needs to implement a robust outbound callout mechanism in Apex that handles asynchronous execution while supporting complex retry policies and transactional state management. Which architectural approach best meets these requirements?
⚠ Common exam trap
Candidates often default to future methods, which lack the ability to chain jobs or handle complex object states, making them insufficient for robust enterprise-grade retry logic.
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
✓
Create a Queueable Apex class implementing Database.AllowsCallouts, leveraging custom retry logic and job chaining when a timeout occurs.
Queueable Apex implementing Database.AllowsCallouts is the optimal choice for asynchronous HTTP callouts in Salesforce. It supports chaining jobs, passing complex data types as member variables, and provides robust error handling compared to future methods. Mastering asynchronous processing patterns ensures application resilience and prevents governor limit violations during high-volume enterprise integrations.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Write a @future(callout=true) method that processes the request and executes a synchronous retry loop upon catching a timeout exception.
Why it's wrong here
Future methods are limited to primitive data types as parameters, preventing the passage of complex sobject collections or stateful objects. Furthermore, implementing retry loops inside a single transaction risks hitting CPU time limits and blocking the execution thread unnecessarily.
- ✗
Implement a Schedulable class that executes every minute, querying an integration staging table and performing synchronous HTTP callouts.
Why it's wrong here
Schedulable classes run synchronously and are bound by strict governor limits, making them poor candidates for high-volume network calls. Polling staging tables via scheduled jobs introduces unnecessary latency and database overhead compared to event-driven asynchronous execution.
- ✓
Create a Queueable Apex class implementing Database.AllowsCallouts, leveraging custom retry logic and job chaining when a timeout occurs.
Why this is correct
Queueable Apex supports complex object serialization, making it ideal for passing large payloads to external services. Implementing the Database.AllowsCallouts interface permits HTTP requests, and job chaining allows developers to implement sophisticated back-off and retry mechanisms safely.
- ✗
Use an InvocableMethod inside a Flow to invoke a synchronous callout immediately when the user updates the source record.
Why it's wrong here
Invocable methods called from record-triggered flows execute synchronously within the database transaction. Performing HTTP callouts synchronously blocks the user interface, risks transaction rollbacks if the external service fails, and violates Salesforce best practices for external integrations.
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 →
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.