Salesforce is the world's leading CRM, with large demand for admins, developers and consultants. These Salesforce interview questions cover objects, security, reports and automation for admins and freshers, then Apex, triggers, governor limits, Lightning Web Components and integrations for experienced Salesforce developers.
30 questions · Updated
Reading answers is not the same as saying them.Practise Salesforce questions out loud and get a score, what you missed and a model answer for each one.
Practise free with AISalesforce Interview Questions: 30 questions with model answers on this page.
Basic Salesforce interview questions
Fundamentals, definitions and simple scenarios. Good for freshers and warm-ups.
1. What is Salesforce, and what are its main clouds?
Answer flow · 3 steps
1
Salesforce is a cloud-based CRM platform for managing customers, sales, service and marketing.
2
Sales Cloud manages leads, opportunities and pipelines; Service Cloud handles cases and customer support; Marketing Cloud runs campaigns and customer journeys; Commerce Cloud powers online stores; and Experience Cloud builds portals.
3
The underlying platform also lets companies build custom apps.
2. What is the difference between standard and custom objects?
Answer flow · 3 steps
1
Standard objects come with Salesforce, such as Account, Contact, Lead, Opportunity and Case.
2
Custom objects are created for business-specific data, such as Property or Policy, and their API names end with __c.
3
Both have fields, page layouts, relationships and security settings.
3. What is the difference between a lookup and a master-detail relationship?
A lookup is a loose link; the child can exist without the parent and has its own owner and sharing. In a master-detail relationship the child depends on the parent: deleting the master deletes the details, the child inherits the master's sharing and ownership, and roll-up summary fields on the master can count or sum the children.
4. What are record types and page layouts?
Answer flow · 3 steps
1
Record types let one object support different business processes, such as different picklist values, sales processes and page layouts for B2B and B2C opportunities.
2
Page layouts control which fields, related lists and buttons appear and in what order.
3
Profiles or permission sets decide which record types and layouts each user sees.
5. What are validation rules?
Answer flow · 3 steps
1
Validation rules check data when a record is saved and show an error if a formula evaluates to true, such as preventing a close date in the past for a won opportunity or requiring a reason when a discount exceeds 20%.
2
They enforce data quality without code.
3
Error messages should be clear and shown next to the relevant field.
6. What is the difference between formula fields and roll-up summary fields?
A formula field calculates a read-only value from other fields on the record or its parents, such as days until renewal or a full address. A roll-up summary field on a master record calculates a count, sum, minimum or maximum of related detail records, such as total order amount on an account, and only works with master-detail relationships.
7. How do reports and dashboards work?
Answer flow · 3 steps
1
Reports are built on report types, which define the objects and relationships available, and can be tabular, summary, matrix or joined, with filters, groupings, charts and formulas.
2
Dashboards show components based on reports, such as charts, gauges and metrics, and can run as a specific user or as the viewing user.
3
Reports can be scheduled and subscribed to.
8. Which tools are used to import data into Salesforce?
Answer flow · 3 steps
1
The Data Import Wizard in Setup handles up to 50,000 records for common objects and can prevent duplicates.
2
Data Loader handles millions of records for any object, supports insert, update, upsert, delete and export, and can be run from the command line.
3
Upserts use external ID fields to match records from other systems.
9. What types of sandboxes are there?
Answer flow · 5 steps
1
Developer sandboxes copy configuration only with small storage, for development.
2
Developer Pro sandboxes have more storage.
3
Partial Copy sandboxes include configuration and a sample of data defined by a template, for testing.
4
Full sandboxes copy all configuration and data, for performance testing, training and staging.
5
Scratch orgs are temporary orgs created from source for development.
10. What is AppExchange?
Answer flow · 3 steps
1
AppExchange is Salesforce's marketplace for apps, components and consulting services, such as e-signature, document generation, CPQ and integration tools.
2
Apps are installed as managed packages and have passed Salesforce's security review.
3
Before installing, check reviews, permissions, licence costs and whether it can be tested in a sandbox first.
11. What happens when a lead is converted?
Answer flow · 3 steps
1
Converting a qualified lead creates an account and a contact, and optionally an opportunity, or links to existing records to avoid duplicates.
2
Lead field values are mapped to the new records through lead field mapping, and activities move with them.
3
The converted lead becomes read-only and is kept for reporting on lead sources and conversion rates.
Intermediate Salesforce interview questions
Applied problems, trade-offs and questions about your own projects.
12. How does Salesforce security work?
Answer flow · 6 steps
1
Access is layered.
2
Organisation-wide defaults set the baseline record access, such as Private or Public Read Only.
3
Role hierarchy opens access upward to managers.
4
Sharing rules, teams and manual sharing extend access further.
5
Profiles and permission sets control object and field permissions, for example who can edit or see a field.
6
Salesforce recommends minimal profiles with access granted through permission sets.
13. What automation tools are available, and which do you use?
Answer flow · 4 steps
1
Flow is Salesforce's main declarative automation tool: record-triggered flows for actions when records change, screen flows for guided user processes, and scheduled flows.
2
Workflow rules and Process Builder have been retired in favour of Flow.
3
Approval processes handle approvals.
4
I use Apex only when the logic is too complex or needs high performance.
14. What are governor limits?
Answer flow · 3 steps
1
Because Salesforce is multi-tenant, it enforces limits per transaction so one org cannot monopolise shared resources.
2
Examples are 100 SOQL queries and 150 DML statements per synchronous transaction, 50,000 rows returned by queries and a CPU time limit of 10 seconds.
3
To stay within them, code must be bulkified: no queries or DML inside loops, and work done on collections of records.
15. What is the difference between SOQL and SOSL?
SOQL (Salesforce Object Query Language) queries records from one object and its related objects, like SQL SELECT, for example SELECT Name FROM Account WHERE Industry = 'Banking'. SOSL (Salesforce Object Search Language) performs a text search across multiple objects at once, useful when you do not know which object holds the data.
16. What types of asynchronous Apex are there?
Answer flow · 5 steps
1
Future methods (@future) run simple tasks later, such as callouts from triggers.
2
Queueable Apex runs jobs that can accept complex types, be chained and be monitored.
3
Batch Apex processes large numbers of records in chunks with start, execute and finish methods.
4
Schedulable Apex runs code at set times.
5
Async jobs have their own, higher governor limits.
17. What makes good Apex test classes?
Tests should create their own data (with @testSetup or a test data factory) instead of relying on org data, test bulk operations with 200 records, test positive, negative and permission scenarios with System.runAs, use Test.startTest and Test.stopTest to reset limits and run async code, mock callouts with HttpCalloutMock, and assert outcomes rather than just aiming for 75% coverage.
18. What do with sharing and without sharing mean?
with sharing makes an Apex class respect the current user's record-level sharing rules, so queries only return records the user can see. without sharing ignores sharing, which is needed for some system operations. inherited sharing uses the sharing mode of the caller. Field and object permissions are enforced separately with WITH USER_MODE, Security.stripInaccessible or user-mode DML.
19. How do you deploy changes between orgs?
Answer flow · 3 steps
1
Change sets move metadata between connected orgs through the Setup UI, which is simple but manual.
2
Salesforce CLI with source-tracked projects in Git supports proper version control and automated deployments in CI/CD pipelines.
3
DevOps Center provides a guided, Git-based workflow for admins, and unlocked packages group metadata into versioned modules.
20. What is the difference between custom metadata types and custom settings?
Answer flow · 3 steps
1
Custom metadata types store configuration as metadata, so records can be deployed between orgs with change sets or packages, are cached, and can be used in formulas, validation rules and flows without SOQL limits.
2
Custom settings store data that is not deployable and can vary by user or profile (hierarchy settings).
3
Custom metadata is preferred for application configuration such as mappings and thresholds.
21. What are the Lightning App Builder and Dynamic Forms?
The Lightning App Builder lets admins design record pages, home pages and app pages by dragging standard, custom and AppExchange components, with visibility rules to show components only to certain users or when field values match. Dynamic Forms place individual fields and sections on the page with their own visibility rules, replacing rigid page layouts.
22. How is case management set up in Service Cloud?
Cases are created from email-to-case, web-to-case, chat, phone and messaging channels. Assignment rules route cases to queues or agents, Omni-Channel routes work based on capacity and skills, escalation rules escalate cases that are not resolved in time, entitlements and milestones track service level agreements, and the knowledge base and macros help agents resolve cases faster.
High level Salesforce interview questions
System design, deep internals, leadership and tough follow-ups.
23. How do you write a good Apex trigger?
Answer flow · 3 steps
1
I use one trigger per object that delegates to a handler class, so logic is organised and testable.
2
Code is bulkified to handle up to 200 records, with queries outside loops and maps for lookups.
3
I use before triggers to change fields on the same record and after triggers for related records, guard against recursion, and write test classes with at least 75% coverage (aiming higher) that test bulk and negative cases.
24. What are Lightning Web Components?
Answer flow · 4 steps
1
Lightning Web Components (LWC) is Salesforce's modern UI framework based on web standards: custom elements, shadow DOM and modern JavaScript.
2
A component has an HTML template, a JavaScript class and metadata.
3
Data is read with the wire service from Lightning Data Service or Apex methods marked @AuraEnabled(cacheable=true).
4
LWC is faster and closer to standard JavaScript than the older Aura framework.
25. How do you integrate Salesforce with an external system?
Answer flow · 3 steps
1
For outbound calls I use Apex HTTP callouts with Named Credentials to store endpoints and authentication securely, run asynchronously with Queueable or future methods when called from triggers.
2
For inbound data, external systems use the REST, SOAP or Bulk API with OAuth connected apps, or I expose custom Apex REST services.
3
For events I use Platform Events or Change Data Capture, and middleware such as MuleSoft for complex landscapes.
26. How do you handle large data volumes in Salesforce?
Write selective SOQL queries that filter on indexed fields (IDs, external IDs, standard indexed fields or custom indexes), avoid filters that cannot use indexes such as leading wildcards or negative operators, use Batch Apex or Bulk API for mass processing, archive old data with Big Objects or external storage, avoid data skew where one parent has more than about 10,000 child records, and consider skinny tables through Salesforce support.
27. What is the order of execution when a record is saved?
Salesforce loads the record and applies new values, runs system validation, then before-save record-triggered flows, before triggers, custom validation rules and duplicate rules, saves the record without committing, runs after triggers, assignment, auto-response and escalation rules, after-save flows and other automation, roll-up summary calculations on parents, and finally commits and runs post-commit logic such as emails and async jobs. Knowing the order prevents conflicting automation.
28. What is Agentforce?
Agentforce is Salesforce's platform for AI agents that can answer questions and take actions on behalf of customers and employees, for example resolving service cases or qualifying leads, using the company's CRM data. Agents are configured with topics, instructions and actions built from flows, Apex and prompts, grounded in Data Cloud data, with the Einstein Trust Layer for data security.
29. What does Salesforce Shield provide?
Shield adds Platform Encryption to encrypt sensitive data at rest while keeping functionality, Event Monitoring to track user activity such as logins, report exports and API calls for security investigations, Field Audit Trail to keep field history for up to ten years for compliance, and Data Detect to find sensitive data. It is used in regulated industries such as banking and healthcare.
30. How do Lightning Web Components communicate?
Answer flow · 4 steps
1
Parents pass data down to children through public @api properties and can call public methods.
2
Children send information up by dispatching custom events that the parent handles.
3
Unrelated components, even across the DOM or with Aura and Visualforce, communicate through Lightning Message Service channels.
4
Data is read with the wire service (reactive, cached) or imperative Apex calls when you need control over timing.
Ready to test yourself?Pick your topics and level, answer by voice or text, and get instant feedback. Free.