To choose a Salesforce integration pattern, start with two questions: does someone need the result before they can continue, and how far can the receiving system fall behind? A synchronous call fits a user who is waiting. An asynchronous event fits work that can finish moments later. Batch fits large volumes that can wait for the next scheduled run.
Many integration projects go wrong before any code is written. The team picks a technology it knows, such as an Apex callout, and forces each flow through it. A better order is to describe each flow by its timing, its data ownership and its failure path, then pick the transport. The sections below walk through those tests.
Decide first whether a person is waiting for the answer
Find out who, if anyone, is looking at a screen while the integration runs. A sales representative who clicks Save on an order and needs an ERP order number before the page refreshes is waiting. A nightly stock feed is not. Write that answer down for each flow. It separates integrations that must return a result inside the transaction from those that simply need to complete at some point.
Next, settle which system owns each piece of data. If Salesforce owns the account record and the billing system reads it without editing it, a one-way push is usually enough. If both systems can edit the same field, you need a rule for which change wins before you choose any pattern, because two simultaneous updates from different sides can overwrite each other. Timing decisions made without an ownership rule tend to be reworked later.
The third test is the latency the business will tolerate. Measure it in seconds, minutes or hours and write that number into the design. A target that must match within a few seconds cannot wait for a nightly batch. A target that can lag until the next business day does not justify a live callout on each save.
Synchronous request and reply for work a user must wait on
In a synchronous pattern the caller sends a request and holds until the response comes back. Inside Salesforce this often means an Apex class that calls an external REST or SOAP service. The advantage is that the user sees success or a specific error in the same transaction, and your logic can react to the response straight away.
The cost is coupling. The user’s save now depends on the other system being reachable and responding within your timeout. Decide in advance what happens when the timeout fires. Either the local change rolls back, or it is saved with a status that marks it for retry. Then show the error in context, naming the record and the next action, so the user is not left guessing.
Placement matters too. A callout cannot be made directly from a trigger; it has to be deferred to a future method or a queueable job. Mixed DML is another trap: a single transaction that touches certain setup objects and ordinary records can fail, so check which objects are involved and separate those steps where needed. Sequence these flows in your Salesforce automation workflows design first, because trigger and flow order decides whether a callout is allowed at that point.
Asynchronous events for work that can finish a little later
Asynchronous integration sends a message and lets the caller carry on. The receiving system picks the message up when it is ready. That absorbs spikes in volume and lets several subscribers consume the same change without a separate point-to-point link for each one. Event-based designs suit systems that need near real-time updates, many consumers, and landscapes where new systems join over time.
Salesforce provides event types such as Platform Events and Change Data Capture for this purpose. Two points are easy to miss. Platform Events are not published automatically when a record changes, so your code has to publish them deliberately. And the publisher generally does not learn whether each subscriber received a message, so a subscriber that is offline for a long stretch can miss events unless you plan for replay. Check the retention and replay behavior for your release before you depend on it.
Message shape is a long-term commitment. Once a publisher and its subscribers agree on a structure, changing it becomes expensive. Put a version field into each payload from the first build, and agree how old versions will be retired. Queues also grow when a consumer is slow or stopped. Set monitoring on queue depth and decide who clears a backlog, because a stalled subscriber can hide a problem until the queue is large.
Batch processing for large volumes and scheduled loads
Batch fits three situations: large data sets, changes that arrive in bulk, and data that is refreshed on a schedule. Nightly reconciliations, reporting extracts and the first load into a new org are typical examples. For large extracts and loads, the Bulk API 2.0 is built for that volume. Inside the org, Apex batch jobs split large record sets into chunks, which helps them stay within per-transaction limits.
Bulk loads also reduce the request count. The Bulk API carries many records in each request, so a load covering thousands of records needs far fewer requests than one call per record. The trade-off is time. A batch result arrives on the next run, and errors surface later, so you need a report that someone reviews. Decide whether a bad row stops the whole job or is set aside while the rest continues, and record that decision in the design.
Before you schedule several large jobs in the same window, check your daily API request allocation. Jobs scheduled together draw on the same budget, and a collision can push a user-facing integration into failure. For a checklist on the budget side of this decision, see the integration architect checklist for API call budgets.
A first load of history into Salesforce is best planned as a separate project with its own cutover plan. For the migration side of the same decision, see the data migration and integration page.
Comparing the three patterns side by side
The three patterns differ on what the caller waits for, when the target catches up, and where a failure shows up. Use this list to compare them against a single flow.
- Synchronous: the caller waits for a response inside the same transaction. The target is current at the moment of the call. Failures appear to the user immediately, and the main risks are coupling and timeouts.
- Asynchronous: the caller sends a message and moves on. The target catches up after a delay. Failures appear in queues and retry logic, and the main risks are lost or delayed messages and changes to the message shape.
- Batch: work runs on a schedule across many records. The target is current as of the last run. Failures appear in job reports, and the main risk is stale data discovered late.
Combining patterns in one business process
Many real processes use more than one pattern. A common shape is a synchronous call when an order is accepted, so the user receives an order reference; an asynchronous event when the order moves to fulfillment, so downstream systems take it at their own pace; and a nightly batch that reconciles totals. Each leg has its own failure path, so document them separately rather than as one vague integration.
Mixing patterns also means checking the boundaries between legs. Make sure a retry in the asynchronous leg cannot create a duplicate that the synchronous leg already handled. Put a stable external identifier on each record that moves between systems, and make the receiving side safe to run twice. If ServiceNow sits in the same process, settle record ownership with the Salesforce and ServiceNow integration boundaries before you choose a pattern for that step.
Checks to run before you commit to a pattern
Settle these questions in writing before the design review. An answer you cannot give is a sign that the flow is not ready for a pattern choice yet.
- Who, if anyone, is waiting for the result, and how long will they wait?
- Which system owns each field, and what rule applies when both systems change it?
- What is the acceptable lag between source and target, measured in seconds, minutes or hours?
- What happens on a timeout, a rejected message or a bad row, and who acts on it?
- How many records move each day, and which API budget do they draw on?
For help planning this work, see Salesforce implementation.
Questions about choosing an integration pattern in Salesforce
How should the team handle a timeout in a synchronous call?
Set the timeout deliberately rather than accepting a default, then test the failure path with the other system switched off. Decide whether the local record rolls back or is saved with a pending status, and make sure the user sees a message that names the next step.
How can a team tell whether a subscriber received a platform event?
Assume the publisher will not know. Log receipt on the subscriber side, keep a replay plan that fits the retention window your release provides, and run a reconciliation job that compares counts when a gap is suspected.
Can a batch job ever serve a user-facing screen?
It can serve data that is acceptable to show as of the last run, provided the screen states the time of that run. It should not be the source for a value the user must see as current, such as a balance they are about to change.
Who should own the error queue for asynchronous messages?
Name a person or small team in the integration group, not the developer who wrote the publisher. That owner reviews failed messages, decides between replay and discard, and signs off on any change that affects message structure.