Salesforce Developer Interview Questions at 🏦 American Express
A GradX Academy student recently attended a Salesforce Developer interview at American Express on July 1, 2024, and shared some of the most challenging and technical questions they encountered.
If you're preparing for a similar role, reviewing these questions along with detailed answers and best practices will give you an edge. Let's dive in!
1️⃣ How does Sharing & Security impact API access in Salesforce?
Answer: Sharing & security settings in Salesforce affect API access by determining what data users or external systems can access:
🔹 Profiles & Permission Sets: Control CRUD (Create, Read, Update, Delete) operations on objects.
🔹 Sharing Rules & OWD (Org-Wide Defaults): Define record visibility. APIs will respect these settings.
🔹 API User & Integration User Permissions: API requests can be limited by user permissions.
🔹 OAuth & Connected Apps: API authentication is controlled via OAuth scopes.
🔹 Field-Level Security (FLS): API responses omit fields that the user doesn't have access to.
✅ Best Practice: Use the WITH SECURITY_ENFORCED
clause in SOQL queries to enforce security.
2️⃣ How do you handle parent-to-child and child-to-parent communication in LWC?
Parent-to-Child Communication:
Use @api decorator to expose properties in the child component.
Child-to-Parent Communication:
Use Custom Events.
3️⃣ Queueable Apex vs. Future Methods vs. Batch Apex—When to Use What?
Feature | Future Methods | Queueable Apex | Batch Apex |
---|---|---|---|
Use Case | Simple async processing | Chainable, more control | Large data processing |
Chaining | ❌ Not possible | ✅ Possible (one additional job) | ✅ Possible (for batch jobs) |
Governors | No SObject return, limits on heap size | Can return SObjects, better limits | Processes in chunks |
Example | Callouts, lightweight tasks | Complex async operations | Processing large records |
✅ Best Practice: Use Queueable Apex instead of Future Methods for better flexibility.
To enqueue:
4️⃣ How do you ensure security while integrating an external system with Salesforce?
🔹 Use OAuth 2.0 for authentication instead of hardcoding credentials.
🔹 Implement Named Credentials for secure API calls.
🔹 Limit API Access using permission sets & IP restrictions.
🔹 Validate input data to prevent SOQL Injection.
Example of SOQL Injection Prevention:
5️⃣ What authentication mechanisms are available for Salesforce REST API?
🔹 OAuth 2.0 (Preferred) - Secure, used for web apps and integrations.
🔹 Session ID - Extracted from the logged-in user session (not recommended for external apps).
🔹 Basic Authentication - Deprecated, avoid using username/password in requests.
OAuth Flow Example:
6️⃣ What is Platform Event-Based Integration, and how does it work?
Platform Events enable real-time event-driven architecture.
Key Components:
1️⃣ Define Platform Event
2️⃣ Publish Event in Apex
3️⃣ Subscribe via Trigger or External System
Example of Publishing a Platform Event:
✅ Use Case: Notify an external system in real time when an opportunity closes.
7️⃣ How do you debug and troubleshoot CPU time limits & heap size issues in Salesforce?
🔹 Use Limits Class:
🔹 Optimize Queries:
✅ Use Filters & Selective Queries
❌ Avoid SELECT * FROM Object
🔹 Use Collection Processing Instead of SOQL in Loops
8️⃣ How do you handle API rate limits in Salesforce REST API?
✅ Best Practices:
🔹 Cache responses where possible.
🔹 Implement Exponential Backoff for retries.
🔹 Use Composite APIs to reduce calls.
Example of API Limit Check:
9️⃣ What strategies can optimize REST API performance in Salesforce?
🔹 Enable Compression: Use Accept-Encoding: gzip
in headers.
🔹 Use Composite API: Reduce multiple requests into one.
🔹 Paginate Results: Fetch records in batches.
Example: Composite API Usage
🔚 Final Thoughts
The Salesforce Developer interview at American Express was challenging and covered a wide range of Apex, LWC, API, and Security topics.
If you're preparing for a Salesforce Developer role, practice coding, understand integrations, and focus on security best practices.
📢 Have you faced similar interview questions? Drop your thoughts in the comments!
🔗 Share this with fellow Salesforce Developers preparing for their next big opportunity!
#Salesforce #SalesforceInterview #SalesforceDeveloper #APIIntegration #LWC #Apex #AmericanExpress #GradXAcademy