1. Salesforce Fundamentals
1. What is Salesforce?
Expert answer:
Salesforce is a cloud-based CRM and application platform that provides standard functionality for sales, service, marketing, analytics, integration, and custom application development.
As a developer, I would typically work with:
- Apex
- SOQL/SOSL
- Lightning Web Components
- Flow
- REST/SOAP APIs
- Platform Events
- Async Apex
- Salesforce security
- DevOps/CI/CD
The important point is that Salesforce is not simply a CRM database; it is a metadata-driven application platform.
2. What is the difference between Standard and Custom Objects?
Standard Objects are provided by Salesforce:
Account
Contact
Lead
Opportunity
Case
User
Custom Objects are created for business-specific requirements:
Payment__c
Transaction__c
Customer_Request__c
Custom object API names generally end with __c.
3. Explain Lookup vs Master-Detail relationship.
| Lookup | Master-Detail |
|---|---|
| Looser relationship | Strong relationship |
| Child can generally exist independently | Child depends on parent |
| Supports optional relationship | Parent is required |
| Ownership/security remain separate | Child inherits important properties from parent |
| No native roll-up summary | Supports roll-up summary fields |
Interview tip: Don’t simply say “Master-Detail is stronger.” Explain why the business requirement needs that relationship.
4. What is a Junction Object?
A junction object implements a many-to-many relationship.
Example:
Customer
|
|--- Customer_Product__c
|
Product
Customer_Product__c contains two Master-Detail relationships:
Customer__c
Product__c
One customer can have many products, and one product can belong to many customers.
5. What are Governor Limits?
Governor limits protect the shared Salesforce platform from inefficient code.
For example, developers must consider limits around:
- SOQL queries
- DML statements
- CPU time
- Heap size
- Callouts
- Query rows
A developer should design for limits, rather than discover them after deployment.
2. Apex & Triggers
6. What is Apex?
Apex is Salesforce’s strongly typed, object-oriented programming language.
It is primarily used for:
- Business logic
- Triggers
- Controllers
- Services
- Async processing
- Integrations
- Scheduled jobs
- Database operations
Example:
public class AccountService {
public static List<Account> getAccounts() {
return [
SELECT Id, Name
FROM Account
LIMIT 100
];
}
}
7. What is a Trigger?
A trigger executes Apex automatically when a Salesforce record event occurs.
Common events:
before insert
after insert
before update
after update
before delete
after delete
after undelete
Example:
trigger AccountTrigger on Account (before insert, before update) {
for (Account acc : Trigger.new) {
if (String.isBlank(acc.Description)) {
acc.Description = 'Created by automation';
}
}
}
8. What is Trigger.new vs Trigger.old?
Trigger.new contains the new versions of records.
Trigger.old contains the previous versions.
Example:
for (Account acc : Trigger.new) {
Account oldAcc = Trigger.oldMap.get(acc.Id);
if (acc.Name != oldAcc.Name) {
System.debug('Account name changed');
}
}
For update comparisons, Trigger.oldMap is usually more convenient.
9. What is Trigger.newMap and Trigger.oldMap?
They provide records as maps keyed by Salesforce Id.
Account oldAccount =
Trigger.oldMap.get(account.Id);
This makes record comparison and relationship lookup efficient.
10. What is a bulkified trigger?
A bulkified trigger works correctly when Salesforce processes one record or hundreds of records in the same transaction.
โ Bad:
for (Account acc : Trigger.new) {
List<Contact> contacts = [
SELECT Id
FROM Contact
WHERE AccountId = :acc.Id
];
}
The SOQL is inside the loop.
โ Better:
Set<Id> accountIds = new Set<Id>();
for (Account acc : Trigger.new) {
accountIds.add(acc.Id);
}
List<Contact> contacts = [
SELECT Id, AccountId
FROM Contact
WHERE AccountId IN :accountIds
];
Interview phrase to remember:
“I always design triggers for bulk execution and avoid SOQL and DML inside loops.”
11. How do you prevent multiple trigger executions?
Use a Trigger Handler framework and controlled recursion prevention.
Example architecture:
AccountTrigger
โ
AccountTriggerHandler
โ
AccountService
โ
AccountRepository
Instead of putting all business logic directly inside the trigger.
12. Trigger vs Flow โ which one do you choose?
My first question would be:
Can the requirement be reliably implemented using Flow without unnecessary complexity?
For straightforward declarative automation, Flow may be appropriate.
Use Apex when requirements involve:
- Complex algorithms
- Advanced transaction control
- Complex integrations
- Sophisticated reusable business logic
- Processing that exceeds practical Flow complexity
The important interview answer isn’t “Apex is better.”
It’s:
“I choose the simplest maintainable solution that meets the functional, performance, security and operational requirements.”
3. SOQL & Data
13. What is SOQL?
SOQL means Salesforce Object Query Language.
Example:
List<Account> accounts = [
SELECT Id, Name, Industry
FROM Account
WHERE Industry = 'Banking'
];
14. What is SOSL?
SOSL is Salesforce Object Search Language.
It searches text across multiple objects.
Example:
List<List<SObject>> results = [
FIND 'American'
IN ALL FIELDS
RETURNING
Account(Id, Name),
Contact(Id, Name, Email)
];
Simple distinction:
SOQL โ Query specific objects
SOSL โ Search across objects
15. Explain parent-to-child SOQL.
Example:
List<Account> accounts = [
SELECT Id, Name,
(SELECT Id, FirstName, LastName
FROM Contacts)
FROM Account
];
Access:
for (Account acc : accounts) {
for (Contact con : acc.Contacts) {
System.debug(con.LastName);
}
}
16. Explain child-to-parent SOQL.
Example:
List<Contact> contacts = [
SELECT Id, LastName, Account.Name
FROM Contact
];
Here:
Contact โ Account
is traversed using relationship notation.
17. How do you optimize a slow SOQL query?
I would investigate:
- Number of records returned
- Selectivity
- WHERE conditions
- Indexed fields
- Query plan
- Relationship queries
- Unnecessary fields
- Data volume
- Sharing/security overhead
- Whether processing should be asynchronous
Don’t simply add LIMIT.
LIMIT can hide a data-volume problem rather than solve it.
4. Asynchronous Apex
18. What is Future Apex?
Future methods run asynchronously.
Example:
@future(callout=true)
public static void sendCustomerData(Set<Id> accountIds) {
// callout logic
}
However, for new designs I would generally consider Queueable Apex when I need better control and more flexibility.
19. Queueable vs Future?
| Future | Queueable |
|---|---|
| Simple async processing | More flexible |
| Limited parameter types | Supports complex objects |
| Less control | Job ID available |
| Legacy/common pattern | Preferred for many modern async designs |
Example:
public class AccountSyncJob implements Queueable {
private Set<Id> accountIds;
public AccountSyncJob(Set<Id> accountIds) {
this.accountIds = accountIds;
}
public void execute(QueueableContext context) {
// processing
}
}
Execute:
System.enqueueJob(
new AccountSyncJob(accountIds)
);
20. Queueable vs Batch Apex?
Use Queueable for a discrete asynchronous job.
Use Batch Apex when processing potentially very large data sets.
Queueable
โ
Specific async job
Batch
โ
Large-volume processing
A common interview scenario:
“Process 20 million transaction records.”
I’d investigate Batch Apex and possibly a different data-processing architecture rather than trying to handle everything synchronously.
21. What is Batch Apex?
Batch Apex processes records in chunks.
global class TransactionBatch
implements Database.Batchable<SObject> {
global Database.QueryLocator start(
Database.BatchableContext bc
) {
return Database.getQueryLocator(
'SELECT Id FROM Transaction__c'
);
}
global void execute(
Database.BatchableContext bc,
List<Transaction__c> scope
) {
// process scope
}
global void finish(
Database.BatchableContext bc
) {
// final processing
}
}
22. What is Scheduled Apex?
Scheduled Apex executes Apex at a specified time.
Example:
global class DailyTransactionJob
implements Schedulable {
global void execute(SchedulableContext sc) {
// execute job
}
}
5. Lightning Web Components
23. What is LWC?
Lightning Web Components is Salesforce’s modern component framework based on standard web technologies.
It uses:
HTML
JavaScript
CSS
Salesforce APIs
Apex
Typical structure:
customerList/
customerList.html
customerList.js
customerList.js-meta.xml
24. Explain @wire in LWC.
@wire provides reactive access to Salesforce data.
Example:
import { LightningElement, wire } from 'lwc';
import getAccounts from '@salesforce/apex/AccountController.getAccounts';
export default class AccountList extends LightningElement {
@wire(getAccounts)
accounts;
}
HTML:
<template>
<template for:each={accounts.data} for:item="account">
<p key={account.Id}>{account.Name}</p>
</template>
</template>
25. When would you use Lightning Data Service instead of Apex?
If standard Salesforce data APIs can satisfy the requirement, LDS/UI APIs can reduce custom Apex.
For example:
Create record
Edit record
View record
Delete record
If I need complex server-side business logic, custom querying, or integration logic, Apex may be appropriate.
26. How does a child component communicate with its parent?
Use a CustomEvent.
Child:
this.dispatchEvent(
new CustomEvent('recordselected', {
detail: this.recordId
})
);
Parent:
<c-child
onrecordselected={handleRecordSelected}>
</c-child>
JavaScript:
handleRecordSelected(event) {
console.log(event.detail);
}
27. How does a parent communicate with a child?
The parent can pass data using @api.
Child:
import { LightningElement, api } from 'lwc';
export default class ChildComponent
extends LightningElement {
@api recordId;
}
Parent:
<c-child record-id={recordId}></c-child>
28. How would you improve LWC performance?
I’d consider:
- Avoid unnecessary Apex calls
- Use LDS where appropriate
- Use
@wireappropriately - Lazy-load expensive UI
- Reduce DOM rendering
- Avoid unnecessary reactivity
- Paginate large datasets
- Cache appropriate data
- Query only required fields
- Move expensive processing server-side when appropriate
6. Salesforce Security
29. What is the difference between Profile, Permission Set and Permission Set Group?
Profile
Defines baseline permissions.
Permission Set
Adds additional permissions without changing the user’s profile.
Permission Set Group
Combines multiple permission sets into a logical permission bundle.
Modern Salesforce implementations generally favor permission sets/groups for flexible access management.
30. What is with sharing?
Example:
public with sharing class AccountService {
}
It ensures the class respects applicable Salesforce record-sharing rules.
But remember:
with sharingdoes not automatically solve every CRUD/FLS requirement.
31. How do you enforce CRUD/FLS in Apex?
Depending on the use case, you can use:
WITH USER_MODE
and/or security mechanisms such as:
Security.stripInaccessible(...)
Example:
List<Account> accounts = [
SELECT Id, Name
FROM Account
WITH USER_MODE
];
For an interview, explain record-level sharing and object/field-level security separately.
32. How do you secure an LWC calling Apex?
I would consider:
- Apex sharing model
- CRUD/FLS enforcement
- User-mode operations where appropriate
- Input validation
- Avoiding dynamic SOQL injection
- Sharing only required data
- Proper error handling
7. Integrations
33. How would you integrate Salesforce with an external payment system?
I would first clarify:
Real-time or asynchronous?
Volume?
Authentication?
Failure handling?
Retry requirements?
Idempotency?
Security?
Monitoring?
Possible architecture:
Salesforce
โ
Platform Event / Queueable
โ
Integration Layer
โ
Payment System
For a financial-services environment, reliability, security and auditability should be first-class concerns.
34. What are Named Credentials?
Named Credentials provide a centralized way to configure authentication and endpoint information for external callouts.
Conceptually:
Apex
โ
Named Credential
โ
External API
This avoids hardcoding credentials in Apex.
35. How do you perform an HTTP callout?
Example:
HttpRequest req = new HttpRequest();
req.setEndpoint(
'callout:Payment_NC/transactions'
);
req.setMethod('GET');
Http http = new Http();
HttpResponse response = http.send(req);
System.debug(response.getStatusCode());
36. Can you make a callout directly from a trigger?
A trigger cannot simply perform a synchronous external callout as normal trigger logic.
A common design is:
Trigger
โ
Queueable / Platform Event
โ
Callout
โ
External System
This keeps the transaction architecture cleaner and avoids coupling database work directly to an external system’s response time.
37. What are Platform Events?
Platform Events support event-driven communication.
Example:
Salesforce
|
| TransactionCompleted__e
โ
Event Bus
โ
External Consumer
They are useful when systems don’t need tight synchronous coupling.
38. REST vs SOAP?
REST
- Lightweight
- JSON commonly used
- Easy for web/mobile integrations
- Resource-oriented
SOAP
- XML
- Strong contract through WSDL
- Useful in enterprise environments with established SOAP integrations
The correct choice depends on the external system and integration contract.
8. Testing & Deployment
39. What is an Apex test class?
It validates Apex functionality.
Example:
@IsTest
private class AccountServiceTest {
@IsTest
static void testAccountCreation() {
Account acc = new Account(
Name = 'Test Account'
);
insert acc;
System.assertNotEquals(
null,
acc.Id
);
}
}
40. Why use Test.startTest() and Test.stopTest()?
They create a fresh governor-limit context for the code being tested and allow asynchronous operations queued during the test to execute at Test.stopTest().
Example:
Test.startTest();
System.enqueueJob(
new AccountSyncJob(accountIds)
);
Test.stopTest();
41. What is a Mock/HttpCalloutMock?
It allows tests to simulate an external HTTP response without actually calling the external system.
Example:
Test.setMock(
HttpCalloutMock.class,
new PaymentApiMock()
);
This is critical for testing integration code reliably.
42. What is Salesforce DX?
Salesforce DX is a development approach and tooling model supporting:
- Source-driven development
- Salesforce CLI
- Version control
- Scratch orgs
- Automated deployment
- CI/CD
A mature Salesforce team should treat metadata and code as version-controlled assets.
43. Explain a Salesforce CI/CD pipeline.
A typical pipeline could look like:
Developer
โ
Git Branch
โ
Pull Request
โ
Static Analysis
โ
Unit Tests
โ
Integration Tests
โ
Deployment Validation
โ
Production
Tools can include Salesforce CLI and CI/CD platforms such as GitHub Actions, Jenkins, GitLab, Azure DevOps, Copado or Gearset.
9. Scenario-Based Amex Questions
This section is especially important. Current interview guidance emphasizes scenario-level reasoning rather than memorized definitions.
44. A trigger works for one record but fails with 200 records. What do you check?
My first checks:
SOQL inside loops
DML inside loops
CPU consumption
Heap usage
Recursive automation
Flow-trigger interaction
Number of queries
Number of DML statements
Then I’d reproduce the issue with bulk test data and refactor the transaction.
45. Salesforce must synchronize millions of transactions with an external system. How would you design it?
I would avoid a synchronous trigger-to-API design.
Possible architecture:
Transaction
โ
Salesforce
โ
Platform Event / Async Processing
โ
Integration Layer
โ
External System
For large historical loads:
Batch / Bulk processing
โ
Integration layer
โ
External system
I’d also define:
- Retry strategy
- Idempotency
- Dead-letter/error handling
- Monitoring
- Authentication
- Correlation IDs
- Audit trail
46. A payment API is temporarily unavailable. What should Salesforce do?
Don’t repeatedly block the user transaction waiting for the API.
I’d consider:
Transaction
โ
Persist business state
โ
Queueable/Event
โ
External API
โ
Success โ mark completed
Failure โ retry
โ
Dead-letter/error state
I’d also ensure retries are idempotent so the same transaction isn’t accidentally processed twice.
47. An LWC displays 50,000 transaction records. How would you optimize it?
I would not load all 50,000 records into the browser.
Instead:
Search/filter
โ
Server-side query
โ
Pagination / incremental loading
โ
Small result set
โ
LWC
I’d also review query selectivity, indexing, fields returned, caching and user experience.
48. Users can see records they shouldn’t see. How would you troubleshoot?
I’d check security layer by layer:
Object permissions
โ
Field permissions
โ
Record ownership
โ
Role hierarchy
โ
Sharing rules
โ
Manual sharing
โ
Apex sharing behavior
โ
LWC/API access
I’d reproduce the issue using the affected user’s permissions rather than testing only as an administrator.
49. A production deployment introduced a regression. What would you do?
My approach:
1. Stabilize
Determine business impact and stop further damage.
2. Diagnose
Check:
- Logs
- Recent deployment
- Error patterns
- Integration failures
- Governor-limit exceptions
3. Mitigate
Rollback or deploy a safe corrective change depending on the situation.
4. Root cause
Identify why testing/review didn’t catch it.
5. Prevent
Add:
- Automated tests
- Regression coverage
- Static analysis
- Better deployment validation
- Monitoring
A strong answer demonstrates ownership rather than blame.
50. Why should American Express hire you as a Salesforce Developer?
A strong answer could be:
I bring a combination of Salesforce development skills and production-oriented thinking.
My focus isn’t only on writing Apex or LWC code. I think about bulkification, governor limits, security, integration reliability, testability, performance, and maintainability from the beginning.
For example, when designing an integration, I would consider authentication, asynchronous processing, retries, idempotency, monitoring, and failure handling instead of simply making an API call.
I also believe in choosing the right Salesforce tool for the problem โ Flow when declarative automation is appropriate, Apex when the requirement needs programmatic control, and event-driven or asynchronous patterns when scalability and reliability matter.
For a company operating technology at American Express’s scale, I understand that customer trust, reliability, security, and engineering quality are just as important as getting the feature to work.
๐ฏ 10 Questions You Should Practice Out Loud
If your interview is soon, prioritize these:
- How do you bulkify a trigger?
- Trigger vs Flow โ when do you choose each?
- Queueable vs Batch Apex?
- How do you handle a callout from Salesforce?
- How do you design Salesforce-to-external-system synchronization?
- How do you secure Apex?
- How do you optimize a slow SOQL query?
- How do parent and child LWCs communicate?
- How would you process millions of transactions?
- Tell me about a production issue you solved and what you learned.
SALESFORCE INTERVIEW PREPARATION
๐ 1โ4 Years Experience โ 100 Real Scenario-Based Questions
https://trailheadtitanshub.com/100-real-salesforce-scenario-based-interview-questions-2025-edition-for-1-4-years-experience/
๐ 4โ8 Years Experience โ 100 Real-Time Scenario Questions
https://trailheadtitanshub.com/100-real-time-salesforce-scenario-based-interview-questions-2025-edition-for-4-8-years-experience/
๐ Admin + Apex + SOQL + LWC + VF + Integration
https://trailheadtitanshub.com/100-real-time-salesforce-interview-questions-scenarios-2025-edition-admin-apex-soql-lwc-vf-integration/
๐ฅ Salesforce Interview Mega Pack โ Recruiter Questions & Answers
https://trailheadtitanshub.com/salesforce-interview-mega-pack-600-real-questions-from-recruiter-calls-with-my-best-performing-answers/
๐ผ 1000+ Real Developer & Admin Interview Q&A โ EY, Infosys, TCS, Dell & More
https://trailheadtitanshub.com/500-real-interview-questions-answers-from-top-tech-companies-ey-infosys-tcs-dell-salesforce-more/
SALESFORCE NOTES PRO โ 2026
โญ Salesforce Notes Pro 2026 Edition
Complete Admin + Developer + LWC + Apex + Flow + Interview Preparation Bundle
SALESFORCE PROJECT & INTERVIEW ROADMAP
๐ Salesforce Sales Cloud Project Guide
https://trailheadtitanshub.com/salesforce-project-sales-cloud/
๐ฅ 34-Day Salesforce Interview Battle Plan
https://trailheadtitanshub.com/crack-the-interview-real-questions-real-struggles-my-students-34-day-journey/
SALESFORCE MASTER GUIDES โ 2026 EDITION
๐ Apex Programming โ Premium Printed Book
https://trailheadtitans.com/product/salesforce-apex-programming-complete-master-guide-2026-edition-premium-printed-book/
๐ Salesforce Administrator
https://trailheadtitans.com/product/salesforce-administrator-complete-master-guide-2026-edition/
๐ Lightning Web Components (LWC)
https://trailheadtitans.com/product/salesforce-lightning-web-components-lwc-complete-master-guide-2026-edition/
๐ Salesforce Security Model
https://trailheadtitans.com/product/salesforce-security-model-complete-master-guide-2026-edition/
๐ SOQL & SOSL
https://trailheadtitans.com/product/salesforce-soql-sosl-complete-master-guide-2026-edition/
๐ Salesforce Integrations
https://trailheadtitans.com/product/salesforce-integrations-complete-master-guide-2026-edition/
๐ Visualforce
https://trailheadtitans.com/product/salesforce-visualforce-complete-master-guide-2026-edition/
๐ Aura Components
https://trailheadtitans.com/product/salesforce-aura-components-complete-master-guide-2026-edition/
๐ Asynchronous Apex
https://trailheadtitans.com/product/salesforce-asynchronous-apex-complete-master-guide-2026-edition/
๐ Salesforce Flow Builder
https://trailheadtitans.com/product/salesforce-flow-builder-complete-master-guide-2026-edition/




