Skip to content

Salesforce Developer interview questions

100 real questions with model answers and explanations for Senior Platform Developer candidates.

See a Salesforce Developer resume example

Practice with flashcards

Spaced repetition · Hunter Pass

Questions

transactionsqueriesdata-model

I would use one bulk entry point per object and move all queries and writes outside record loops.

  • The handler collects Account and Product IDs, queries each object once, and computes changes in maps.
  • A unit-of-work layer groups inserts, updates, and deletes so the transaction spends a few DML statements, not 200.
  • Tests submit 1 and 200 Opportunities and assert both outcomes and Limits consumption.

Why interviewers ask this: The interviewer is checking whether the candidate can turn governor limits into a bulk transaction design with measurable headroom.

triggersflowownership

I would give one automation layer ownership of each field and align its behavior with Salesforce's fixed execution phases.

  • Flow Trigger Explorer orders record-triggered Flows only within the same timing category; it does not position them around Apex.
  • Before-save Flows run before before triggers, while after triggers run before after-save Flows; every re-entry path is documented against that sequence.
  • A 200-Case performance test and field-ownership matrix gate any new automation.

Why interviewers ask this: A strong answer separates responsibilities across Flow and Apex instead of relying on accidental order of execution.

transactions

I would keep only the invariant-critical updates in the original transaction and move independent side effects after commit.

  • Opportunity, quote, and reservation changes that must agree use one bulk synchronous service.
  • Notifications, analytics, and external synchronization publish an event or enqueue work only after the save succeeds.
  • Each asynchronous consumer is idempotent and exposes a retryable failure state rather than extending the user transaction.

Why interviewers ask this: The question tests whether the candidate can distinguish atomic business invariants from side effects that should fail independently.

salesforcetriggersapex

I would standardize one trigger per object with ordered handlers and shared bulk services.

  • Handlers receive collections and maps, declare their phase, and never query or perform DML inside a record loop.
  • Domain services own reusable rules, while selectors centralize SOQL shapes and security mode.
  • CI rejects a second trigger on an owned object and runs 200-record contract tests for every handler chain.

Why interviewers ask this: The interviewer wants a maintainable ownership model that still protects limits as several teams extend the same objects.

recursionapextransactions

I would make side effects idempotent by business transition and guard only recursion that is currently active.

  • The handler updates a field only when the calculated target value differs from the stored value.
  • Each side effect uses a durable key containing the Account ID and business transition or version, so a retry returns the existing outcome.
  • If an in-memory guard is still needed, it adds an execution key on entry and removes it in a finally block; tests cover 2 re-entry paths across 200 records.

Why interviewers ask this: The interviewer is checking that an Account ID plus phase history does not suppress a legitimate later transition and that only active recursion is blocked.

batchasync-apexconcurrency

I would choose Batch Apex for the large queryable set, while designing recovery explicitly rather than assuming failed work resumes.

  • A QueryLocator streams the target set, and successful scopes commit independently.
  • Batch Apex has no built-in resume from a failed scope, so the job persists record outcomes or checkpoints and explicitly resubmits failed records.
  • Scope sizes from 100 to 500 are load-tested for CPU, locks, recovery cost, and the 45-minute deadline.

Why interviewers ask this: The interviewer is evaluating whether the async primitive fits the workload and whether independent Batch transactions have an explicit recovery path.

queriesdesign

I would start from a selective indexed predicate that matches the agents' real partition of the data.

  • Query Plan confirms cardinality, leading operation, and relative cost against production-like volumes.
  • I would combine indexed filters such as RecordTypeId, status, date range, or a justified custom index and avoid leading wildcards.
  • Pagination uses a stable indexed key such as CreatedDate plus Id instead of OFFSET over millions of rows.

Why interviewers ask this: The answer should show evidence-driven LDV query design, not a generic request to add an index.

queries

I would compare candidate plans and rewrite unless the leading operation is selective and stable at production cardinality.

  • I inspect cardinality, sObject cardinality, leading operation type, fields used, and relative cost.
  • I test each predicate separately to find the filter that forces a table scan or weakens the index path.
  • The release gate records plan evidence and p95 runtime on a full-volume sandbox, not only the row count returned.

Why interviewers ask this: The interviewer is checking that selectivity decisions use Query Plan evidence and representative data distribution.

I would remove the single parent as the write and ownership hotspot rather than trying to tune around it.

  • Contacts are partitioned across meaningful intermediate parents or regional Accounts where the domain permits.
  • Bulk loads are ordered by parent and concurrency is reduced for hot-parent updates.
  • Lock-wait metrics and failed-row results verify that the new distribution removes repeated UNABLE_TO_LOCK_ROW errors.

