Salesforce is the leading CRM platform, and companies keep hiring Salesforce administrators, developers, consultants and architects. These Salesforce interview questions cover both the admin side (data model, security, Flow) and the developer side (Apex, SOQL, triggers, Lightning Web Components and integrations).
The top 20 Salesforce interview questions and answers below are a fast way to revise before a screening call or technical round.
Salesforce platform basics
1. What is Salesforce and what are its main clouds?
Salesforce is a cloud CRM platform. Main products include Sales Cloud, Service Cloud, Marketing Cloud, Experience Cloud, Commerce Cloud, Data Cloud and Agentforce, all built on the Salesforce Platform with a shared data model and security.
2. Standard vs. custom objects?
Standard objects such as Account, Contact, Lead, Opportunity and Case come with Salesforce. Custom objects (ending in __c) store business-specific data. Both support fields, relationships, page layouts and automation.
3. Lookup vs. master-detail relationship?
Master-detail is tightly coupled: the child inherits sharing, is deleted with the parent and supports roll-up summary fields. Lookup is loosely coupled, optional by default and does not cascade delete. Junction objects with two master-detail fields create many-to-many relationships.
4. What is the difference between a role, a profile and a permission set?
Profiles and permission sets control what users can do: object, field and system permissions. Roles control what records users can see through the role hierarchy. Salesforce recommends minimal profiles and granting access through permission sets and permission set groups.
Security and data access
5. Explain the Salesforce sharing model.
Organization-wide defaults set the baseline (Private, Public Read Only, Public Read/Write). Access opens up through the role hierarchy, sharing rules, teams, manual sharing and Apex managed sharing. Field-level security and object permissions control which fields and objects are accessible.
6. What are validation rules?
Validation rules use formulas to block saving records that break business rules, showing an error message to the user, for example requiring a close reason when an opportunity is Closed Lost.
7. How do you import and clean data in Salesforce?
Use Data Import Wizard for simple loads under 50,000 records, Data Loader or tools like Dataloader.io for larger loads, External IDs and upserts to avoid duplicates, and duplicate and matching rules to keep data clean.
Automation and Flow
8. What automation tools does Salesforce offer?
Flow (record-triggered, screen, scheduled, autolaunched and platform event-triggered) is the primary declarative tool. Workflow Rules and Process Builder are retired for new automation, and orgs are migrating them to Flow. Apex handles complex logic.
9. Before-save vs. after-save record-triggered flows?
Before-save (fast field update) flows update fields on the triggering record very efficiently without extra DML. After-save flows can create or update related records, send emails and call actions.
10. When should you use Apex instead of Flow?
Use Apex for complex logic, heavy data processing, callouts with complex error handling, high-volume operations where Flow would hit limits, or when you need unit-tested, reusable code. Many orgs combine Flow with invocable Apex.
Apex and SOQL
11. What are governor limits?
Because Salesforce is multi-tenant, it enforces limits per transaction, for example 100 SOQL queries and 150 DML statements in synchronous Apex, plus CPU time and heap size limits. Code must be bulkified to stay within them.
12. What is bulkification?
Writing code that handles many records at once: no SOQL or DML inside loops, use collections such as lists, sets and maps, and query and update in batches. Triggers can receive up to 200 records per batch.
13. What are trigger best practices?
One trigger per object, a trigger handler class that holds the logic, bulkified code, context variables (Trigger.new, Trigger.oldMap, isBefore), recursion control and avoiding hardcoded IDs.
14. SOQL vs. SOSL?
SOQL queries one object and its related objects with precise filters, like SQL SELECT. SOSL performs text search across multiple objects and fields at once.
15. What asynchronous Apex options exist?
Future methods for simple callouts, Queueable Apex for chainable jobs with complex types, Batch Apex for processing millions of records in chunks, and Scheduled Apex for timed runs. Platform events support event-driven processing.
16. How do you test Apex?
Write test classes with @isTest, create test data in the test, use Test.startTest() and Test.stopTest(), assert results, and mock callouts with HttpCalloutMock. At least 75% code coverage is required to deploy to production, but meaningful assertions matter more.
LWC, integration and deployment
17. What are Lightning Web Components?
LWC is Salesforce’s modern UI framework built on web standards: HTML templates, JavaScript classes and CSS. Components get data with Lightning Data Service, wire adapters and Apex methods, and communicate through properties, events and Lightning Message Service.
18. How do you integrate Salesforce with external systems?
Use REST and SOAP APIs, Bulk API 2.0 for large volumes, Named Credentials for secure callouts, platform events and Change Data Capture for event-driven integration, External Services, and middleware such as MuleSoft.
19. How do you deploy changes between environments?
Change sets for simple deployments; Salesforce DX with the Salesforce CLI, scratch orgs, source control and CI/CD (GitHub Actions, Copado, Gearset) for modern DevOps. DevOps Center offers a guided option.
20. Scenario: a trigger throws “Too many SOQL queries: 101”. How do you fix it?
Find queries inside loops, move them out and query once into a map, check for recursive trigger calls, consolidate automation running on the same object, and move heavy processing to asynchronous Apex.
How to prepare for a Salesforce interview
- Use a free Trailhead Playground or Developer Edition org to build objects, flows, Apex triggers and an LWC.
- Complete relevant Trailhead modules and superbadges.
- For admins: know security, reports and dashboards, Flow and data management. For developers: Apex, SOQL, testing, LWC and integrations.
- Prepare a story about a business process you automated and its impact.
See our Salesforce Administrator certification guide and JavaScript interview questions for LWC roles.
Frequently asked questions
What Salesforce questions are asked for admins?
Data model and relationships, profiles vs. permission sets, sharing model, validation rules, Flow, reports and dashboards, and data import.
What Salesforce questions are asked for developers?
Apex, triggers, governor limits, bulkification, SOQL, asynchronous Apex, test classes, LWC and integrations.
Is Salesforce certification required?
Not always, but Administrator and Platform Developer I certifications are commonly requested and help get interviews.
Got the interview? Make sure your resume tells the same story.
Interviewers read your resume right before they talk to you. HiReXL aligns it with the job description’s keywords so your experience and your answers match. HiReXL is built by 4As Consulting, a cloud and DevOps consulting firm. Looking for your next role? Submit your resume for open positions with PanAmerica Inc.


