Interview prep · written by the FindAJobAI team

Salesforce Developer Interview Questions (2026) and How to Answer

By FindAJobAI Team Updated How we wrote this page

Salesforce developer interviews test platform depth more than general coding puzzles. Expect questions on Apex and governor limits, trigger design, Lightning Web Components, asynchronous processing, sharing and security, testing and how you deploy between sandboxes.

Interviewers also want judgment: when to use Flow instead of code, how to work alongside admins, and how you clean up an org full of automation that nobody fully understands any more.

Below: 30 questions with what each one really asks and an answer outline, full sample answers to the 10 most asked, red flags to avoid and a 7-day plan.

Answering with STAR

Tell each story in four steps: the situation in a sentence, your task, the actions you took (most of the answer) and the result, with a number if you have one. Aim for about two minutes; the outlines show what to include, the details must be yours.

Behavioural questions (1–10)

How you've handled real situations. Answer each with one true story, in STAR order.

  1. 1.Tell me about a time you refactored automation that kept failing in production.

    What they're really asking: Can you untangle a fragile org without breaking the business processes that depend on it?

    Answer outline (STAR)

    • SituationAn object with several triggers and Process Builders written by different people.
    • TaskStop the recurring failures without changing what users relied on.
    • ActionMapped every automation on the object, wrote tests for current behavior, then consolidated into one trigger handler with async work moved out.
    • ResultThe failures that stopped, and how much easier later changes became.

    Full sample answer (fictional example)

    At my last client the case object had five triggers and two Process Builders written by different contractors. A nightly sync of around 40,000 records from the phone system kept failing on CPU time. I first mapped what each automation did and wrote tests that captured current behavior, so I'd know if I broke anything. Then I consolidated the triggers into one handler class, removed duplicate queries, and moved the slowest enrichment logic into a queueable job. The nightly failures stopped, and the admins said they could finally explain the case automation to new team members.

  2. 2.Describe a time you pushed back on building something in code.

    What they're really asking: Will you choose the simplest maintainable tool rather than writing Apex for everything?

    Answer outline (STAR)

    • SituationA request for a custom Apex solution that Flow or configuration could handle.
    • TaskDeliver the need in a way admins could maintain.
    • ActionShowed the requester a working Flow prototype and explained the maintenance cost of code.
    • ResultThe Flow that went live, and the admin team owning it without developer help.

    Full sample answer (fictional example)

    A sales manager asked for an Apex class to create follow-up tasks when opportunities reached a certain stage. I thought a record-triggered Flow could do it and that admins would want to adjust the rules later. I built a quick Flow prototype in a sandbox and showed it to the manager and the admin in a short call. I explained that code would mean a developer and a deployment for every rule change. They agreed to the Flow, it went live that week, and the admin has changed the rules three times since without asking me.

  3. 3.Tell me about a production incident you handled.

    What they're really asking: Do you stay methodical and communicate clearly when users are blocked?

    Answer outline (STAR)

    • SituationA deployment that caused errors on record saves for a sales team.
    • TaskRestore normal work quickly and find the root cause.
    • ActionChecked debug logs, identified the failing validation path, deployed a tested fix and kept the business informed.
    • ResultThe time to recovery and the test added to stop it happening again.

    Full sample answer (fictional example)

    After a release, sales reps started getting errors when saving opportunities. I checked the debug logs and found that a new validation helper assumed a field was always filled, but older records had it blank. I told the sales operations lead within fifteen minutes what was wrong and when to expect a fix. I wrote a null check and a test for blank values, ran it in a sandbox, and deployed the fix within about an hour. Afterwards I added a test data pattern for legacy records so we catch this kind of gap earlier.

  4. 4.Describe a time you worked closely with an admin or business analyst on a feature.

    What they're really asking: Can you collaborate across roles rather than working alone on tickets?

    Answer outline (STAR)

    • SituationA complex approval process the business wanted for discounts.
    • TaskSplit the work between configuration and code sensibly.
    • ActionAgreed which parts lived in Flow and approval processes and which needed Apex, and documented the design together.
    • ResultThe feature delivered on time, and the admin able to change thresholds without a deployment.
  5. 5.Tell me about a time you improved how your team releases changes.

    What they're really asking: Have you made the delivery process safer, not just shipped features?

    Answer outline (STAR)

    • SituationA team deploying with change sets and frequent post-release fixes.
    • TaskReduce release risk without slowing delivery.
    • ActionIntroduced source control, Salesforce DX projects and automated test runs before each merge.
    • ResultFewer hotfixes, and releases moved into working hours.

    Full sample answer (fictional example)

    When I joined, the team deployed with change sets built by hand on Friday evenings, and about one release in three needed a hotfix. I proposed moving to Salesforce DX projects in Git and started with one feature as a pilot. I then set up a pipeline that ran all tests against a scratch org on every pull request, plus a short review checklist. It took about two months to move everyone over. Hotfixes became rare, and we started releasing every two weeks during working hours instead of late on Fridays.

  6. 6.Tell me about a time you learned a new part of the platform quickly.

    What they're really asking: Can you get productive fast in an unfamiliar Salesforce product?

    Answer outline (STAR)

    • SituationA project needing Experience Cloud work when you'd only built for internal users.
    • TaskDeliver a partner portal feature within a sprint or two.
    • ActionCompleted focused Trailhead modules, built a prototype in a scratch org, and asked an experienced colleague to review it.
    • ResultThe portal feature launched, and the notes you wrote for the next developer.
  7. 7.Describe a time you disagreed with an architect's design.

    What they're really asking: Will you raise technical concerns respectfully and with evidence?

    Answer outline (STAR)

    • SituationA proposed integration relying on frequent polling that risked API limits.
    • TaskFind a design that met the need within platform limits.
    • ActionEstimated daily API calls from real volumes and proposed platform events as an alternative.
    • ResultThe revised design adopted, and API use well under the daily allowance.

    Full sample answer (fictional example)

    An architect proposed polling an external inventory system every minute from Salesforce. I was worried about API limits and load, so I estimated daily calls from real order volumes and found we'd use most of the allowance on polling alone. I brought the numbers to a design review and suggested the external system publish changes as platform events instead. The architect agreed after we checked the vendor could support it. The final design used a small fraction of the API allowance and updated stock faster than polling would have.

  8. 8.Tell me about a time you mentored an admin who wanted to code.

    What they're really asking: Do you help grow the team's skills, not just your own?

    Answer outline (STAR)

    • SituationAn admin interested in Apex but unsure where to start.
    • TaskHelp them deliver a real change safely.
    • ActionPaired on a small trigger change, reviewed their tests, and set weekly practice tasks.
    • ResultTheir first deployed change, and the certification they later passed.
  9. 9.Describe a time requirements changed late in a sprint.

    What they're really asking: Can you adapt without cutting corners on testing?

    Answer outline (STAR)

    • SituationA sales leader changing commission logic two days before release.
    • TaskDecide whether to include the change or defer it.
    • ActionEstimated the testing effort, explained the risk, and agreed to ship the original scope with the change in the next release.
    • ResultA clean release, and the change delivered a week later.
  10. 10.Tell me about the hardest bug you've tracked down in Salesforce.

    What they're really asking: Do you debug systematically when the cause isn't obvious?

    Answer outline (STAR)

    • SituationIntermittent duplicate records created during busy periods.
    • TaskFind and fix the cause without stopping the integration.
    • ActionCompared debug logs from failing and working cases and found two transactions racing on the same record.
    • ResultThe locking fix deployed, and duplicates that stopped appearing.

