New to this track? Our Salesforce Certified Platform Developer exam prep is the required first step. See our certification path to understand where this certification fits. The Salesforce Certified Platform Developer II exam weights Process Automation, Logic, and Integration most heavily (27%), see the full breakdown, study tips, and practice questions below.
Free practice • No sign-up required
$200 exam • 70% passing score • Free practice
Independent study resource
Exam objectives and policies can change. Confirm current details with the certification issuer.
Check current objectives
Use the official exam guide as the source for current objectives and section weights.
Practice for learning
Use sample questions to review concepts and identify topics for further study.
Works on Any Device
Full practice experience on phone, tablet, or desktop
Free, No Sign-Up
Start practicing immediately, no account or email required
Salesforce Platform Developer II (PD2): Free Practice Exam & Study Guide (2026)
This exam tests advanced Apex: designing code that works in bulk, choosing the right asynchronous approach, integrating with outside systems, writing real tests, and keeping data secure. The exam is 60 scored questions in 120 minutes, with a 70% pass mark, weighted towards Process Automation, Logic, and Integration (27%) and User Interface (20%).
Required Prerequisite
You must complete this certification before attempting this one.
| Official exam name and code | Salesforce Certified Platform Developer II (PD2) |
|---|---|
| Questions | 60 |
| Time allotted | 120 min |
| Passing score | 70% |
| Exam fee | $400 |
| Retake fee | $100 |
| Prerequisite certifications | Salesforce Certified Platform Developer |
| Study guide release | Summer '26 |
Salesforce Certified Platform Developer II Exam Weightage by Section
1. Advanced Developer Fundamentals (15%)
15%2. Process Automation, Logic, and Integration (27%)
27%3. User Interface (20%)
20%4. Testing, Debugging, and Deployment (20%)
20%5. Performance (18%)
18%Exam Topics
Last updated:
Who is the Platform Developer II exam for?
- Mid-senior developers: You write Apex most weeks and want to show you can design well, not just make code work.
- Platform Developer I holders: You have PD1 and want the next step in the developer track.
- Tech leads: You review other people's Apex and make the design calls on a team.
Exam Fees & Registration
Exam Fee
$200
One-time registration fee
Retake Fee
$100
If you need to retake the exam
Comparing certs? View all Salesforce exam fees in one place →
Certification Validity
Maintenance and renewal requirements vary. Check the issuer’s current credential page for requirements that apply to you.
How to Register
Check current Salesforce Certified Platform Developer II (PD2) credential and registration details with the issuer.
View official credential detailsOfficial references: Use the issuer’s current materials to confirm exam objectives, format, and fees before booking.
Official sources: Exam guide·Salesforce exam pricing·Independent exam-prep resource; details may change.
Exam Tips
- 1Architecture and Logic are heavily weighted, design patterns, trigger frameworks, async Apex.
- 2Know when to use Queueable, Batch, Future, and Scheduled Apex.
- 3Understand namespaced packages, unlocked packages, and dependency management.
- 4Be ready for “how would you design?” and “what is the best approach?” questions.
Prerequisites
- •Salesforce Certified Platform Developer
- •2+ years development experience
Focus Areas
- •Architecture and Design Patterns
- •Advanced Apex and LWC
- •Testing and Deployment
- •Integration
Study Strategy
Focus on design and best practices, not just syntax.
Review trigger frameworks, dependency injection, and package development.
Practice explaining trade-offs.
Exam Format and First-Attempt Readiness
The Salesforce Certified Platform Developer II exam has 60 questions in 120 min, passing score 70%. Most Salesforce exams test scenario-based decisions. Focus on when to use each feature, not just terms.
- Study Process Automation, Logic, and Integration and User Interface first, together they carry 47% of the exam.
- Do timed question sets. Build pacing and confidence.
- Review why wrong answers are wrong. It improves scenario reasoning.
- Book the exam once your mock scores are steady at 80%+.
Is the Platform Developer II Exam Hard?
Is the Platform Developer II Exam Hard?
PD2 is one of the harder Salesforce exams. It assumes you can read Apex and reason about it, so there is little to memorise. Most questions describe code or a requirement and ask which approach is correct in bulk, under governor limits, and when something fails.
- 60 multiple-choice questions in 120 minutes, which is longer than most non-architect exams.
- 70% to pass, about 42 correct answers. That is a higher bar than PD1.
- Code reasoning. Expect to be shown logic and asked what happens with 200 records, or after a retry.
- Check the guide for extras. Salesforce has at times paired this credential with hands-on requirements, so confirm the current ones in the official exam guide.
Pass Rate Guidance
Most people who pass have a couple of years writing Apex daily. Before you book. Aim for 80% or more on practice tests, and make sure you can write a trigger handler and a batch class from memory.
Platform Developer II Exam Format Explained
Platform Developer II Exam Format Explained
You can take the exam online with a proctor or at a test centre. Here is what to expect:
Total Questions
60 scored questions
Time Limit
120 min
Passing Score
70%
Question Type
Multiple-choice & multiple-select
How Many Questions Are Scenario-Based?
Many questions give you a short piece of logic or a requirement and ask which approach is right. The most common pattern is code that works for one record and fails for 200, where you pick the fix.
Best Way to Pass on Your First Attempt
- Write everything in bulk: No queries or DML inside loops, collect records and act once. Half the wrong answers break this rule.
- Know the async options apart: Future methods, Queueable, Batch and Scheduled Apex each have different limits and uses. Queueable is the one that chains and keeps state.
- Learn the common patterns: One trigger per object with a handler class, and separating queries from business logic.
- Test like the exam does: Create your own data, mock callouts, and use Test.startTest and Test.stopTest so async work actually runs.
Platform Developer II: Key Concepts
Designing Apex That Scales
Most PD2 questions come back to one idea: code must work for 200 records as well as one. Never put a SOQL query or a DML statement inside a loop. Query once into a map, work in memory, then update once at the end. Use one trigger per object that calls a handler class, so the order of operations is clear and the logic can be tested on its own. Keep queries selective on large objects, since a filter on an unindexed field will time out once the table is big. Know the key limits by heart: 100 SOQL queries, 150 DML statements, 50,000 records retrieved, and 10,000 records per DML in a synchronous transaction.
Asynchronous Apex: Picking the Right One
Future methods are the simplest. They take only primitive parameters, cannot be chained, and give you no job ID to track. Queueable is the usual modern choice: it accepts objects, returns a job ID, can be chained to run one job after another, and can hold state. Batch Apex processes large volumes in chunks, each chunk with its own governor limits, which is how you touch millions of records. Scheduled Apex runs on a timetable and usually just starts a batch job. Async transactions get higher limits, for example 200 SOQL queries and a longer CPU allowance, which is often the reason to move work off the main transaction.
Integration: Callouts, Named Credentials and Events
A trigger cannot make a callout directly. Move the work to a future method marked for callouts or, better, to a Queueable. Store endpoints and credentials in Named Credentials so no secret appears in code. Remember the limits: 100 callouts per transaction and 120 seconds total. For loose coupling, publish a Platform Event and let subscribers react, which means the publisher does not fail when a subscriber is down. Change Data Capture sends field-level changes automatically. In tests, callouts must be mocked with Test.setMock, because tests cannot reach the network.
Testing: Data, Mocks and Coverage
Tests must build their own data. Use @TestSetup to create it once for all methods in the class, and avoid SeeAllData, which makes tests depend on whatever happens to be in the org. Wrap the code under test in Test.startTest and Test.stopTest, which resets limits and forces queued async work to run before you assert. Mock callouts with HttpCalloutMock, and use Test.isRunningTest sparingly. You need 75% coverage to deploy, but coverage is not the goal: assert the result, test the bulk case, and test the failure case.
Security in Apex: Sharing, Field Access and Exposure
Apex runs in system mode by default, which ignores the user's record access. With sharing makes a class respect the user's sharing, without sharing ignores it, and inherited sharing takes whichever applies to the caller. Sharing does not cover fields: check field-level security with Security.stripInaccessible or WITH USER_MODE so a user cannot read or write a field they should not see. Use WITH SECURITY_ENFORCED in SOQL where it fits. Any method marked @AuraEnabled is reachable from the front end, so validate its input and check access inside it.
Choose by data volume and chaining needs: @future for simple fire-and-forget calls with primitive parameters, Queueable when you need chaining or complex object parameters, and Batch when processing more records than fit in one transaction.
How to Pass the Salesforce Platform Developer II Exam
Most questions give you code or a requirement and several approaches that look reasonable. The right answer is nearly always the one that still works in bulk, respects limits, and fails safely.
Bulk Safety First
If an option has a query or DML inside a loop, it is wrong. Collect into collections and act once.
Choosing an Async Option
Objects as parameters, chaining or job tracking means Queueable. Millions of records means Batch. A timetable means Scheduled.
Integration Decisions
Callouts leave triggers through async Apex. Named Credentials hold the endpoint and auth. Platform Events decouple publisher from subscriber.
Trigger Design
One trigger per object, logic in a handler class, and no recursion. This is the pattern the exam expects.
Test Design
Build your own data, mock callouts, wrap in start and stop test, and assert the outcome rather than chasing coverage.
Is the Salesforce Certified Platform Developer II (PD2) Exam Hard?
DifficultyChallenging; plan about 8-16 weeks of focused prep.
Book When ReadyScore 80%+ on three timed mocks before scheduling.
Use Practice, Not DumpsOriginal practice questions build skill without risking your credential.
Exam format: 60 questions, 120 min, 70% passing score.
Salesforce Certified Platform Developer II Practice Questions (With Explanations)
Test your knowledge with these 15 sample questions . Click on an answer to select it, then check your answer to see if you're correct.
Question 1: Which design pattern is recommended for creating a single instance of a class that can be reused throughout the transaction?
Key takeaway: The Singleton Pattern ensures only one instance of a class is created and provides a global point of access to it.
Show correct answer and explanation
Correct answer: B. Singleton Pattern
The Singleton Pattern ensures only one instance of a class is created and provides a global point of access to it.
- Factory Pattern creates objects of varying types based on input, but doesn't guarantee a single reusable instance.
- Decorator Pattern adds behavior to an object dynamically; it doesn't restrict instantiation to one instance.
- Strategy Pattern swaps interchangeable algorithms at runtime, it's about behavior, not instance control.
Question 2: What is the purpose of the @TestSetup annotation?
Key takeaway: @TestSetup creates test data once at the beginning of the test class, and that data is available to all test methods, improving test performance.
Show correct answer and explanation
Correct answer: D. To create test data once that can be used by all test methods in the class
@TestSetup creates test data once at the beginning of the test class, and that data is available to all test methods, improving test performance.
- @TestSetup creates real records via DML, not mocks, mocking external callouts requires HttpCalloutMock instead.
- @TestSetup has no effect on governor limits; each test method still runs under standard limits.
- @TestSetup does not affect test parallelization, that's controlled separately via test class settings.
Question 3: Which approach should be used to make callouts from a trigger?
Key takeaway: Callouts cannot be made directly from triggers.
Show correct answer and explanation
Correct answer: B. Use @future(callout=true) method
Callouts cannot be made directly from triggers. Use @future(callout=true) or Queueable with Database.AllowsCallouts to make asynchronous callouts.
- Database.executeBatch starts a batch job asynchronously but doesn't itself make an HTTP callout, you'd still need callout logic inside the batch's execute method.
- Triggers cannot make callouts directly: Salesforce throws a runtime error because triggers run inside an existing transaction that can't be safely suspended.
- Platform Events solve pub/sub messaging, not the specific restriction on synchronous callouts from trigger context.
Question 4: What is the benefit of using Platform Events over traditional triggers for integration?
Key takeaway: Platform Events provide loosely coupled, asynchronous communication between systems, making integrations more scalable and maintainable.
Show correct answer and explanation
Correct answer: A. Loosely coupled, asynchronous communication
Platform Events provide loosely coupled, asynchronous communication between systems, making integrations more scalable and maintainable.
- Platform Events are asynchronous by nature, so they're not faster for real-time execution, the benefit is decoupling, not speed.
- Platform Events don't inherently lower governor limits, they run under standard Apex limits like any other transaction.
- Error handling isn't better by default with Platform Events; failed subscribers still need their own retry/error logic.
Question 5: Which interface should be implemented to allow a batch job to be chained?
Key takeaway: To chain batch jobs, you call Database.
Show correct answer and explanation
Correct answer: C. Finish method with Database.executeBatch
To chain batch jobs, you call Database.executeBatch in the finish method of the current batch job to start the next batch.
- Database.Stateful only preserves instance variable values across batch execute calls; it has nothing to do with chaining to a new job.
- Database.Batchable is the interface a batch class implements, but implementing it alone doesn't chain jobs.
- Database.AllowsCallouts permits HTTP callouts inside a batch job; it doesn't enable chaining to another batch.
Question 6: What is the purpose of the Database.Stateful interface in batch Apex?
Key takeaway: Database.
Show correct answer and explanation
Correct answer: A. To retain instance variable values between batch executions
Database.Stateful preserves instance variable values across batch iterations.
- Database.Stateful has no effect on execution speed, its purpose is state retention, not performance.
- Database.Stateful does not bypass or raise governor limits, each batch chunk still runs under normal limits.
- Database.AllowsCallouts is the separate interface needed to permit callouts in batch Apex.
Question 7: Which design pattern helps decouple trigger logic from business logic?
Key takeaway: Trigger Handler pattern separates trigger logic from business logic for maintainability.
Show correct answer and explanation
Correct answer: C. Trigger Handler pattern with service classes
Trigger Handler pattern separates trigger logic from business logic for maintainability.
- Factory alone handles object creation logic, not the separation of trigger and business logic layers.
- Decorator alone adds behavior to objects dynamically, it's unrelated to organizing trigger-to-handler flow.
- Singleton alone controls instance creation; it doesn't structurally separate trigger code from business logic.
Question 8: What is the benefit of using Queueable Apex over @future?
Key takeaway: Queueable supports chaining, complex parameters, and job ID tracking.
Show correct answer and explanation
Correct answer: C. Chaining jobs, passing complex types, and getting job IDs
Queueable supports chaining, complex parameters, and job ID tracking.
- Queueable Apex has the same governor limits as @future in most respects, lower limits isn't the actual benefit.
- Queueable isn't inherently faster than @future; both run asynchronously on the same execution model.
- Queueable Apex runs asynchronously, just like @future; it does not run synchronously.
Question 9: Which security consideration applies when exposing Apex to LWC?
Key takeaway: Apex exposed to LWC must enforce FLS and sharing rules.
Show correct answer and explanation
Correct answer: D. Use @AuraEnabled with proper FLS and sharing checks
Apex exposed to LWC must enforce FLS and sharing rules.
- Apex exposed to LWC always requires enforcing security; 'no security needed' is never correct for user-facing code.
- Sharing alone is insufficient; field-level security must also be enforced so users can't see restricted fields.
- FLS alone is insufficient; sharing rules must also be respected so users only see records they're permitted to access.
Question 10: What does the Strategy pattern enable?
Key takeaway: Strategy pattern allows swapping algorithms at runtime.
Show correct answer and explanation
Correct answer: B. Interchangeable algorithms encapsulated in separate classes
Strategy pattern allows swapping algorithms at runtime.
- Single instance control describes the Singleton pattern, not Strategy.
- Event handling is a separate concern (often solved with Observer pattern), not what Strategy addresses.
- Object creation is the concern of creational patterns like Factory, not Strategy.
Question 11: Which governor limit applies to heap size in Apex?
Key takeaway: Heap: 6 MB sync, 12 MB async (approximate).
Show correct answer and explanation
Correct answer: D. 6 MB for synchronous, 12 MB for asynchronous
Heap: 6 MB sync, 12 MB async (approximate).
- 1 MB is far below the actual synchronous heap limit of 6 MB.
- 6 MB applies only to synchronous Apex, asynchronous contexts get a higher limit, so this option is incomplete.
- Apex heap size is never unlimited; Salesforce enforces strict limits to protect the multi-tenant platform.
Question 12: What is the purpose of Test.isRunningTest()?
Key takeaway: Test.
Show correct answer and explanation
Correct answer: A. To conditionally alter logic when code runs in test context
Test.isRunningTest() detects test context for mock responses or conditional logic.
- Test.isRunningTest() doesn't skip tests; it lets code branch its behavior when running inside a test context.
- It has no effect on execution speed; it's a conditional check, not a performance optimization.
- It doesn't bypass governor limits; those still apply identically whether or not code is running in a test.
Question 13: Which interface allows Apex to be invoked by Process Builder or Flow?
Key takeaway: InvocableMethod exposes Apex to Flow and Process Builder.
Show correct answer and explanation
Correct answer: C. InvocableMethod
InvocableMethod exposes Apex to Flow and Process Builder.
- @AuraEnabled exposes Apex methods to Lightning components (LWC/Aura), not to Flow or Process Builder.
- @RestResource exposes Apex as a REST web service endpoint, unrelated to Flow invocation.
- A plain trigger cannot be invoked directly by Process Builder or Flow; it only fires on DML against its object.
Question 14: What is a common use case for Platform Events?
Key takeaway: Platform Events enable loosely coupled, event-driven architectures.
Show correct answer and explanation
Correct answer: A. Decoupling integrations, logging, and cross-org messaging
Platform Events enable loosely coupled, event-driven architectures.
- Batch processing is handled by Batchable Apex, a different mechanism from event-driven Platform Events.
- Scheduled jobs are handled by the Schedulable interface, not Platform Events.
- Platform Events are inherently asynchronous, they don't apply to synchronous-only trigger scenarios.
Question 15: Which approach improves Apex test performance?
Key takeaway: @TestSetup creates data once for all test methods, improving performance.
Show correct answer and explanation
Correct answer: B. Use @TestSetup for shared data
@TestSetup creates data once for all test methods, improving performance.
- Creating data in every test method duplicates DML work and slows down the whole test class, the opposite of the correct approach.
- Minimal assertions might make a test file shorter, but it doesn't affect execution performance and reduces test quality.
- SeeAllData=true is discouraged because it ties tests to org data and can cause unpredictable, slower, and fragile test runs.
Get the Full PD2 Question Bank
Most candidates book the exam after scoring 80%+ on full mocks.
If you’re planning to test this quarter, aim to complete full mocks at least 10–14 days before your exam date.
Contact us for more information on our full 60-question mock exams and a personalized study plan. Use the contact form.
Request Mock Exams & Study PlanSalesforce Certified Platform Developer II (PD2) Exam FAQs
- What is covered on the Salesforce Certified Platform Developer II (PD2) exam?
- The Salesforce Certified Platform Developer II (PD2) exam (formerly Salesforce Certified Platform Developer II) covers section-wise weightage as shown above. Use the exam topics and practice questions on this page to align your study with the official outline.
- What is the difference between Platform Developer I and Platform Developer II?
- Platform Developer I focuses on basic Apex, LWC, and testing. Platform Developer II covers advanced topics like design patterns, architecture, advanced Apex, async processing, and package development. You need PD1 first.
- How difficult is Platform Developer II compared to Developer I?
- Platform Developer II is significantly more challenging. It requires deep understanding of design patterns, architecture decisions, advanced Apex concepts, and best practices. Most candidates need 2+ years of development experience.
- What is the PD2 passing score and exam fee in Summer '26?
- The Platform Developer II (PD2) exam has 60 multiple-choice questions, 120 minutes, and a passing score of 70%. The exam fee is $200 USD (retake $100 USD). PD1 certification is a mandatory prerequisite, you cannot sit PD2 without it.
- What design patterns are tested in Platform Developer II?
- PD2 tests applied knowledge of: Singleton (one instance per transaction), Strategy (swappable algorithms), Decorator (extending behaviour), Factory (object creation patterns), and Service Layer / Selector / Domain patterns (FFLib enterprise architecture). Expect scenario questions where you must choose the right pattern for a given constraint.
Next Certifications After Developer
Good next steps after Platform Developer II:
Honest Cert Breakdown
Difficulty: Expert
5/5The hardest Salesforce developer exam. Apex design patterns, performance optimization, advanced SOQL, complex LWC. Most candidates need 3–6 months after PD1.
Salary Range
$115,000–$158,000 / year
US average for certified professionals • Updated Summer '26 • Source: Salesforce Talent Ecosystem
Is it worth it?
Strong signal for senior developer roles. Fewer than 10% of Salesforce developers hold this, differentiation value is high.
PD2 Exam at a Glance
60
Questions
120 min
Time Limit
70%
Passing Score
$200
Exam Fee
PD1 certification required. 120-minute time limit (longer than most Salesforce exams, code-reading questions take more time). Retake fee: $100.
PD2 Exam Sections and Weightage
Design Patterns (25%) + Testing & Debugging (25%) = 50% of the exam. These two sections are where PD2 candidates most often fail; they are purely advanced technical topics not covered in PD1.
Apex Enterprise Patterns (Selector, Service, Domain, Unit of Work), Singleton, Strategy, Decorator patterns applied to Apex, separation of concerns
Advanced test isolation, mocking HTTP callouts (HttpCalloutMock), testing async Apex (Test.startTest/stopTest), testing mixed DML, debug log analysis, query plan tool
REST and SOAP callouts from Apex, Named Credentials, platform events, streaming API, external services, inbound REST API (Apex REST)
SOQL query optimisation, selective queries and indexes, heap size management, CPU limit optimisation, Async Apex for long-running operations
Source-driven development (SFDX), scratch orgs, unlocked packages, second-generation packaging, CI/CD pipeline concepts
What Each Section Actually Tests
Design Patterns (25%)
The foundation of PD2. Apex Enterprise Patterns (AEP): Selector layer (all SOQL queries, centralises data access, enforces field-level security checks), Domain layer (business logic tied to an SObject type, validates, defaults, and enriches records), Service layer (orchestrates business processes across multiple objects), Unit of Work (manages all DML in bulk at the end of a transaction to prevent partial commits and governor limit issues). Other patterns: Singleton (prevent duplicate initialisation of expensive objects, e.g., a configuration class loaded once per transaction), Strategy (interchangeable algorithm implementations behind a common interface), Decorator (wrap an existing class to add behaviour). Know how to identify which pattern solves a given architectural problem, the exam presents a scenario and asks which pattern is most appropriate.
Testing and Debugging (25%)
Advanced testing: Test isolation with @TestSetup (runs once, shares data across all test methods), Test.loadData() for CSV-based test data. HTTP callout mocking: HttpCalloutMock interface, implement respond() and register with Test.setMock(HttpCalloutMock.class, mock). Testing async Apex: wrap the enqueue call between Test.startTest() and Test.stopTest(): stopTest() forces async execution to run synchronously so you can assert results. Mixed DML errors: cannot insert setup objects (User, Group) and non-setup objects (Account, Contact) in the same transaction, wrap setup DML in a System.runAs() block. Debug log analysis: read EXECUTION_STARTED → SOQL queries (with row counts) → DML statements → EXCEPTION events to diagnose runtime issues.
Integration (23%)
Apex callouts: Http, HttpRequest, HttpResponse for REST; WebServiceCallout.invoke() for SOAP. Cannot make callouts from triggers (they are synchronous DML context). Use a future method or queueable. Named Credentials: store endpoint URL and authentication credentials securely, use callout:NamedCredentialName/path in the endpoint URL. Platform Events: define fields on a Platform Event object, publish with EventBus.publish(), subscribe with triggers or flows. High-volume platform events have at-least-once delivery. Apex REST: expose Apex as a REST API using @RestResource(urlMapping=’/v1/myEndpoint/*’) and @HttpGet, @HttpPost, etc. annotations.
Performance (18%)
SOQL selectivity: queries are selective when the WHERE clause uses indexed fields (Id, Name, ExternalId, unique fields, or custom indexed fields) and filters enough records (generally <10% of the object’s records or <200k records). Non-selective queries on large objects cause timeouts. Query Plan tool: shows whether Salesforce will use an index (low cost) or a full table scan (high cost) for a query. Heap size: 6 MB synchronous / 12 MB async, avoid storing large collections in static variables across transaction boundaries. CPU limit: 10,000 ms synchronous, avoid nested loops over large collections; prefer Maps over repeated list iteration. Async for long-running work: Queueable (chaining, passing complex state), Batch Apex (process millions of records), Scheduled Apex (time-based execution).
Developer Experience (10%)
SFDX / Salesforce CLI: source-driven development using sf project retrieve and sf project deploy. Scratch orgs: temporary, configurable orgs for development and testing, created from a project definition file, last 1–30 days. Unlocked Packages: 2nd-generation packages that are modular, versionable, and source-tracked. Unlike managed packages (ISV), unlocked packages are for org-specific development. Know the difference between 1GP (first-generation, subscriber-opaque), 2GP unlocked (org-internal, source-trackable), and 2GP managed (ISV distribution with namespace). CI/CD: understand the concept of automated pipeline: pull request → scratch org → run tests → deploy to sandbox → promote to production.
8-Week PD2 Study Plan
Week 1–2: Design Patterns (25%): Study the Apex Enterprise Patterns framework. Read the Force.com Enterprise Architecture book chapters on Selector, Domain, Service, and Unit of Work. Implement the full AEP stack for one object (Opportunity) in a Developer Edition org. Study Singleton, Strategy, and Decorator patterns with Apex code examples.
Week 3–4: Testing & Debugging (25%): Write tests for HTTP callouts using HttpCalloutMock. Write tests for async Apex (Queueable, Batch) using Test.startTest/stopTest. Practice resolving mixed DML errors. Analyse 3 different debug logs to identify performance bottlenecks and exceptions.
Week 5: Integration (23%): Build a REST callout to an external API using Named Credentials. Create a Platform Event and subscribe to it with a trigger. Expose an Apex REST endpoint and test it with Workbench. Study streaming API concepts.
Week 6: Performance (17%): Use the Query Plan tool to analyse 5 different SOQL queries. Refactor a nested loop pattern to use Maps. Write a Batch Apex class that processes 1M records. Profile a Queueable chain using debug logs.
Week 7: Developer Experience (10%): Create a scratch org from a project definition file. Deploy metadata using SFDX CLI commands. Study unlocked package versioning concepts. Review CI/CD pipeline concepts.
Week 8: Full timed mock exams (60 Q / 120 min). Score 80%+ consistently. PD2 questions often present code snippets, practice reading Apex code quickly and identifying the specific issue.
How to Approach PD2 Scenario Questions
- Design pattern questions: Questions describe an architectural problem and ask which pattern to apply. Selector = centralise SOQL. Domain = object-level business logic. Service = cross-object process orchestration. Unit of Work = bulk DML. When a scenario says “reduce code duplication in queries across multiple classes,” the answer is Selector. When it says “ensure all DML for a transaction runs together or not at all,” the answer is Unit of Work.
- Async Apex selection questions: Future method = simple fire-and-forget, no chaining, primitive parameters only. Queueable = complex state (objects as parameters), chainable, one chain at a time. Batch = process large datasets (up to 50M records), configurable batch size. Scheduled = time-based execution. When a scenario needs to process 5M records nightly, the answer is Batch + Scheduled. When it needs to make a callout after a trigger, the answer is Future (or Queueable if state is needed).
- Performance questions: When a query is timing out on a large object, the first diagnostic step is the Query Plan tool, check if the query is selective. If not selective: add an index to the filter field, or restructure the query to use indexed fields. CPU limit violations: look for nested loops over large collections, refactor to Maps. Heap limit: avoid storing large SObject lists in static variables or Queueable instance variables that persist between chain links.
Readiness Check Before You Book
80%+ on 3 timed full mocks (60 Q / 120 min) before booking
PD2 has a higher failure rate than most Salesforce certifications. The most common failure modes are: (1) insufficient hands-on design pattern implementation, studying AEP conceptually is not enough, you must implement it; (2) underestimating the integration section, callout mocking, Named Credentials, and Platform Events require practical experience; (3) skipping the Query Plan tool, performance questions are consistently missed by candidates who have never used it.
Top 10 Topics to Review the Day Before
- AEP layers: Selector (SOQL), Domain (business logic), Service (orchestration), Unit of Work (DML)
- HttpCalloutMock: implement respond(), register with Test.setMock() in test methods
- Testing async Apex: wrap in Test.startTest/stopTest to force synchronous execution
- Mixed DML: User + Account in same transaction = error; fix with System.runAs()
- Named Credentials: secure endpoint + auth storage; use callout:Name/path in endpoint
- Future vs Queueable vs Batch: fire-and-forget vs chainable+complex-state vs large-dataset
- Platform Events: publish with EventBus.publish(), subscribe with trigger on EventName__e
- SOQL selectivity: use indexed fields in WHERE clause; check with Query Plan tool
- Unlocked packages vs managed packages: internal org use vs ISV distribution
- Apex REST: @RestResource(urlMapping) + @HttpGet/@HttpPost on global static methods
Practice With Real Exam-Style Questions
Apply this study guide with free PD2 practice questions:
Where to Go Next
After this certification, consider: Platform Developer II, Platform App Builder, or JavaScript Developer I.
Topic Difficulty Heatmap
Which topics are a gimme vs which ones trap confident candidates. Use this to prioritise your final-week revision. These are our own topic groupings for study planning, not the official exam sections, those and their weightings are in the credential's exam guide.
| Topic | Difficulty | Study Tip |
|---|---|---|
| Data Modeling | Moderate | Advanced data model patterns and large data volume, know governor limits and best practices. |
| Architecture | Hard | Design patterns, platform limits, and when to use async vs sync, scenario-heavy. |
| Logic and Process Automation | Trap ⚠ | Invocable methods, triggers, and queueable, execution order and context are commonly tested. |
| User Interface | Moderate | LWC best practices and accessibility. Know when to use @api vs @track. |
| Testing and Deployment | Hard | Test design and coverage requirements, meaningful assertions and negative testing. |
| Integration | Moderate | REST, callouts, and platform events, know limits and error handling. |
Difficulty based on analysis of common candidate errors across each exam section.
Ready to Test Your Knowledge?
Try the Platform Developer II (PD2) free practice exam, scored with full explanations.
Platform Developer II (PD2) Free Practice Exam →Fast Facts: PD2 Actually Focus Areas
- Not just Apex syntax: PD2 expects enterprise-grade design patterns: trigger frameworks, Separation of Concerns (SoC), and selector/domain/service layers.
- Integration depth: REST and SOAP callouts with Named Credentials, HttpCalloutMock, WebServiceMock, and proper error handling patterns.
- Async Apex mastery: Batch, Queueable, Schedulable, and Platform Events are tested at implementation depth, not just awareness level.
High-Weight PD2 Exam Sections to Prioritise
The top three sections account for 76% of the exam. Focus your first four weeks here.
Scenario Strategy: How to Approach PD2 Questions
PD2 questions describe a technical requirement or architectural problem and ask which pattern, mechanism, or configuration is the right solution. The correct answer always follows enterprise design principles, separation of concerns, testability, and scalability.
- For async questions: choose the mechanism based on volume and latency. Queueable = chaining + object context; Batch = millions of records; Schedulable = time-based; Platform Events = decoupled integration.
- For integration questions: REST callouts use Named Credentials and HttpCalloutMock in tests; SOAP uses WebServiceMock. Always pick the mock that matches the callout type.
- For design pattern questions: if the scenario describes multiple objects or cross-object logic, the answer involves a Service layer or Selector layer, not a trigger directly.
Advanced Apex Patterns You Must Know
PD2 questions test whether you understand why patterns exist, not just that they exist. For each pattern, know: when to use it, what problem it solves, and what the anti-pattern looks like.
- Trigger framework (handler pattern): One trigger per object, logic in handler class, no business logic in trigger itself.
- Selector / Domain / Service layers: Separation of Concerns for enterprise Apex. Know what each layer owns and why mixing them creates bulk API failures.
- HttpCalloutMock and WebServiceMock: Every integration test needs a mock. PD2 tests whether you mock correctly, not just whether tests pass.
- Platform Events and CDC: Decoupled architecture for async integration. Know when to use PE vs Queueable vs Batch.
How to Know You’re Ready
PD2 has a lower first-attempt pass rate than PD1. Use this minimum benchmark:
80%+ on 3 timed full mocks, only then book
Unlike PD1, scoring 70% in mocks is not sufficient for PD2, the real exam is harder in the integration and design-pattern sections. Be conservative.
3 Concepts That Fail Most Platform Developer II (PD2) Candidates
These are not the hardest topics; they are the ones where candidates are most confidently wrong. Learn the distinction early.
1. Apex Design Patterns: Separation of Concerns in Trigger Architecture
PD2 tests Apex design patterns: Trigger Handler pattern separates trigger logic from the trigger file. Service Layer pattern contains reusable business logic. Selector pattern centralises SOQL queries. Domain Layer validates and processes records. Candidates write all logic directly in Apex triggers, the exam expects Trigger Handler pattern at minimum, and asks which layer a specific piece of logic belongs in.
2. Asynchronous Apex: Future vs Queueable vs Batch vs Scheduled
@future: runs one asynchronous method, no chaining, no state. Queueable: like @future but supports chaining, object parameters, and monitoring. Batch: processes large data volumes in chunks (up to 50M records). Scheduled: executes on a cron-like schedule. Candidates use @future for all async operations, the exam expects Queueable when chaining is needed, Batch for large data sets, and Scheduled for recurring jobs.
3. Platform Cache: Partitioned Storage That Does Not Persist Across Deployments
Platform Cache stores computed values (formula results, complex SOQL outputs) in an in-memory cache with a defined TTL, reducing repeated computation. Org Cache is shared across all users; Session Cache is user-session-specific. Cache is NOT persistent; values are lost on deployment, maintenance, or TTL expiry. Candidates design Platform Cache as a permanent data store, the exam expects fallback logic to regenerate values on cache miss.
FAQs From Candidates
- What is the PD2 exam format?
- The Platform Developer II (PD2) exam has 60 multiple-choice questions, a 120-minute time limit, a 70% passing score, and a $200 fee. It requires PD1 certification as a prerequisite.
- What are the highest-weight PD2 exam sections?
- Apex and the Salesforce Platform (28%), Process Automation and Logic (25%), and Debugging, Testing, and Deployment (23%) together account for 76% of the PD2 exam. Mastering these three sections is essential to pass.
- How hard is the PD2 exam compared to PD1?
- PD2 is significantly harder than PD1. It tests advanced design patterns (trigger frameworks, selector/domain/service layers), complex REST/SOAP integrations, and asynchronous Apex. Most candidates need 12–18 months of real Apex project experience after PD1 before attempting PD2.
- How should I prepare for the PD2 exam?
- Build real Apex projects using enterprise design patterns (Separation of Concerns, trigger frameworks). Practice REST and SOAP callouts with Named Credentials and HttpCalloutMock. Study Platform Events and the Streaming API. Take timed mocks. Aim for 80%+ consistently before booking.
- What concepts do most Platform Developer II (PD2) candidates get wrong?
- The most commonly misunderstood topics for the Platform Developer II (PD2) exam are: (1) Apex Design Patterns: Separation of Concerns in Trigger Architecture; (2) Asynchronous Apex: Future vs Queueable vs Batch vs Scheduled; (3) Platform Cache: Partitioned Storage That Does Not Persist Across Deployments. Candidates are most confidently wrong on these. Learn the distinctions early to avoid losing marks on questions you expect to get right.
- Why do most PD2 candidates fail questions about Apex Design Patterns?
- PD2 tests Apex design patterns: Trigger Handler pattern separates trigger logic from the trigger file. Service Layer pattern contains reusable business logic. Selector pattern centralises SOQL queries. Domain Layer validates and processes records. Candidates write all logic directly in Apex triggers, the exam expects Trigger Handler pattern at minimum, and asks which layer a specific piece of ...
- Why do most PD2 candidates fail questions about Asynchronous Apex: Future vs Queueable vs Batch vs S...?
- @future: runs one asynchronous method, no chaining, no state. Queueable: like @future but supports chaining, object parameters, and monitoring. Batch: processes large data volumes in chunks (up to 50M records). Scheduled: executes on a cron-like schedule. Candidates use @future for all async operations, the exam expects Queueable when chaining is needed, Batch for large data sets, and Schedule...
- Why do most PD2 candidates fail questions about Platform Cache?
- Platform Cache stores computed values (formula results, complex SOQL outputs) in an in-memory cache with a defined TTL, reducing repeated computation. Org Cache is shared across all users; Session Cache is user-session-specific. Cache is NOT persistent; values are lost on deployment, maintenance, or TTL expiry. Candidates design Platform Cache as a permanent data store, the exam expects fallb...
Keep Studying
Start PD2 Prep
Apply these tips with real exam-style practice:
After this exam, consider Platform Developer II or Platform App Builder next.
Share or cite this study guide
Free to link from a forum post, study repo or article. Copy the Markdown and paste it anywhere.