ForceChallenges
ProblemsDailyNotesInterview
Sign in

Practice

All problemsSOQL practiceApex trigger challengesDaily challengeOpportunityTrigger.oldMapBefore UpdateBulkificationContactValidationGROUP BYSemi-JoinAccountBefore Insert

Interview questions

All questionsAdminAdministrationApexApex TriggerAsync ApexDevelopmentField ServiceField ServiceIntegrationLwc

By company

DeloitteSalesforceAccentureInfosysPwCCognizant

Learn

Study notes

ForceChallenges

AboutContact usPrivacy PolicyTerms of ServiceFor AI assistants (llms.txt)
© 2026 ForceChallenges · Salesforce SOQL & Apex trigger practice
Integration questions71 of 100
IntegrationMedium 2 min read

What core architectural best practices govern resilient, scalable enterprise integration design in Salesforce?

Answer

Basics: An integration is a contract between systems that fail independently. Good design asks: Is it real-time or batch? Who is the system of record? What happens when a call fails or repeats? How much volume and how many API calls? The Salesforce Integration Patterns catalog groups answers: Request and Reply, Fire and Forget, Batch Data Synchronization, Remote Call-In, UI Update Based on Data Changes, and Data Virtualization.

How it works:

  1. Define data ownership and direction per entity.
  2. Pick the pattern: synchronous request-reply for user-facing lookups; asynchronous fire-and-forget for non-blocking updates; Bulk API for volume; Salesforce Connect for virtualized reads; events for change notification.
  3. Secure it: OAuth, Named/External Credentials, least-privilege integration user, TLS.
  4. Make it reliable: idempotent operations, retries with backoff, dead-letter handling, logging with correlation IDs.
  5. Observe: dashboards on failures, API usage, event backlog.

Advanced / deep dive: Use event-driven designs: Platform Events, Change Data Capture and the Pub/Sub API (gRPC) instead of polling; events have a replay window of 72 hours, so subscribers must store the last replay ID and resync from source if they are down longer (verify the current retention for your event type). Use middleware (MuleSoft, an ESB or iPaaS) when you need transformation, orchestration, many consumers or protocol translation, rather than point-to-point spaghetti. Respect limits: 100 callouts per transaction, 120 seconds cumulative timeout, API request allocation per 24 hours, 25 concurrent long-running requests, and the rule that a callout cannot follow uncommitted DML. Design for bulk: accept lists, use Composite/Collections, and avoid one call per record. Version contracts and test with mocks. Plan for eventual consistency: no distributed transactions, so use compensating actions.

Practice SOQL & Apex
PreviousWhat roles do consumer keys and consumer secrets play during OAuth authentication handshakes?Next How do Batch Data Synchronization processes maintain multi-system data consistency across enterprise architectures?

More Integration questions

  • How do PushTopics combine SOQL query criteria with real-time streaming notifications in Salesforce?
  • How do webhook security mechanisms verify the authenticity of incoming HTTP notifications from external systems?
  • How do federated identity and SAML single sign-on streamline authentication across enterprise integration landscapes?
  • How do CORS settings permit authorized web applications to perform cross-origin REST requests against Salesforce?
  • How do rate limiting and throttling mechanisms protect Salesforce endpoints from excessive traffic spikes?

Code / config example:

apex
// Publish an event instead of making a synchronous callout from a trigger
List<Order_Closed__e> evts = new List<Order_Closed__e>();
for (Order__c o : closedOrders) {
    evts.add(new Order_Closed__e(Order_Id__c = o.Id, Ext_Id__c = o.Ext_Id__c));
}
List<Database.SaveResult> results = EventBus.publish(evts);

Hidden gotchas & must-remember points:

  • Polling the API burns your daily allocation; use events or CDC.
  • No cross-system transactions exist; design for retries and compensation.
  • Callout after pending DML throws a CalloutException.
  • Event delivery is at-least-once in practice; subscribers must be idempotent.
  • Integration users consume licenses and can lock out when passwords expire; use OAuth flows.
  • New custom platform events are high volume by default.

Best practice: Choose pattern by volume and latency, secure with named credentials, make every operation idempotent, and monitor from day one.

IntegrationArchitecture Best PracticesDesign Patterns