Technical and role-skill questions (11–22)

Can you do the work itself? Think out loud and name the trade-offs.

  1. 11.What are governor limits, and how do you write code that respects them?

    What they're really asking: This is the core platform constraint, so every interviewer checks it.

    Answer outline

    • Limits cap resources per transaction, such as SOQL queries, DML statements, CPU time and heap size.
    • Bulkify code by querying and updating in collections, never inside loops, and move heavy work to async Apex.

    Full sample answer (fictional example)

    I think of governor limits as Salesforce's way of sharing resources between all customers on the platform. Each transaction has caps, such as 100 synchronous SOQL queries, 150 DML statements, and limits on CPU time and heap size. To stay within them, I always write code for collections of records, never one at a time. I query once outside loops, store results in maps, and do one DML operation per list. When work is heavy, such as recalculating thousands of records, I move it to queueable or batch Apex and test it with at least 200 records.

  2. 12.How do you structure triggers on an object?

    What they're really asking: Tests whether you prevent the trigger sprawl that breaks orgs.

    Answer outline

    • Use one trigger per object that calls a handler class with methods per context.
    • Keep logic in handler or service classes, guard against recursion, and allow bypass during data loads.

    Full sample answer (fictional example)

    I use one trigger per object, and the trigger itself contains almost no logic. It calls a handler class with methods for each context, such as before insert or after update. The handler calls service classes that hold the business logic, which makes them easier to test and reuse. I add a recursion guard so updates don't re-fire the same logic, and a custom metadata switch that lets admins bypass the trigger during approved data loads. On my current org this pattern now covers every custom trigger.

  3. 13.When would you use a queueable job instead of a batch job or a future method?

    What they're really asking: Tests knowledge of asynchronous Apex options and their tradeoffs.

    Answer outline

    • Queueable jobs accept complex types, can chain jobs and return a job ID for monitoring.
    • Batch Apex suits very large record volumes processed in chunks, while future methods are older and more limited.
  4. 14.How do Lightning Web Components get data from Salesforce?

    What they're really asking: Tests modern front-end knowledge on the platform.

    Answer outline

    • Use Lightning Data Service and wire adapters for standard record data where possible.
    • Call Apex methods marked as cacheable for reads, or imperatively for updates, and handle errors in the component.
  5. 15.How do you enforce sharing and field security in Apex?

    What they're really asking: Tests security awareness that admins and auditors care about.

    Answer outline

    • Declare classes with sharing unless there's a clear reason not to.
    • Use user mode queries or security checks so field and object permissions are respected.
  6. 16.What makes a good Apex test class?

    What they're really asking: Tests whether you write tests that catch bugs, not just reach coverage.

    Answer outline

    • Create its own test data, test bulk cases of 200 records, and test both positive and negative paths.
    • Assert actual outcomes, and use start and stop test boundaries for async code.
  7. 17.How would you integrate Salesforce with an external order system?

    What they're really asking: Tests integration design, error handling and security.

    Answer outline

    • Choose the pattern based on timing needs, such as REST callouts, platform events or middleware.
    • Store credentials in named credentials, log failures and design retries so data doesn't duplicate.

    Full sample answer (fictional example)

    I'd start by asking how fresh the data needs to be and which system owns each field. If Salesforce only needs order status updates, I'd have the order system publish events or call a small Apex REST endpoint. If Salesforce must send orders out, I'd use a queueable callout with named credentials, so secrets aren't in code. I'd log every failure to a custom object with the payload and error, and retry a limited number of times. I'd also use an external ID so a retry updates the same record instead of creating duplicates.

  8. 18.What's the difference between before and after triggers, and when do you use each?

    What they're really asking: Tests basic trigger design that avoids extra DML.

    Answer outline

    • Before triggers update fields on the same records without extra DML.
    • After triggers are for work needing record IDs, such as related records or callouts through async jobs.
  9. 19.How do you avoid hitting the SOQL query limit in a loop?

    What they're really asking: Tests the most common mistake junior developers make.

    Answer outline

    • Collect IDs first, then run one query outside the loop and store results in a map.
    • Reuse queried data across handler methods instead of querying again.
  10. 20.What is a selective query, and why does it matter with large data volumes?

    What they're really asking: Tests performance knowledge on big objects.

    Answer outline

    • A selective query filters on indexed fields and returns a small enough share of records.
    • Non-selective queries on large objects can time out or fail in triggers.
  11. 21.How do you handle errors in a callout from Apex?

    What they're really asking: Tests whether your callout code survives failures and bad responses.

    Answer outline

    • Check status codes and parse error bodies rather than assuming success.
    • Log failures to a custom object or platform event and retry with a limit.
  12. 22.What tools have you used to deploy Salesforce metadata?

    What they're really asking: Tests whether you have shipped changes through a real release process.

    Answer outline

    • Name the tools, such as Salesforce CLI with DX projects, DevOps Center or a third-party release tool.
    • Explain how tests run before production and how you roll back a bad change.