Why interviewers ask this: A strong answer addresses the skewed data model and write pattern, not just retries.

ownershipmigrations

I would distribute ownership before loading and separate technical attribution from record ownership.

  • A deterministic rule spreads records across active queue or user owners that match the business model.
  • The integration identity remains in audit fields or an external source field instead of owning every row.
  • A rehearsal measures sharing recalculation and lock rates at 10%, 50%, and full projected volume.

Why interviewers ask this: The question tests whether the candidate recognizes ownership skew as a design problem visible before migration.

I would treat sharing recalculation as a capacity-controlled production change with a measured access window.

  • A full-volume sandbox rehearsal captures recalculation duration, lock pressure, and affected users.
  • The production change runs in a low-write window with conflicting bulk jobs paused and access probes running every 5 minutes.
  • Rollback criteria include missed 30-minute access SLA, sustained lock failures, or incorrect sample visibility.

Why interviewers ask this: The interviewer wants a rollout that accounts for asynchronous sharing work and validates actual user access.

asyncapexcapacity

I would reduce transaction count before requesting more capacity because the allocation is an org-wide shared resource.

  • I group work into bulk Queueables or Batch scopes instead of enqueueing one job per record.
  • Non-Apex integration traffic moves to Platform Events, Bulk API, or an external worker when those fit the contract.
  • A daily budget by producer alerts at 70%, 85%, and 95% of the current allocation.

Why interviewers ask this: A senior candidate should manage async Apex as finite shared capacity and remove record-by-record fan-out.

concurrencydata-structuresapex

I would model a resumable state machine and enqueue only the next bounded unit of work.

  • Each job claims a chunk through a durable work record and writes a checkpoint before chaining.
  • The chain carries identifiers, not 50,000 serialized records, and failed chunks return to a capped retry queue.
  • Metrics expose stage age, attempts, and remaining chunks so operators can stop or resume the chain safely.

Why interviewers ask this: The question tests bounded orchestration, durable progress, and failure control across many asynchronous transactions.

batchasync-apexconcurrency

I would optimize for lock safety first, then raise throughput with measured scopes.

  • Records are partitioned and ordered by parent so two scopes do not compete for the same Account.
  • I benchmark scope sizes such as 50, 100, and 200 under realistic user writes and start serial if parent contention is high.
  • The accepted design must meet the 3-hour target while keeping lock failures below the agreed threshold.

Why interviewers ask this: The interviewer is looking for a quantified balance between batch throughput and live-transaction contention.

validationapibulk-api

I would choose Bulk API 2.0 when transformation can happen outside Salesforce and normal platform DML behavior is sufficient.

  • Bulk API writes still run validation rules, triggers, and applicable automation, so active automation alone is not a reason to choose Batch Apex.
  • Batch Apex is preferable when custom Apex transformation, Salesforce-side joins, or orchestration must run inside the org.
  • A 5,000-row rehearsal compares validation failures, automation cost, locks, reconciliation, and end-to-end runtime.

Why interviewers ask this: A strong answer chooses by where custom transformation and orchestration belong, while recognizing that both paths execute Salesforce DML automation.

rollback

I would pre-load immutable history, reserve the cutover for deltas, and make every relationship resolvable by external ID.

  • Bulk API 2.0 jobs load parent waves before children and reconcile all result files into a migration ledger.
  • Dual-run validation compares counts, financial totals, relationship samples, and rejected rows before users switch.
  • Rollback disables the new entry path and restores the last delta boundary rather than attempting to delete 8 million rows blindly.

Why interviewers ask this: The interviewer is evaluating cutover design, reconciliation, and a rollback boundary appropriate for a multi-million-row migration.

designeventsretention

I would define a versioned event envelope and make each subscriber persist its own processing position and business idempotency key.

  • The payload includes event version, source record ID, change ID, occurred time, and only fields needed by consumers.
  • Subscribers resume with stored replay positions but never interpret replay IDs as gap-free business sequence numbers.
  • Backlog age alerts well before 72 hours, and an API-based backfill covers recovery beyond retention.

Why interviewers ask this: The answer must distinguish transport replay position from business ordering and include recovery after retention expires.

events

I would make correctness depend on a source change identifier and version, not delivery order.

  • Each consumer atomically stores the last accepted entity version with the projected state.
  • Duplicate change IDs return success without repeating side effects, while older versions are ignored or quarantined.
  • A reconciliation job compares source and projection counts plus sampled hashes every 15 minutes.

