Technical Interview Strategy & Mock Questions
📖 Concept
Salesforce interviews vary significantly by level. Understanding the format, expectations, and preparation strategy for each level is critical for career advancement.
Interview formats by level:
Developer (0-3 years):
Round 1: Technical screening (Apex basics, SOQL, triggers)
Round 2: Coding challenge (live coding or take-home)
Round 3: Platform knowledge (objects, security, Flows)
Round 4: Cultural fit / team match
Senior Developer (3-7 years):
Round 1: Deep technical (governor limits, async, performance)
Round 2: Architecture discussion (integration, LDV, multi-tenant)
Round 3: Code review exercise (review and improve existing code)
Round 4: System design (whiteboard solution for a business scenario)
Round 5: Leadership / behavioral
Technical Architect (7+ years):
Round 1: Architecture deep dive (multi-org, integration patterns)
Round 2: System design (enterprise-scale solution, 60 min)
Round 3: CTA-style scenario (mock CTA review board)
Round 4: Stakeholder management (communicate tech to non-tech)
Round 5: Executive presentation (defend architecture decisions)
Preparation strategy:
- Build projects — Nothing beats hands-on experience. Build 2-3 complete projects.
- Trailhead — Complete Superbadges (Apex Specialist, Data Integration, LWC)
- Certifications — Platform Developer I & II, Application Architect
- Practice — Explain concepts out loud (rubber duck technique)
- Mock interviews — Practice with peers or mentors
- System design — Practice designing systems on a whiteboard
Common interview themes:
- Governor limits and bulkification (asked at ALL levels)
- Security model (sharing, FLS, OWD)
- Integration patterns (REST, Platform Events, middleware)
- Trigger best practices (framework, recursion, order of execution)
- LWC lifecycle and communication patterns
- Performance optimization (LDV, query selectivity, caching)
💻 Code Example
1// Interview Coding Exercises23// 1. CLASSIC: Write a bulkified trigger4// Prompt: "Write a trigger that updates the Account's total revenue5// when Opportunities are inserted or updated."67trigger OpportunityTrigger on Opportunity (after insert, after update) {8 // Collect affected Account IDs9 Set<Id> accountIds = new Set<Id>();10 for (Opportunity opp : Trigger.new) {11 if (opp.AccountId != null) {12 accountIds.add(opp.AccountId);13 }14 }15 // Also check old values for reparented opps16 if (Trigger.isUpdate) {17 for (Opportunity opp : Trigger.old) {18 if (opp.AccountId != null) {19 accountIds.add(opp.AccountId);20 }21 }22 }2324 if (accountIds.isEmpty()) return;2526 // Aggregate opportunity amounts per account27 Map<Id, Decimal> revenueByAccount = new Map<Id, Decimal>();28 for (AggregateResult ar : [29 SELECT AccountId, SUM(Amount) totalAmount30 FROM Opportunity31 WHERE AccountId IN :accountIds32 AND StageName = 'Closed Won'33 GROUP BY AccountId34 ]) {35 revenueByAccount.put(36 (Id) ar.get('AccountId'),37 (Decimal) ar.get('totalAmount')38 );39 }4041 // Update accounts42 List<Account> accountsToUpdate = new List<Account>();43 for (Id accId : accountIds) {44 accountsToUpdate.add(new Account(45 Id = accId,46 Total_Revenue__c = revenueByAccount.containsKey(accId)47 ? revenueByAccount.get(accId) : 048 ));49 }50 update accountsToUpdate;51}5253// 2. CODE REVIEW: Find and fix all issues in this code54// Prompt: "Review this code and identify all problems"5556/*57 BUGGY CODE (find the issues):5859 trigger CaseTrigger on Case (after insert) {60 for (Case c : Trigger.new) {61 Account acc = [SELECT Id, Name FROM Account WHERE Id = :c.AccountId];62 c.Description = 'Account: ' + acc.Name;63 update c;6465 EmailService.sendEmail(c.ContactEmail, 'Case Created', c.Subject);6667 Task t = new Task();68 t.WhatId = c.Id;69 t.Subject = 'Follow up';70 insert t;71 }72 }7374 ISSUES:75 1. SOQL inside loop — will fail at 101 records76 2. DML inside loop (update c) — will fail at 151 records77 3. Cannot modify Trigger.new in after trigger (read-only)78 4. DML inside loop (insert t) — another DML per iteration79 5. Email in loop — will hit email invocation limit80 6. No null check on AccountId81 7. No error handling82 8. Single trigger, should use handler pattern83*/8485// FIXED VERSION:86public class CaseTriggerHandler {8788 public static void handleAfterInsert(List<Case> cases) {89 // Collect data90 Set<Id> accountIds = new Set<Id>();91 for (Case c : cases) {92 if (c.AccountId != null) accountIds.add(c.AccountId);93 }9495 // Query once96 Map<Id, Account> accounts = new Map<Id, Account>(97 [SELECT Id, Name FROM Account WHERE Id IN :accountIds]98 );99100 // Process101 List<Case> casesToUpdate = new List<Case>();102 List<Task> tasksToCreate = new List<Task>();103 List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();104105 for (Case c : cases) {106 // Update case description107 Account acc = accounts.get(c.AccountId);108 if (acc != null) {109 casesToUpdate.add(new Case(110 Id = c.Id,111 Description = 'Account: ' + acc.Name112 ));113 }114115 // Create follow-up task116 tasksToCreate.add(new Task(117 WhatId = c.Id,118 Subject = 'Follow up on case: ' + c.CaseNumber,119 ActivityDate = Date.today().addDays(1)120 ));121 }122123 // DML once each124 if (!casesToUpdate.isEmpty()) update casesToUpdate;125 if (!tasksToCreate.isEmpty()) insert tasksToCreate;126 }127}128129// 3. SYSTEM DESIGN: Design a Lead scoring system130// Prompt: "Design a system that scores Leads based on behavior and demographics"131132public class LeadScoringEngine {133134 // Configuration-driven scoring via Custom Metadata135 public static void scoreLeads(List<Lead> leads) {136 // Load scoring rules from Custom Metadata137 List<Lead_Score_Rule__mdt> rules = [138 SELECT Category__c, Field_Name__c, Operator__c,139 Value__c, Points__c140 FROM Lead_Score_Rule__mdt141 WHERE Is_Active__c = true142 ];143144 for (Lead lead : leads) {145 Integer score = 0;146147 for (Lead_Score_Rule__mdt rule : rules) {148 if (evaluateRule(lead, rule)) {149 score += (Integer) rule.Points__c;150 }151 }152153 lead.Lead_Score__c = score;154 lead.Score_Grade__c = getGrade(score);155 }156 }157158 private static Boolean evaluateRule(Lead lead, Lead_Score_Rule__mdt rule) {159 Object fieldValue = lead.get(rule.Field_Name__c);160 if (fieldValue == null) return false;161162 String valueStr = String.valueOf(fieldValue);163164 switch on rule.Operator__c {165 when 'equals' { return valueStr == rule.Value__c; }166 when 'contains' { return valueStr.contains(rule.Value__c); }167 when 'not_empty' { return String.isNotBlank(valueStr); }168 when else { return false; }169 }170 }171172 private static String getGrade(Integer score) {173 if (score >= 80) return 'A';174 if (score >= 60) return 'B';175 if (score >= 40) return 'C';176 if (score >= 20) return 'D';177 return 'F';178 }179}
🏋️ Practice Exercise
Interview Preparation Exercises:
- Practice explaining: "What happens when a user clicks Save on an Account?" (Order of Execution)
- Mock interview: Answer 10 Apex fundamentals questions in 20 minutes
- Code review exercise: Find and fix 10 bugs in a provided trigger
- System design exercise: Design a CRM system for a SaaS company on a whiteboard (45 min)
- Behavioral: Prepare STAR stories for 5 scenarios (disagreement, failure, leadership, deadline, learning)
- Live coding: Write a bulkified trigger with test class in 30 minutes
- Architecture: Present a multi-cloud solution proposal to a mock business audience
- Debug exercise: Given a debug log, identify the root cause of a governor limit exception
- Complete the Apex Specialist Superbadge on Trailhead
- Conduct a mock CTA review board with a peer (present architecture for a scenario)
⚠️ Common Mistakes
Jumping into coding without understanding the problem — always ask clarifying questions first. Interviewers evaluate your problem-solving approach
Not practicing out loud — knowing the answer in your head is different from articulating it clearly under interview pressure
Focusing only on coding — senior interviews are 50% architecture and communication. Practice system design and stakeholder communication
Not asking about requirements and constraints — in system design interviews, always ask about scale (users, data volume), performance requirements, and budget
Over-engineering interview answers — start simple, then add complexity. Show you understand the tradeoffs between simple and complex solutions
💼 Interview Questions
🎤 Mock Interview
Mock interview is powered by AI for Technical Interview Strategy & Mock Questions. Login to unlock this feature.