Take-home or live exercise: tips

Many Salesforce developer interviews include a live or take-home exercise, such as writing a bulk-safe trigger with a test class, or reviewing a short Apex snippet for governor limit and security problems.

  • Say out loud how your code handles 200 records before you write the first line.
  • Put queries and DML outside loops and use maps, even in a short exercise.
  • Write at least one test that asserts the outcome and one for a negative case.
  • When reviewing code, look for sharing keywords, hardcoded IDs and missing error handling.

Situational questions (23–30)

Scenarios that test judgement: say what you'd do first, and why.

  1. 23.A data load of 100,000 records keeps failing on CPU time limits. What do you check?

    What they're really asking: Tests troubleshooting of performance in a busy org.

    Answer outline

    • Look at the debug log to see which automations run per record and where time is spent.
    • Bulkify or move logic to async, and consider a bypass switch for automation during approved loads.

    Full sample answer (fictional example)

    I'd run a small sample load in a sandbox with debug logs on and look at which automations fire per record and how long each takes. Often it's a trigger doing queries per record, a Flow doing extra updates, or several automations updating the same fields. I'd fix bulk handling first, then move any heavy calculations to async processing. If it's an approved one-time load, I'd also use our bypass switch for non-essential automation and run a batch job afterwards to apply the skipped logic in a controlled way.

  2. 24.A business user asks for a field update on every account change, today. How do you respond?

    What they're really asking: Can you balance urgency with safe change management?

    Answer outline

    • Ask what problem the update solves and whether Flow can do it safely.
    • Build and test it in a sandbox first, and agree a realistic release time.
  3. 25.You inherit an org with 60% test coverage and tests that assert nothing. What do you do?

    What they're really asking: Tests your plan for paying down technical debt in a measured way.

    Answer outline

    • Start with the highest-risk classes and add meaningful assertions as you touch them.
    • Track progress and agree a team rule that new code ships with real assertions.

    Full sample answer (fictional example)

    I wouldn't try to rewrite every test at once. I'd list the classes that run the most critical business processes, like quoting or order creation, and start there. Each time I touch a class, I'd add tests with real assertions for the main paths and bulk cases. I'd also agree a simple team rule that new or changed code needs meaningful assertions in review. I'd track coverage and defects caught by tests each month, so the team can see the improvement and keep going.

  4. 26.Two teams want conflicting validation rules on the same object. How do you handle it?

    What they're really asking: Can you resolve competing business needs in a shared org?

    Answer outline

    • Get both teams to explain the underlying business rule.
    • Look for a design using record types or criteria that satisfies both, and document the decision.
  5. 27.A Flow built by an admin is causing recursive updates with your trigger. What do you do?

    What they're really asking: Tests how you work with admins and understand the order of execution.

    Answer outline

    • Reproduce the issue in a sandbox and trace the order of execution.
    • Agree with the admin which tool owns the update, then remove the duplication.
  6. 28.A release must go out today, but one test fails only in production. What do you do?

    What they're really asking: Tests whether you keep quality standards when a deadline is close.

    Answer outline

    • Check whether production data or configuration differs from the sandbox.
    • Fix the test or the code properly rather than weakening assertions to pass.
  7. 29.The business wants real-time sync with an ERP that has a nightly maintenance window. How do you design for it?

    What they're really asking: Tests whether your integration design copes with planned downtime elsewhere.

    Answer outline

    • Queue events while the ERP is down and process them in order when it returns.
    • Show users the sync status so they know when data is pending.
  8. 30.A manager asks you to give a user system administrator access to fix an urgent issue. How do you respond?

    What they're really asking: Tests whether you protect access controls when someone pushes for shortcuts.

    Answer outline

    • Offer a narrower permission set for just the needed access.
    • If elevated access is truly needed, time-limit it and record the approval.