Why interviewers ask this: The interviewer is checking explicit duplicate and ordering semantics rather than an assumption of exactly-once delivery.

feedback

I would attach origin and change identity outside the business payload and reject changes already applied by that destination.

  • A sync ledger keys source org, record external ID, and source change ID for idempotent apply.
  • Integration updates set a durable origin marker or use a middleware envelope so CDC consumers recognize echoes.
  • A 4-org loop test verifies one source change produces at most 3 destination writes and no return write.

Why interviewers ask this: A senior design needs durable loop prevention because transaction-local flags cannot coordinate several orgs.

schemaevents

I would make additions backward-compatible and route incompatible semantics through a new versioned contract.

  • Consumers ignore unknown optional fields and declare the oldest and newest versions they accept.
  • The producer dual-publishes during a measured migration window with volume and error metrics per version.
  • Version 1 retires only after all 7 teams show zero traffic for the agreed compatibility period.

Why interviewers ask this: The interviewer wants release independence backed by explicit compatibility and retirement evidence.

Locked questions

  • 21

    A partner REST API accepts 600 requests per minute and returns 429 above that rate; how would you integrate 40,000 daily Salesforce updates?

    restsalesforce
  • 22

    A mobile client must create an order and 24 child lines in 1 round trip; how would you use Composite API and choose allOrNone behavior?

    composite-api
  • 23

    An upstream warehouse sends 10 million Account updates nightly; how would you structure Bulk API 2.0 ingestion and reconciliation?

    bulk-apireactwarehouse
  • 24

    Twelve outbound integrations use 3 identity providers; how would you structure Named Credentials and External Credentials without embedding secrets in Apex?

    secretscredentialsnlp
  • 25

    A payment endpoint retries for 24 hours after timeouts; how would you guarantee idempotent side effects from Salesforce?

    resiliencesalesforceendpoints
  • 26

    Six regional Salesforce orgs exchange 1 million customer changes per day with a 5-minute SLA; what synchronization design would you implement?

    designsalesforceorgs
  • 27

    Fourteen orgs contain 3 conflicting customer identifiers; how would you establish record identity without merging orgs?

  • 28

    Twelve profiles access regulated Case data under a 15-minute revocation SLA; how would you separate sharing, CRUD, and FLS controls?

  • 29

    Three Apex services expose 40 Account fields to LWC users; when would you use user mode instead of system mode?

    lightningsystem-designapex
  • 30

    A compliance rule protects 6 sensitive fields and requires evidence for 7 years; how would you design access and audit behavior?

    design
  • 31

    An LWC grid must browse 20,000 Opportunities with first useful content under 2 seconds; what client and server design would you choose?

    gridlightningdesign
  • 32

    Five LWCs on 1 record page read overlapping fields and must reflect edits within 1 second; how would you use Lightning Data Service?

    lightning
  • 33

    A console app has 3,000 concurrent users subscribing to Case events; how would you prevent an LWC subscription design from overwhelming clients?

    lightningdesignconcurrency
  • 34

    A mobile LWC form exposes 100 fields but must become interactive within 1.5 seconds; how would you reshape it?

    formslightning
  • 35

    Forty routing rules differ across 5 orgs and change weekly; how would you use Custom Metadata without creating an opaque rules engine?

    metadata
  • 36

    A new pricing rule must roll out to 10% of 4,000 users before full release; how would you implement the feature control?

    pricing
  • 37

    Four teams maintain 12 unlocked packages that share Apex interfaces; how would you define package boundaries and ownership?

    typesapexownership
  • 38

    Eighteen unlocked packages ship on 3 release trains; how would you keep the dependency graph deployable?

    deploymentdependencies
  • 39

    A team of 25 developers needs Salesforce CI feedback within 30 minutes; which deployment gates would you design?

    designsalesforcedeployment
  • 40

    A release changes metadata and transforms 2 million records; what rollback design would you approve before deployment?

    designmetadatadeployment
  • 41

    Three teams move 40 work items per release through DevOps Center; how would you prevent hidden metadata dependencies?

    metadatadependencies
  • 42

    Production deployment requires at least 75% org-wide Apex coverage and every trigger to have coverage; what stronger test gate would you add for a 6-team codebase?

    triggersdeploymentcoverage
  • 43

    Two thousand Apex tests take 45 minutes and block 12 releases per week; how would you shorten feedback without hiding regressions?

    apex-testingfeedbackapex
  • 44

    Eight external endpoints participate in an order workflow; how would you test Apex callout behavior across 5 failure modes?

    endpointsapex
  • 45

    A synchronous Apex path has a 10-second CPU limit and serves 8,000 users; what observability would warn you before failures?

    observabilityapex
  • 46

    The Apex flex queue holds 100 Batch jobs while only 5 can be queued or active concurrently; how would you control 30 scheduled producers?

    concurrencydata-structuresapex
  • 47

    Platform Event consumers have a 15-minute recovery objective within 72-hour retention; which signals and runbook would you own?

    retentionrunbooksevents
  • 48

    Five partner integrations share a 99.9% success SLA and a 3-second p95 latency target; how would you make failures attributable?

    latency
  • 49

    Seven developers own 4 overlapping Account automations; what named review would you introduce to cut CPU p95 from 8 seconds to 5 seconds?

  • 50

    Six orgs run integrations on 3 Salesforce API versions and cannot upgrade in one release; how would you preserve compatibility?

    salesforceapi
  • 51

    A synchronous Opportunity trigger fails with SOQL 101 when it receives 200 records; what evidence do you collect and how do you remediate safely?

    queriestriggers
  • 52

    A Case import fails with DML 151 after a Flow release, although each transaction contains only 200 Cases; how would you handle the incident?

    transactionsdata-modelincidents
  • 53

    A synchronous service throws queried rows 50,001 while building a dashboard for 600 managers; what is your safe production fix?

  • 54

    After release 42, synchronous Account saves hit the 10-second Apex CPU limit at a 200-record batch size; walk through your response.

    batchapex
  • 55

    A synchronous REST service reaches the 6 MB Apex heap limit when 7,500 child records are serialized; how would you remediate it?

    data-structuresapexrest
  • 56

    An asynchronous Queueable fails at the 12 MB heap limit while parsing a 9 MB JSON response; what architecture change would you make?

    asyncdata-structuresarchitecture
  • 57

    A transaction attempts callout 101 while notifying 160 stores; how would you contain the failure and redesign delivery?

    transactions
  • 58

    Three sequential callouts consume the 120-second cumulative timeout in 1 Apex transaction; what is your incident decision?

    incidentstransactionsresilience
  • 59

    A trigger cascade tries to modify 10,001 rows in one transaction while closing 120 Opportunities; how would you fix it without partial business state?

    transactionstriggers
  • 60

    A synchronous trigger enqueues 51 Queueable jobs for 200 records and fails at the 50-job limit; how do you repair the fan-out?

    fan-outtriggersasync-apex
  • 61

    A Batch Apex migration updates 3 million Contacts, and 18,400 rows fail validation across 92 scopes; how do you recover safely?

    batchasync-apexmigrations
  • 62

    The Apex flex queue contains 87 Batch jobs, the oldest is 6 hours old, and 9 teams keep submitting work; what do you do first?

    data-structuresapexbatch
  • 63

    After release 31, Salesforce CPQ takes 94 seconds to recalculate a 1,200-line quote and 7% of prices differ; how do you handle the incident?

    soft-skillsincidentssalesforce
  • 64

    After 18 million Cases are loaded, a query regresses from 0.8 seconds to 14 seconds and Query Plan shows a table scan; how do you restore service?

    queries
  • 65

    A sharing-rule deployment makes 4,200 service agents lose Case access for 22 minutes; how do you contain and investigate it?

    deployment
  • 66

    A record-triggered Flow re-enters 6 times and doubles Case tasks for a 200-record transaction; how do you diagnose and prevent recurrence?

    triggersautomationflow
  • 67

    A billing subscriber processes 0.7% duplicate Platform Events and creates 340 duplicate invoices in 1 day; how do you remediate it?

    eventsconcurrency
  • 68

    A Platform Event subscriber has been down for 70 hours and retention is 72 hours; what recovery decision do you make in the first 15 minutes?

    retentionevents
  • 69

    Monitoring flags a jump from replay ID 8,240 to 8,247 as 6 missing Platform Events; how would you correct the diagnosis?

    eventsmonitoring
  • 70

    A Platform Event subscriber accumulates 25,000 events and lag rises from 2 to 35 minutes after a deploy; how do you isolate the bottleneck?

    trackingdeploymentevents
  • 71

    One Account update creates 6 CDC writes across 3 orgs before the loop stops; how would you prove and eliminate the feedback path?

    feedback
  • 72

    A partner starts returning 429 to 28% of 12,000 hourly REST requests after lowering its quota to 400 per minute; what do you change?

    rest
  • 73

    A 30-second REST timeout causes 76 duplicate shipments from 9,000 orders because retries use new keys; how do you recover?

    resiliencerest
  • 74

    After an OData 4.0 provider release, Salesforce Connect shows only 200 of 18,600 invoices because pagination links are invalid; how do you recover?

    salesforcepagination
  • 75

    A Bulk API 2.0 job for 4 million rows reports 98.7% success; what exact evidence is required before you call the migration complete?

    bulk-apimigrations
  • 76

    A migration ledger shows 2,500,000 source rows but only 2,497,320 Salesforce outcomes; how do you find the missing 2,680 rows?

    migrationssalesforce
  • 77

    During a 6-million-row migration, 41,000 child records cannot resolve parent external IDs; what is your deployment decision?

    migrationsdeployment
  • 78

    A deployment deletes a custom field still referenced by 14 Flows and holding data on 900,000 records; how do you contain it?

    deployment
  • 79

    Unlocked package B fails because package A version 3.4 removed an Apex interface used by 11 classes; how do you restore the release train?

    typesapex
  • 80

    Release 17 changes 65 metadata components and raises Case save errors from 0.2% to 6%; what rollback evidence do you need?

    componentsrollbackmetadata
  • 81

    A production validation reports 74.6% org-wide Apex coverage against the 75% deployment requirement; how do you respond under a 2-hour release window?

    validationdeploymentcoverage
  • 82

    Thirty of 1,800 Apex tests fail intermittently and force 4 validation reruns per week; how would you stabilize the gate?

    apex-testingvalidationapex
  • 83

    A with sharing Apex class exposes 5 salary fields to 230 users who lack FLS; how do you contain and fix the security leak?

    apex
  • 84

    A new role hierarchy gives 34 regional managers access to 7,200 confidential Investigation records despite Private sharing; how do you close the exposure?

  • 85

    A public Experience Cloud form lets guest users enumerate 1,840 application records during a 6-hour window; how do you contain and close the boundary?

    forms
  • 86

    A search LWC sends 14 Apex requests for a 14-character query, pushing hourly traffic to 2.1 million calls for 4,500 users; how do you reduce it?

    lightningqueriesapex
  • 87

    An LWC renders 8,000 rows, blocks the main thread for 4.6 seconds, and affects 1,200 users; what do you change first?

    lightningconcurrency
  • 88

    A console navigation release opens 4 duplicate Case tabs per action for 900 agents and raises browser memory by 38%; how do you repair it?

    memory
  • 89

    Two LWCs edit the same record within 500 ms and the older response overwrites the newer UI state; how do you prevent the race?

    state
  • 90

    A Custom Metadata change routes 38% of 15,000 daily Cases to the wrong queue; how do you recover and prevent recurrence?

    metadatadata-structures
  • 91

    A feature rollout to 25% of 6,000 users raises save-error rate from 0.4% to 3.2%; what is your deployment decision?

    deployment
  • 92

    After rotating 2 OAuth certificates, 7 of 18 Named Credential integrations return 401; how do you isolate and recover them?

    oauthcredentials
  • 93

    Twelve teams create 101 active Scheduled Apex jobs and the post-deploy scheduler fails against the org limit of 100; how do you restore capacity and prevent recurrence?

    capacitydeploymentapex
  • 94

    An ERP slowdown cuts MuleSoft delivery to 40 messages per second while Salesforce publishes 250, growing the backlog to 280,000 with 96-minute age; what do you change?

    backlogsalesforce
  • 95

    Release 52 removes 312 profile permissions, and 680 users lose access to 9 objects for 18 minutes; how do you lead recovery and coach the owner?

    linux
  • 96

    A developer's selector scans 11 million Opportunities and takes 19 seconds; how would you mentor through a named review and prove improvement?

    mentoring
  • 97

    Two developers added a 5th Account automation that raises SOQL p95 from 18 to 73 queries; what review and coaching do you lead?

    queries
  • 98

    A 47-minute integration incident lacked correlation IDs for 32% of failed requests; what concrete review would you run with 6 engineers?

    correlationincidents
  • 99

    A teammate proposes deleting 23 metadata components in the same release as 4 package upgrades; how do you lead the deployment review?

    componentsdeploymentmetadata
  • 100

    A junior engineer's 50,000-record migration loses evidence for 612 failed rows; how would you mentor them through recovery?

    mentoringmigrations