BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
71 / 279 · Module 4 — Salesforce Connector · filtered: code← prev⊞ allnext →

4.15Why this is better than endless Set Variable

Earlier we did:

Set Variable originalCustomer
       ↓
Salesforce Query

Another option is:

Salesforce Query
Target = sfResults

Then:

payload

can stay as your original customer while:

vars.sfResults

contains Salesforce data.

This can make a flow substantially easier to read.

Interview phrase

“If I need the connector result without replacing the current payload, I can put the operation result into a target variable rather than constantly copying payloads around.”

Very good Mule-specific answer.