BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
12 / 81 · Module 6 — Mule Routing and Orchestration · filtered: interview← prev⊞ allnext →

6.8Avoid For Each for simple Salesforce bulk operations

Bad:

For Each 1,000 customers

   Salesforce Upsert customer

You have:

1,000 connector calls

Better where possible:

DataWeave map all customers
        ↓
Salesforce Upsert collection

This distinction matters.

DataWeave map

Transforms data:

array
 ↓
array
Mule For Each

Executes processors repeatedly:

item
 ↓
HTTP call
 ↓
Salesforce call
 ↓
other flow logic

Memorize:

map transforms values. For Each orchestrates repeated side effects.

That is a very good interview distinction.