Choose the pattern by direction, volume and timing. For Salesforce calling out, use Apex callouts through Named Credentials so endpoints and authentication stay out of code, called asynchronously from triggers. For external systems calling in, use the standard REST or Bulk APIs, or a custom Apex REST service when logic is needed. For event driven sync, use Platform Events or Change Data Capture, and consider middleware when many systems are involved.
Why interviewers ask this
Integration is a large part of real Salesforce work, and the interviewer wants a decision framework rather than a single favourite technique. They listen for direction, volume and latency as the deciding factors, Named Credentials for secure configuration, the rule that triggers cannot make synchronous callouts, and the right API for bulk data. Mentioning retries, idempotency and monitoring shows you have kept an integration running after go live.
How to structure your answer
- Identify the direction, volume and timing requirements.
- Describe outbound callouts and Named Credentials.
- Describe inbound APIs and event driven options.
- Cover reliability: retries, idempotency, limits and monitoring.
Example answer
I start with direction, volume and timing. For Salesforce calling an external system, I write Apex callouts and put the endpoint and authentication in a Named Credential, so there are no URLs or tokens in code and each sandbox can point somewhere different. Callouts cannot run synchronously from a trigger, so record driven calls go through a Queueable that allows callouts. For an external system pushing data in, the standard REST API is usually enough for small volumes, the Bulk API handles large loads, and a custom Apex REST endpoint is only for incoming data that needs logic Salesforce should own. For keeping systems in sync as records change, Change Data Capture or Platform Events let subscribers react without polling. With several systems involved, middleware usually beats point to point connections. Whatever the pattern, I design for failure: an external id so retries become idempotent upserts, a log object for failed calls, and alerts, because integrations tend to break quietly.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- How would you handle an external API that rate limits you?
- When would you choose Change Data Capture over Platform Events?
- How do you keep integration credentials different across sandboxes?
Related salesforce developer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions