Salesforce Developer / Administrator Interview Questions
200 scenario-based questions with detailed model answers, organized skill-wise and tool-wise. Filter by topic, level or keyword, reveal the answer — then pressure-test yourself in a real mock.
Your fintech client's nightly batch job that updates 2 million Account records has been failing with 'System.LimitException: Too many SOQL queries: 101' for three days. The batch size is 200. Walk through your full diagnosis and fix, including how you'd verify the solution without a prod deploy.
A junior developer on your team built an LWC that fires a wire adapter and also calls an imperative Apex method in connectedCallback to fetch the same data. Users report seeing duplicate spinners and occasional stale data. How do you explain the problem and refactor the component?
A healthcare ISV's Record-Triggered Flow on Case is causing 'Flow interview failed' errors in production during a high-volume patient intake period — roughly 800 cases created per hour. The flow sends a confirmation email and updates a custom object. How do you diagnose, fix, and prevent recurrence?
Your e-commerce client wants to track customer loyalty points that can be earned per order line item and redeemed at the order level. They currently have standard Order and OrderItem objects. Design the custom object model and explain your relationship choices.
An insurance company's org has OWD set to Private for Opportunity. A compliance audit finds that a group of renewal managers can see all opportunities company-wide, not just their territory's. You have two weeks before the auditors return. Trace the likely causes and outline your remediation plan.
A support agent reports that a Visualforce page that searches for related Cases by Account name is returning results correctly in a 10-user sandbox but returns nothing in production. The search uses SOSL. What are the likely causes and how do you debug?
Your logistics client's warehouse management system (WMS) needs to receive real-time inventory updates from Salesforce when an Order is fulfilled. The WMS team says they cannot poll an endpoint — they need push. Current volume is 3,000 fulfillments per day with spikes to 500 per hour. Design the integration and explain your reliability strategy.
You are leading a team of 8 developers on a large Salesforce CPQ implementation. Two developers frequently break each other's work when merging feature branches. Walk through the Git branching strategy, scratch org workflow, and CI/CD pipeline you would implement.
A sales operations manager complains that reps are losing deals because Opportunity stages don't reflect real pipeline health — deals sit in 'Proposal' for 45 days with no activity. Design a solution using native Salesforce features to surface stalled deals without custom code.
A trigger on Opportunity calls a future method that makes a callout to a pricing API. In production, a bulk data load of 5,000 opportunities is hitting 'System.LimitException: Too many future calls: 51'. The data team insists the load must complete in one batch run. How do you redesign this?
A manufacturing client migrates from Salesforce Classic to Lightning Experience. After the migration, field sales reps report that the Quick Actions they relied on for logging calls no longer appear on the Opportunity record. Diagnose and fix.
The CFO wants a single dashboard showing pipeline by close quarter, average deal size by industry, and win rate trend over the last 6 months. She needs it to refresh automatically every morning before her 8 AM review. How do you build and schedule this?
Your team's Apex test suite shows 78% overall code coverage, but a deployment to production fails with 'Average test coverage across all Apex Classes is 74%'. The coverage percentages differ between sandbox and production. Why does this happen and how do you reliably fix it?
You are upgrading a Salesforce CPQ managed package from version 220 to version 240 in a production org with 50,000 active quote records. The upgrade window is 4 hours on a Sunday. Walk through your pre-upgrade, upgrade, and post-upgrade checklist.
A colleague's Apex class uses String concatenation inside a loop to build a long CSV output string for a 10,000-row report. Users report the page times out. You review the code and spot the issue. What is it and how do you fix it?
Your team is building a custom CPQ configurator as an LWC that lets reps add up to 50 product line items. Performance profiling shows the component re-renders the entire product list on every quantity change. The product list has 50 items with complex markup. How do you fix this?
An admin built a before-save Flow on Lead that sets a custom 'Lead Score' field based on several field values. Sales reps now report the score is not updating when they edit the Lead from the mobile app. Why might this happen and how do you fix it?
A global retail client runs Salesforce with 200 million Contact records. Queries on Contact that previously took 2 seconds now take 45 seconds after the last data migration added 80 million records. The query is filtering on a custom Email_Domain__c field. How do you investigate and resolve?
A developer wrote an Apex trigger that creates a related Task record. In testing, the Task is created successfully, but the record owner cannot see it in their Activity History. You suspect a sharing issue. Diagnose.
A billing system integration queries all Invoice__c records updated in the last 24 hours using a SOQL query with a date filter. In production, the query sporadically returns no results even though the audit log shows Invoice records were updated. The integration runs every hour. What is happening?
You need to call an external REST API from Apex that requires OAuth 2.0 client credentials flow. The API returns a token valid for 3,600 seconds. Your Apex code currently requests a new token on every API call, causing throttling errors from the external system. How do you fix this?
A change set deployment to production fails with 'Cannot deploy component CustomField: Account.AnnualRevenue_Override__c — field is referenced by a report'. You need to deploy this field deletion today. How do you handle this?
A telecom client's Service Cloud contact center handles 15,000 cases per day. The average handle time is 12 minutes, but the SLA dashboard shows 30% of cases breaching the 4-hour first-response SLA. The ops team believes automation should help but isn't sure where. Walk through your diagnostic and solution.
Your Apex unit test is failing with 'System.LimitException: Too many DML statements: 151' but the code you're testing only does 3 DML operations. How do you diagnose this?
A SaaS company's Salesforce org has 150 active permission sets assigned across 800 users. The security team wants to enforce a least-privilege model but the permissions landscape is opaque — nobody knows which permission sets grant which access and whether any are redundant. How do you audit and rationalize this?
The VP of Sales wants a report showing which deals were lost specifically because of pricing — the team logs a 'Reason Lost' picklist on Opportunity. However, querying Closed Lost opportunities only shows the last value, and reps sometimes change the stage back to open and re-close with a different reason. How do you capture the true first-time close reason accurately?
You are setting up a CI pipeline that runs Apex tests on every pull request. Tests take 45 minutes on average, blocking developer productivity. The org has 1,200 Apex classes. How do you reduce test execution time to under 10 minutes without sacrificing confidence?
You are developing a second-generation managed package (2GP) for an ISV. During AppExchange security review, the reviewer flags your code for using `without sharing` on a class that queries sensitive financial data. You disagree. How do you handle this and what is the correct approach?
An Apex trigger on Account has been in production for 3 years. A new business requirement needs the trigger to also send a Platform Event when an account's billing address changes. Three other teams have triggers on Account. Describe how you approach this change to avoid trigger order conflicts and respect existing behavior.
A custom LWC on the Case record page needs to display a list of related Contacts from the Case's Account. The component must also let the agent add a note to a Contact inline. The current implementation uses a single monolithic component with 600 lines. How would you refactor this?
Your team is migrating 40 Process Builder automations and 15 workflow rules on the Contact object to a consolidated set of Record-Triggered Flows. The migration must be done without downtime and with rollback capability. How do you plan and execute this?
A nonprofit client wants to track donations where a single donor can split a donation across multiple programs (e.g., $500 split $300 education and $200 health). They use standard Salesforce Nonprofit Success Pack (NPSP). How do you model this without breaking NPSP's payment architecture?
An audit finds that a Lightning component used in a Community (Experience Cloud site) is exposing internal price book data to authenticated community users. The component was originally built for internal Sales reps. What caused this and how do you remediate it?
A nightly Apex batch job queries all active Accounts using `SELECT Id, Name FROM Account WHERE Active__c = true`. The job has been running fine for 2 years but recently started failing with 'QueryException: Aggregate query has too many rows for direct assignment'. What is happening?
You need to integrate Salesforce with a legacy ERP system that exposes a SOAP API, not REST. The ERP team says they can only provide a WSDL. Your integration must sync Order status updates from ERP to Salesforce every 5 minutes for 10,000 orders. Design this integration.
After a production deployment, 3 critical business Flows stop working silently — they don't throw errors, they just don't trigger. The deployment included changes to those Flows. The business notices 4 hours later. How do you diagnose, roll back the Flows, and prevent this in the future?
A B2B software company's sales team wants to track renewal opportunities automatically 90 days before contract end date. They use the standard Opportunity and Contract objects. Build this using native Salesforce tools without custom Apex.
Your org runs a batch job every night that processes 500,000 custom transaction records, enriching each with data from a related Account. The batch fails intermittently around the 300,000-record mark with 'System.LimitException: Too many query rows: 50001'. Batch size is 200. Diagnose and fix.
A sales rep reports that a validation rule is blocking them from closing a deal in the mobile app but not in the desktop browser. The validation rule checks that all required fields are populated before Stage = 'Closed Won'. How do you investigate this discrepancy?
Your Salesforce org has reached the 2,000 report limit. The org has been in use for 7 years and has many reports created by users who have since left. How do you clean up the report inventory without deleting reports that are still being used?
A colleague argues that they have achieved 95% code coverage but the tests only use `System.assert(true)` and `System.assertEquals(null, null)`. Code review reveals no real assertions. How do you explain the problem and what standards would you enforce going forward?
You are building a managed package that will be installed in orgs with varying editions (Professional, Enterprise, Unlimited). Your package includes a class that uses Apex Scheduler. During AppExchange testing, you discover the package breaks on Professional Edition orgs. What is the issue and how do you handle edition compatibility?
You need to write an Apex method that accepts a list of Account Ids, calls an external credit-scoring API for each, and updates the Account record with the score. The API has a rate limit of 10 requests per second. You must not exceed this limit. How do you implement this?
Your company is building a complex multi-step wizard LWC for contract creation with 7 steps and shared state across all steps. Step 4 depends on data entered in Steps 1 and 2. After a user refreshes on Step 3, all progress is lost. How do you architect the state management for this wizard?
A Screen Flow embedded on a Community (Experience Cloud) page is being used by external customers to submit service requests. Customers report the Flow is showing internal Salesforce field labels (API names) instead of friendly labels. How do you fix this?
You are designing a multi-tenant SaaS platform on Salesforce where each tenant (customer company) must have complete data isolation from other tenants. You plan to use a single Salesforce org. What data model and security architecture do you use, and what are the limits of this approach?
A developer added a new field, SSN__c, to the Contact object to store Social Security Numbers for a US client. Field-level security is set to Hidden for all profiles. But a System Administrator can still see the value in the Developer Console via SOQL. Is this a bug? How do you advise the client?
A SOQL query in your nightly analytics Apex class is timing out after 120 seconds in production. The query joins Opportunity with 3 child relationships (OpportunityLineItems, OpportunityContactRoles, ActivityHistory). The total Opportunity pool is 2 million records filtered to 'last 90 days.' How do you optimize this?
A mobile app team asks you to expose Salesforce Account and Contact data via a custom REST API built in Apex. The API will be called from the mobile app using OAuth 2.0 user credentials flow. Walk through the implementation from endpoint definition to security.
A junior developer on your team accidentally deleted a production custom field by deploying a destructive change that was meant only for the sandbox. The field had data. You have 90 minutes before business hours start. What do you do?
A global bank deploys Salesforce Financial Services Cloud. Relationship managers complain that the 360-degree client view shows duplicate households and financial accounts after a data migration of 800,000 client records from the legacy CRM. Describe your deduplication strategy and resolution process.
During a Salesforce code review, you notice a developer's Apex class has a SOQL query inside a for loop that iterates over a list of records. The developer says 'but we'll never have more than 20 records in that list in practice.' How do you respond and what do you enforce?
An enterprise media company wants to model a complex territory management structure in Salesforce where accounts can be assigned to multiple territories based on geography, industry vertical, and named account status simultaneously. How do you configure Enterprise Territory Management for this?
A retail bank's Salesforce org has real-time loan application data flowing in via Platform Events. The Risk team needs a live dashboard showing application volume by risk tier, updated every minute. The current daily-scheduled dashboard refresh is insufficient. How do you implement this?
Your team needs to test an Apex class that integrates with an external payment processor. The class makes callouts and processes JSON responses. The external service is unavailable in sandbox. How do you design a complete test strategy for this class?
A subscriber has installed your managed package version 1.5. You release version 1.6 which adds a new required custom field on a managed object. One subscriber's org fails to upgrade because they have a duplicate field with the same API name. How does Salesforce handle this and what are your options?
Your team maintains a large Apex codebase with 300 classes. A new requirement asks you to implement a notification service that different parts of the system can use to send push notifications, emails, or SMS. Design this service with extensibility as a primary concern.
Your team's nightly batch job processes 2 million Opportunity records to recalculate custom forecast fields. It started failing mid-run with mixed DML and CPU limit errors after a recent managed package upgrade. How do you diagnose and redesign the batch architecture?
A sales rep reports that a custom LWC embedded on the Account record page renders correctly in Lightning App Builder preview but shows a blank component with a JavaScript error referencing 'Cannot read properties of undefined' in production. How do you investigate and fix this?
After enabling a Record-Triggered Flow on the Case object to auto-create follow-up Tasks, your support team reports hundreds of duplicate Tasks appearing overnight. The Flow runs in a managed package org with several existing Process Builder automations. How do you root-cause and resolve this?
A product manager asks you to model a many-to-many relationship between Products and Warehouses in Salesforce where each junction record also tracks quantity and last restocked date. What object structure do you design and what are the trade-offs?
A financial services client requires that relationship managers see only Accounts they own, while regional directors see all Accounts in their region, and a compliance team sees every Account regardless of region. OWD is Private. How do you model this with the least maintenance overhead?
You need to write a single query that retrieves all Contacts belonging to Accounts in the Technology industry, including each Contact's most recent Activity date, and filters out Contacts without any logged calls. How do you structure this and what indexing considerations apply?
An external ERP system pushes real-time inventory updates to Salesforce via REST API at roughly 800 calls per minute during peak hours. After a major product launch the volume spiked to 3,000 per minute and you started seeing 429 errors. How do you redesign the integration to handle spikes reliably?
Your team uses Salesforce DX with unlocked packages and a GitHub Actions CI pipeline. A developer merged a change that broke a trigger unit test, but the pipeline passed because the test class was not included in the package's test run configuration. How do you close this gap systematically?
A sales operations team wants Opportunities to auto-advance from 'Needs Analysis' to 'Value Proposition' stage when a Chatter post tagged with the hashtag #qualified is added by a sales rep. How do you implement this without Apex?
A trigger on the Opportunity object performs a callout to an external credit-scoring API for each record in the trigger batch. During a bulk data import of 5,000 Opportunities the org generates errors about callouts not being allowed after DML. How do you refactor the trigger to be bulk-safe?
A client wants a page layout on the Contact object where the Email field is visible to all users but editable only by users with the 'Contact Manager' profile, while remaining read-only for all others. How do you configure this and what are the exact tool limitations?
A regional VP wants a dashboard showing real-time pipeline health: total open Opportunity value by stage, win rate for the last 90 days, and top 5 reps by closed revenue this quarter. She reports the dashboard loads very slowly. How do you build it and optimize performance?
Your deployment to production is blocked because coverage dropped from 82% to 71% after merging a large Apex utility class with no test file. The release is time-sensitive. How do you restore coverage without writing superficial tests that just execute lines?
Your ISV's managed package version 2.5 introduced a new trigger on Lead that conflicts with a subscriber org's existing custom trigger on the same object, causing duplicate processing and data integrity issues. How do you identify the conflict and provide a path forward for subscribers?
You are asked to write a trigger handler that prevents duplicate Leads from being inserted based on matching email address. How do you implement this to be bulkified and avoid common pitfalls like partial-save issues?
You need to build an LWC data table supporting inline editing for 50,000 Opportunity records with server-side pagination, sorting, and filtering — all without hitting CPU or heap limits. Walk through your architecture from the component to the Apex layer.
A business analyst asks you to build automation that sends a Slack notification to a channel when a high-value Opportunity (above one million rupees) is marked Closed Won, including the rep's name, deal amount, and account name. How do you implement this without custom code?
A healthcare client is migrating 3 years of patient appointment data into Salesforce as a custom object. The data includes 4 million records with complex parent-child hierarchies up to 4 levels deep. What data loading strategy and object model do you recommend, and what risks do you flag?
A developer reports that an Apex class running in system mode is inadvertently exposing Case records to users who should not see them via an @AuraEnabled method. How do you audit and fix this, and what is the difference between 'with sharing' and 'without sharing'?
You need to search across Accounts, Contacts, and Cases simultaneously for records matching a customer-provided free-text search string entered in a Lightning component. The search must handle partial words and return results ranked by relevance. How do you implement this in Apex?
Your team needs to expose a Salesforce Opportunity record as a REST endpoint so an external analytics platform can pull deal data on demand. What is the simplest production-ready approach, and what authentication and data concerns must you address?
A junior developer accidentally deployed an Apex class with a syntax error to the production org via Change Sets and all tests now fail. You need to restore the org to a working state quickly. What is your recovery procedure?
A telecom client's support team handles 15,000 Cases per day. They want automatic case routing to specialist queues based on product category, customer tier, and SLA level, with escalation to a senior agent if no response occurs within 2 hours. How do you implement this entirely within Service Cloud?
A trigger on Account calls a helper method that queries related Contacts inside a for-loop over Trigger.new. During a bulk update of 300 Accounts it throws a 'too many SOQL queries' exception. Walk through exactly how you refactor this to be governor-limit safe.
A financial institution is deploying Salesforce and requires that no user — including system administrators — can export data to CSV from any standard or custom object without a formal request approval. How do you enforce this at the org level?
An executive team wants a single Salesforce dashboard showing both individual rep attainment vs. quota and a rolling 12-month revenue trend on the same screen. The quota data lives in a custom object, and historical revenue requires data going back before the org's implementation. How do you architect this?
You are writing a test class for an Apex trigger that makes a callout to an external payment gateway and updates a Payment record status based on the response. How do you structure the test to be reliable, fast, and not dependent on the external system?
You are installing a third-party managed package for a recruitment module in a production org that already has a custom Recruitment__c object with 50 existing custom fields and 200,000 records. What pre-installation checks do you perform to prevent data loss or naming conflicts?
You discover that a legacy Apex class uses String concatenation in a loop to build a large SOQL query filter clause. In production with large input sets this causes heap limit exceptions. How do you refactor this and what general Apex memory management principles apply?
You need to build an LWC that lets an account manager search for Contacts by name in real time as they type, showing results in a dropdown below the input. How do you implement this to be performant and accessible?
Your org has grown to 150 active Flows across Sales and Service Cloud, and admins report that Opportunity record saves sometimes take 8-12 seconds. A performance audit is needed. How do you systematically identify and remediate slow Flows?
A client asks whether to use a custom object or the standard Task object to track daily follow-up actions for their sales reps. They currently use Activities but want richer reporting and custom fields. What is your recommendation and the key trade-offs?
A pentester reports that an Apex REST endpoint in your managed package returns full Account records including confidential financial fields when invoked with a valid session token, even if the calling user's profile has those fields set to read-only via FLS. How does this happen and how do you fix it?
You need to write a query that retrieves the top 10 Accounts by total Opportunity amount where Opportunities are Closed Won and closed in the current fiscal year. How do you structure this without Apex post-processing?
You are designing an event-driven order management integration where Salesforce must receive order status updates from a downstream fulfillment system within 500 ms of the status change. The fulfillment system can push to a webhook. How do you design the inbound integration architecture?
Your team manages a single Salesforce org shared by three product teams, each with their own Apex and metadata. You want to enable each team to deploy independently without risking breaking the others. How do you architect the DevOps model?
A client's service team wants customer satisfaction surveys automatically sent by email 24 hours after a Case is closed. The survey link should be unique per customer and tracked in Salesforce. How do you implement this without a third-party app?
A Queueable Apex job that processes referral payouts is failing in production with an 'exceeded maximum number of Apex jobs' limit. It chains itself recursively until all 40,000 referral records are processed. How do you redesign this to be resilient and maintainable?
A sales director wants Opportunity records to be locked from editing by anyone except the record owner and their manager once the Opportunity reaches 'Proposal/Price Quote' stage. How do you configure this without Apex?
A marketing manager needs a report showing leads created this month broken down by lead source with a conversion rate (converted leads as a percentage of total) per source. How do you build this in Salesforce Reports without any external tools?
Your team wants to adopt a test-driven development culture for all new Apex. You have been asked to define the testing standards, including what makes a 'good' Apex test, how to handle test data setup at scale, and how to enforce coverage gates in CI.
You are building a managed package that will be installed in orgs with varying editions — Professional, Enterprise, and Unlimited. Some features require platform events and some require Apex. How do you handle edition compatibility in your package design?
A colleague's Apex class uses a public static variable as a reentrancy flag to prevent a trigger from firing recursively. However, during bulk updates via the API some records are still processed twice. Explain why this happens and what the correct pattern is.
You are building an LWC that streams real-time notifications to logged-in service agents when a Priority Case is assigned to them, without requiring a page refresh. The notification must appear within 3 seconds of the Case assignment. How do you implement this?
An admin accidentally activated a Screen Flow that is now looping and creating thousands of duplicate Contact records in production. You have been paged. What are your immediate steps to stop the damage and then investigate?
A global retailer needs to model product variants in Salesforce — each product can have up to 50 variants (size, color, region) with independent inventory, pricing, and status. The catalog has 500,000 base products. How do you design this at scale?
You discover that a report used by all sales reps includes a formula column that calculates a competitor's estimated revenue derived from a custom field that should only be visible to Sales Directors. How do you fix this without rebuilding the entire report?
You need to detect whether any Account record in a batch of 10,000 being processed by a batch job has been modified by another user since the batch job started reading them, to implement optimistic locking. How do you approach this in Apex given that Salesforce does not have native row-level locking in batch context?
A marketing team wants Salesforce Lead records to sync to HubSpot in real time when a new Lead is created. The HubSpot API requires an API key stored securely. How do you design the integration using Salesforce-native patterns?
A developer deleted a custom field from a sandbox and wants to deploy that deletion to production using SFDX. The field has data in production and is referenced by 2 reports. What is the exact process and what risks must you communicate?
Your fintech client's nightly batch job processes 2 million transaction records for interest calculation, but it's hitting the 10-million SOQL row limit midway and failing. The batch runs on a single Apex class with a SOQL query inside the execute method. How do you redesign this without re-architecting the entire data model?
A junior developer on your healthcare team wrote a trigger on the Case object that sends an SMS via an HTTP callout directly inside the trigger body. QA is seeing intermittent 'You have uncommitted work pending' errors on case updates. Explain what's wrong and how you fix it.
Your insurance company's LWC policy-comparison tool renders 500 rows in a datatable on load, and agents report it freezes the browser for 3-4 seconds on older laptops. Product refuses to paginate the UI. What rendering strategies can you apply within LWC constraints to maintain the full dataset while eliminating the freeze?
You need to pass data from a child LWC component up to a grandparent component that sits two levels above in the DOM hierarchy. The team proposes using a custom event with bubbles:true and composed:true. When should you use that approach versus a shared Lightning Message Service channel?
A retail client migrated 40 Workflow Rules and 15 Process Builders to a single Record-Triggered Flow. Post-migration, users are seeing recursive updates causing infinite loops and hitting the daily flow interview limit. Walk through your diagnosis and resolution strategy.
A sales operations manager wants a flow that automatically assigns high-value leads (over $50,000 estimated value) to a round-robin queue across 5 senior reps, rotating assignment even when leads come in bulk during a campaign blast. How do you build this reliably?
A logistics company has a custom Shipment object with a Master-Detail relationship to Account. After 18 months in production with 8 million shipment records, the business wants to allow shipments to optionally exist without an account. Changing Master-Detail to Lookup requires deleting and recreating the relationship. Plan this migration with zero data loss.
A product manager asks you to add a 'Customer Tier' picklist to both the Account and Opportunity objects, ensuring that the Opportunity's Customer Tier always mirrors the parent Account's value and is not editable by reps. How do you implement this with the least maintenance overhead?
Your org-wide default for Opportunity is Private. A new VP of Sales demands that all opportunities be visible to her entire 500-person sales team for pipeline reporting, but Legal requires that individual compensation data on custom fields remain visible only to each rep and their direct manager. How do you satisfy both requirements?
A newly onboarded system integrator's connected app is making API calls and accessing records beyond its intended scope because it was granted 'Full Access' OAuth scope during setup. You've been asked to remediate this without revoking the integration entirely. What steps do you take?
A SOQL query on a custom object with 30 million records is running for over 10 seconds and timing out in Apex. The query filters on a non-indexed custom text field and returns 50,000 rows ordered by CreatedDate. Describe your full optimization strategy.
A support agent calls you because a search bar in your custom service portal returns no results for a customer's name even though the contact record clearly exists in Salesforce. The search uses SOSL. What are the likely causes and how do you debug?
An ERP system fires order status updates to Salesforce via REST API at a peak rate of 800 events per minute. Your current REST-to-SOQL-update pattern is hitting DML limits and causing p95 latency of 12 seconds. Redesign the integration architecture to handle this throughput reliably.
Your marketing team built a Zapier integration that creates Leads in Salesforce via the REST API. Last week, a campaign sent 5,000 leads in 2 hours and the org hit API request limits, blocking the sales team's workflows for the rest of the day. How do you prevent this?
Your team is releasing a new Opportunity scoring feature that touches 12 Apex classes, 3 LWC components, 2 custom objects, and 6 new flows. A parallel team has made changes to the same Opportunity page layout in their own sandbox. How do you manage this merge conflict and deploy safely to production?
A deployment to your UAT sandbox fails with the error 'Test coverage of selected Apex triggers is 0%, minimum coverage is 75%.' The trigger has 90% coverage in developer sandbox. What are the possible causes and how do you troubleshoot?
A telecommunications company running Service Cloud receives 50,000 cases per day across email, chat, and phone channels. Their case routing is handled by Omni-Channel, but VIP customer cases are taking 8 minutes on average to reach an agent while standard cases take 2 minutes. Diagnose and fix the routing priority gap.
A sales manager complains that reps can view and edit each other's opportunities because the org's OWD for Opportunity is set to 'Public Read/Write'. Leadership wants individual reps to own their pipeline privately but still allow managers to see and edit subordinates' records. Implement this with minimal disruption to current reports.
An Apex batch job that processes partner commission calculations is failing with 'Too many future calls: 51' even though your code only explicitly calls one @future method. You're running this in a sandbox with Debug Logs enabled. How do you find the source of the extra future calls?
A developer reports that their Apex code works fine for a single record update in the developer console but throws 'Too many SOQL queries: 101' when a user updates 50 accounts simultaneously via a data import. Explain the root cause and the correct fix.
Your company acquired a smaller firm and needs to merge their 50,000-contact Salesforce org into your main org within 90 days. The acquired org has 15 custom objects, different record types, and a separate integration with HubSpot. Outline your migration strategy and the order of operations.
A compliance officer requires that any time a Contract record's status changes to 'Activated', the change is logged with the user who made it, the timestamp, and the previous value, and this log must be immutable. How do you implement this using native Salesforce features?
The CFO runs a revenue forecast dashboard that takes 90 seconds to load and times out for her assistant who has different data access. The dashboard has 12 components, all using report snapshots. Walking through performance and access issues, how do you fix both problems?
A regional sales director wants a dashboard showing pipeline by stage, but she notices the Opportunity counts differ between the dashboard and what she sees when she manually browses opportunities filtered the same way. How do you explain this discrepancy and resolve it?
Your org has 320 Apex classes and 78% overall coverage. A new deployment is failing in production because the Apex trigger you're deploying has only 68% coverage in isolation, but raising it above 75% seems to require writing tests that effectively duplicate existing tests for a utility class. How do you approach this efficiently?
A test class for your order processing Apex class is passing in sandbox but intermittently failing in a full org test run with 'System.QueryException: List has no rows for assignment to SObject'. The test was working fine 2 weeks ago. What changed and how do you fix the test?
You're implementing a managed package (ISV) that your customers will install in their orgs. Post-install, customers report that your package's trigger on Opportunity is conflicting with their existing Apex triggers, causing order-of-execution issues and 'reached max retrigger depth' errors. How do you architect the package to be a good citizen?
A customer has installed your managed package but reports that some of the package's custom fields are not visible to their users even though those fields are marked as visible in the package. The customer's admin confirmed that the package was installed with 'Install for All Users'. How do you investigate?
Your e-commerce client's order confirmation Apex logic is inside a synchronous REST API endpoint called by their storefront. During Black Friday, the endpoint's response time degraded to 8 seconds causing cart abandonment. The endpoint creates an Order, 5 OrderItems, and sends a confirmation email via an Apex class. Redesign for under 500ms response.
Your LWC application needs to display a real-time feed of sensor alerts from an IoT backend. The backend can push up to 20 alerts per second during peak manufacturing incidents. Describe how you architect the Salesforce-side real-time display without polling.
A healthcare org uses a complex approval process for clinical trial protocols: 4 stages, 12 approvers across 3 departments, with a rule that any single rejection at any stage requires the entire process to restart from stage 1. Six months in, approval records are corrupting — some reaching the final stage while missing mid-stage approvals in the history. Debug this.
You're designing a multi-tenant B2B SaaS data model where each customer (Account) can have multiple subscriptions, each subscription has line items, and line items can reference shared product catalog items that are managed centrally. How do you model this in Salesforce balancing query efficiency and sharing complexity?
Penetration testers found that authenticated Salesforce users in your org can query custom API endpoints built in Apex REST and retrieve records they don't own by guessing record IDs. The SOQL in the Apex class runs in system context. How do you remediate this IDOR vulnerability?
A scheduled Apex report job generates a complex SOQL query joining Account, Opportunity, OpportunityLineItem, and a custom financial object, and it's consuming 80% of your org's query rows each night. Other users are hitting 'You've exceeded the limit' errors the next morning. Design a strategy to reduce this impact.
Your Salesforce org integrates with an SAP ERP via a MuleSoft middleware. The SAP system sends customer account updates every 5 minutes via REST. You're seeing data conflicts: Salesforce-side reps update an Account simultaneously with an SAP sync, causing one update to silently overwrite the other. Design a conflict resolution strategy.
Your CI/CD pipeline deploys to production every Friday using SFDX. Last Friday, a successful validate-only deployment was followed by a failed actual deployment 2 hours later because a developer merged a last-minute hotfix that changed a permission set referenced by the validated package. How do you prevent this class of deployment drift?
A bank's wealth management division wants Einstein Lead Scoring enabled, but their compliance team says all AI-generated scores must have an explainability audit trail showing which fields influenced each score. Native Einstein Lead Scoring doesn't expose factor details per record. How do you address this?
Your platform engineering team is building a Salesforce-hosted real-time collaboration tool where multiple users update shared records concurrently. You're seeing 'UNABLE_TO_LOCK_ROW' errors on certain records during peak usage. Explain the root cause and your mitigation strategy without increasing latency.
A project manager at a consulting firm complains that her team's custom 'Project' object records are disappearing randomly. She insists no one is deleting them. You pull the audit log and see records were deleted by a user named 'Automated Process'. What is 'Automated Process' and how do you find and fix the root cause?
A sales director asks you to build a report showing the number of days each Opportunity spent in each stage before closing. Salesforce doesn't natively track stage duration. How do you instrument and report on this?
A developer asks you to review their code that uses Database.insert(records, false) with partial success to handle bulk inserts of lead records from a web form. The code logs nothing about failures and the form always shows 'Success!' to the user. What is wrong and what should the code do?
Your LWC component uses a @wire adapter to fetch data from an Apex method. During user testing, testers note that the component displays stale data after they update a record from the same page — the wire cache isn't refreshing. What are the available options to force a cache refresh?
Your development team has 95% code coverage but your QA team keeps finding production bugs in edge cases the tests don't cover. The test suite passes 100% in CI but 3 bugs reached production last quarter. How do you improve test quality beyond the coverage percentage metric?
A sales ops analyst built a scheduled flow that emails weekly activity summaries to 300 account managers. The flow was working for 2 months but suddenly stopped sending emails last Tuesday. No errors appear in the Flow Error Email inbox. How do you investigate and restore operation?
Your ISV package includes a complex Apex batch job that customers schedule after installation. Several large customers report that your batch is consuming their entire daily batch Apex job limit (250,000 records per day in older editions) and preventing their own automation from running. Redesign the package to be more resource-respectful.
You're consolidating 6 separate Salesforce orgs (each for a different business unit) into a single Enterprise org. Three orgs use the same Lead object but with conflicting custom fields and picklist values. Leadership wants the consolidation done within 6 months with zero disruption to each BU's existing reports. Plan the field harmonization.
A startup wants their mobile app to authenticate with Salesforce and query customer records directly from a client-side React Native app. A colleague suggests storing Salesforce credentials in the mobile app's bundle. Why is this dangerous and what is the correct authentication pattern?
A global CPQ implementation runs a complex pricing calculation for 150-step configuration trees. The calculation is implemented in a recursive Apex method. During a demo, a large product bundle triggered a 'Maximum stack depth reached: 1001' error. How do you refactor the recursive logic?
A compliance team requires that a custom LWC data entry form on the Case object logs every field change a user makes, including intermediate keystrokes in text inputs, before they click Save. The log must include the field name, old value, new value, and timestamp. How do you implement this?
Your org has Guest User access enabled for a Community site. A security review found that Guest Users can run SOQL through Visualforce pages and see internal Account records that should not be publicly visible. What settings and code changes do you make?
You need to find all Contacts and Cases in your org that contain the phrase 'data breach' anywhere in their text fields to support a legal discovery request. The phrase may appear in Subject, Description, Comments, or any custom text field. How do you execute this search efficiently?
A new team member accidentally deployed a destructive change to your full sandbox, deleting a custom object with 100,000 records and all its dependent metadata. You cannot restore from a Salesforce backup because your org doesn't have a paid backup solution. What are your options?
A customer service manager reports that her team is spending 20 minutes per case manually writing resolution summaries before closing cases. They handle 400 cases per day. She wants to automate this but doesn't want to lose the human review step. Design a solution using available Salesforce features.
Two Apex triggers on the same object — one written 3 years ago by a previous developer and one added last month — are both active. Users are seeing unexpected behavior after updates. How do you diagnose the interaction and what is the proper long-term fix?
Your fintech client's nightly batch job that recalculates loan interest for 4 million records started timing out after a schema change added three new formula fields. The job ran fine for months before. How do you diagnose and fix this without restructuring the entire batch architecture?
A junior developer on your healthcare team wrote an after-insert trigger on Case that calls a future method to send an SMS. During a data migration of 50,000 cases via Data Loader, the org hit the async Apex limit. Walk through what went wrong and how you would refactor this cleanly.
Your retail client's LWC product catalog renders 500 tile components on a single page. Sales reps report the browser tab freezing for 3–5 seconds on initial load. Chrome DevTools flame graph shows long tasks in the LWC rendering engine. What architectural changes do you propose and implement?
You built an LWC that uses @wire(getRecord) to display Account fields. A product manager reports that after an inline edit on a related record, the LWC still shows the old data for 30 seconds. The fix must work without a page refresh. How do you approach this?
A telecom enterprise runs 14 separate Process Builder automations on the Opportunity object. After migrating to Flow, you discover that a single rep saving an Opportunity triggers the record-save flow 11 times due to recursive re-entry. Describe your debugging and resolution strategy.
Your admin team converted a workflow rule that sent an email alert 5 days before Contract expiry to a Scheduled Flow. In UAT, the emails fire immediately upon activation rather than 5 days before expiry. What is wrong and how do you correct it?
A logistics company wants to model shipment legs where one shipment can have up to 50 legs, each leg has its own carrier, route, cost, and status. They also need roll-up summaries of total cost and a count of delayed legs on the parent Shipment. What data model would you design and why?
A sales team complains that their custom Account field 'Annual Recurring Revenue' disappears from page layouts after a managed package upgrade. No one changed the page layout manually. Explain what happened and how you prevent this in future upgrades.
Your insurance org has OWD set to Private on Policy__c. A new regulatory requirement mandates that all users in a 'Compliance' public group can read every Policy record, but compliance users must not be able to edit any of them. Your current sharing rules are at the 1,000-rule limit. How do you solve this?
A developer queries Contact records in an Apex class using SOQL without sharing keywords. A security review flags this as a data exposure risk. The class is called from a public-facing Experience Cloud site where guest users should only see contacts linked to their own account. How do you fix this?
A manufacturing company's Apex batch runs a SOQL query joining Opportunity and 12 related objects (OpportunityLineItem, Product2, Pricebook2, Account, custom objects) in a single SELECT statement. The query takes 45 seconds and often hits the 120-second SOQL timeout. How do you restructure this?
Your SOSL search query on Lead, Contact, and Account returns correct results in Developer Console but returns zero rows when executed from an Apex class called by a Lightning component. The same user runs both. What are the likely causes and how do you debug?
Your e-commerce platform pushes 8,000 order events per minute to Salesforce via Platform Events during flash sales. Order processing Flows subscribed to the events start lagging 40+ minutes behind. The business requires near-real-time Order record creation. What changes do you make to the architecture?
A partner integration team calls your Salesforce REST API to create Opportunities. They report intermittent '401 Unauthorized' errors that appear only after exactly 2 hours of inactivity between calls. Your connected app uses the JWT Bearer flow. What is causing this and how do you fix it?
Your team uses a GitLab CI pipeline to deploy to production via SFDX. After a merge to main, the pipeline fails with 'INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY' on a profile metadata component, but the same deploy succeeds when run manually from a developer's machine. What is different and how do you resolve this?
You need to deploy a change set from a full sandbox to production but the validation step fails because 75% code coverage is not met — specifically, a new trigger has 0% coverage. The trigger has unit tests in the sandbox that pass locally. Why is this happening and what do you do?
A wealth management firm wants to implement Einstein Lead Scoring but their leads data shows that 95% of leads are marked as disqualified within 48 hours, and only 2% ever convert. Einstein is returning unhelpful scores clustered near zero for all leads. How do you diagnose and improve model quality?
A service manager reports that cases from Email-to-Case are being assigned to the wrong queue. The assignment rule has 5 criteria — email subject contains 'billing', 'technical', etc. Cases about billing are routing to the technical queue. Describe your debugging process.
Your Apex code passes all unit tests but hits 'Too many SOQL queries: 101' in production during a workflow where a single user updates 5 Accounts simultaneously via a list view mass update. Tests used single-record scenarios. How do you identify and fix the unbulkified SOQL?
A consultant reports that an Apex class doing complex calculations for a CPQ pricing engine is hitting the CPU time limit of 10,000ms during quote generation for large deals with 200 line items. The logic is pure in-memory calculation with no SOQL. What options do you explore?
A regional manager needs a public calendar in Salesforce showing all Opportunities with Close Date in the next 30 days, visible to the entire sales team without giving them access to each other's Opportunity records. How do you configure this using only declarative tools?
Your org has 600 active users spread across 40 profiles. A new GDPR requirement mandates that Personal Data fields on Contact must be masked for all users except a 'Data Steward' team of 12 people. Reconfiguring 40 profiles is untenable. What is your implementation strategy?
A VP of Sales asks why their pipeline dashboard shows different Opportunity totals than the regional manager's dashboard, even though both claim to be looking at 'all open opportunities'. Both dashboards use the same report. What are the likely causes and how do you investigate?
Your analytics team wants to build a real-time executive dashboard showing Salesforce data alongside ERP revenue data and web analytics. They have a 48-hour data freshness requirement today but want to move to 15-minute freshness within 6 months. What architecture do you recommend and why?
Your org is about to lose 12% of code coverage because a managed package you depend on is being deprecated and its Apex classes (which contributed to org-wide coverage) are being removed. The next production deployment will fail if coverage drops below 75%. You have 48 hours. What do you do?
A developer claims their Apex trigger has 85% coverage but a production deployment fails saying the trigger has insufficient coverage. They show you the test results on their screen. What are possible discrepancies and how do you resolve them?
Your ISV product built as a managed package is failing AppExchange security review because the scanner flags an Apex class that makes a callout using a hardcoded endpoint URL. The URL is a required configuration value that differs per subscriber org. How do you refactor this to pass review and maintain flexibility?
A subscriber org upgraded your managed package from version 2.1 to 2.3 and immediately started seeing trigger recursion errors they never experienced before. Your 2.2 release added a new after-update trigger on the Contact object. The subscriber's org has its own Contact triggers. How do you diagnose this?
A media company's Apex REST endpoint that generates presigned S3 URLs for asset downloads is returning stale URLs after 15 minutes in production, causing 403 errors for end users. The URL expiry is set to 3600 seconds (1 hour) in the code. Investigate and fix.
You are migrating an Aura component that uses aura:method for parent-to-child method invocation to LWC. The pattern is used extensively across 30 components. The parent calls child.methodName() after an event. How do you replicate this cleanly in LWC and what gotchas must you handle?
A pharmaceutical company's Flow that auto-creates regulatory submission tasks runs fine in sandbox but silently fails to create tasks in production for about 15% of Opportunities. No error emails are sent. Tasks are simply missing. How do you approach this investigation?
An energy company needs to model meter readings where each physical meter generates one reading per hour, and meters number 500,000. They want to query the latest reading per meter in Salesforce. Describe the data model and query strategy that remains performant at scale.
During a Salesforce Shield audit, the auditor finds that your custom Apex REST API endpoint returns encrypted field data in plaintext because it calls WITH SYSTEM_CONTEXT. The endpoint is used by a mobile app. How do you fix this while maintaining API functionality for authorized mobile users?
Your Apex code uses a dynamic SOQL query built from user-provided filter values passed through an LWC. A security penetration test finds that injecting a SOQL injection payload into the filter changes the query semantics. Walk through the attack and the complete remediation.
Your team built an outbound integration that publishes Salesforce Account changes to an Apache Kafka topic using Change Data Capture (CDC). After 6 months in production, the Kafka consumer team reports that 3% of messages have duplicate Account updates for the same change. How do you diagnose and eliminate duplicates?
A developer accidentally deployed a change set to production that removed a required field validation rule. Customers are now saving Accounts without the required EIN field. You need to restore the validation rule and assess data damage in the next 2 hours. What is your action plan?
A financial services firm wants to use Salesforce Service Cloud to implement a complaint management process compliant with FCA regulations, requiring a maximum 8-week resolution SLA with milestone tracking, audit trail of all customer communications, and escalation to a Relationship Manager if unresolved at 6 weeks. Design the implementation.
Your Apex code that processes insurance claim documents calls an external OCR API for each document in a batch. The batch processes 500 claims per run and hits the 100-callout-per-transaction limit at the 100th claim. How do you redesign this to handle 500 callouts reliably?
The VP of Engineering at a SaaS company complains that their Salesforce org's Opportunity page takes 8 seconds to load. They have 47 related lists and 12 components on the page layout. Page layout simplification is politically difficult. What do you configure to improve load time without removing content?
Book a mock interview with a senior Salesforce Developer / Administrator mentor — structured scorecard, replay, and a gap plan.