BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
79 / 278 · Module 5 — Salesforce Data Model + SOQL · filtered: code← prev⊞ allnext →

5.14`IN`

Very useful for Mule integration.

Suppose you have:

C001
C002
C003

Rather than three queries:

WHERE External_ID__c = 'C001'

etc., query:

SELECT Id, External_Customer_ID__c
FROM Account
WHERE External_Customer_ID__c
IN ('C001', 'C002', 'C003')

Think about API efficiency:

bad:

100 records
→ 100 Salesforce queries


better:

collect IDs
→ query using IN
→ correlate results

This is a very important integration optimization.