Red flags to avoid in your answers

Each one is quick to fix before the day.

  1. Writing SOQL or DML inside loops in examples.

    Show bulk patterns with collections and maps, and explain why they keep code within limits.

  2. Treating test coverage as the only goal.

    Explain how your tests assert outcomes and catch real defects before release.

  3. Choosing Apex for every requirement.

    Describe how you decide between Flow, configuration and code, with an example.

  4. No clear release or source control practice.

    Explain how you move changes between sandboxes and production, and how you roll back.

How to prepare for a Salesforce developer interview in 7 days

An hour or two a day is enough; the order matters more than the length.

  1. Day 1: Org and product research

    Read the job ad and company site to find which clouds and integrations they use, and list the matching work you've done.

  2. Day 2: Governor limits refresh

    Review the main limits and async Apex options, then explain aloud when you'd choose queueable, batch or scheduled jobs.

  3. Day 3: Trigger handler practice

    Write a bulk-safe trigger handler and test class from scratch in a scratch org or editor, timing yourself.

  4. Day 4: LWC and security review

    Build a small Lightning Web Component that reads records, and check how it respects sharing and field permissions.

  5. Day 5: Integration design sketch

    Sketch an integration with an external system, including credentials, error logging, retries and duplicate prevention.

  6. Day 6: Refactoring story prep

    Write your legacy automation cleanup story in STAR form and practice it with follow-up questions on tradeoffs.

  7. Day 7: Release and team questions

    Prepare how you deploy and review code, and choose the three questions about their release process you most want answered.

Questions to ask the interviewer

Pick two or three; the answers tell you whether you want the job.

  1. Which clouds and products does the org use, and how many users rely on it?
  2. How are changes deployed today, and how often do releases happen?
  3. How do developers and admins decide between Flow and Apex here?
  4. What part of the org causes the most production issues right now?
  5. Which integrations does Salesforce depend on, and who owns them?

Preparation tips

  • Be ready to write a bulk-safe trigger handler on a whiteboard or in a shared editor.
  • Prepare one story about cleaning up legacy automation, with the before and after.
  • Review async Apex options and when you'd choose each one.
  • Know which certifications you hold and be ready to show the skills behind them.

Prepare the general questions too: tell me about yourself, why do you want to work here? and why are you leaving? Afterwards, send a thank-you email; when the offer comes, negotiate the salary.

How we wrote this page

The FindAJobAI team wrote the questions, outlines and sample answers for Salesforce developer interviews. The people, employers and numbers in the samples are invented: copy the structure, and use details from your own work.

Once we track enough live Salesforce developer job ads, this page also shows the skills they ask for most, counted the same way as our in-demand skills report.

Last reviewed on November 1, 2026.