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:
maptransforms values.For Eachorchestrates repeated side effects.
That is a very good interview distinction.