Fetch Salesforce Data
Query Salesforce records with SOQL and pull the results into a Multi FileFeed.
Fetch Salesforce Data runs a SOQL query against your Salesforce org using the Bulk API 2.0 and brings the results into your Multi FileFeed (MFF) as a CSV file. Use it to source records like Accounts, Contacts, or custom objects directly from Salesforce.
Availability: Beta. Requires the
WorkflowsSalesforceDataFetchfeature. Contact your OneSchema support representative if you do not see this transform.
What it does
- Input: source (no upstream input). This transform starts an MFF branch by connecting directly to Salesforce.
- Output: a CSV file containing the rows returned by your SOQL query.
- The transform runs your query through Salesforce's Bulk API 2.0, which is designed for retrieving large record sets efficiently, and emits the results as a CSV file.
When to use it
- You need a snapshot of Salesforce records — like all Opportunities closed this quarter — as a file.
- You want to combine Salesforce data with files from other sources in the same MFF, such as a data warehouse export.
- You're building an MFF that syncs Salesforce data out to another system on a schedule.
How to configure it
In the MFF builder, add a Fetch Salesforce Data node as a source at the start of your MFF.
Settings
| Setting | Description | Default |
|---|---|---|
| SOQL query | The SOQL query to run, for example SELECT Id, Name, Email FROM Contact. | Empty |
| Include deleted records | When enabled, the query includes records in the Recycle Bin. | Off |
| Output mode | Controls how query results are structured in the output file. | Empty |
| Salesforce account | The connected Salesforce credential to use for the query. | None selected |
Configuration tips
- Test your SOQL query in Salesforce's Query Editor or Developer Console before pasting it into this node.
- Select only the fields you need; querying every field on a large object slows down the fetch and produces a wider file than necessary.
Example
Setup
Query: SELECT Id, Name, Email, AccountId FROM Contact WHERE CreatedDate = THIS_MONTH
Output
A CSV file with one row per matching Contact and columns Id, Name, Email, AccountId.
Troubleshooting
Query errors
- Check the SOQL syntax; unsupported functions or malformed field names are the most common cause of failures.
- Confirm the connected Salesforce account has field-level access to every field in the query.
Missing expected records
- Enable Include deleted records if you expect to see records that were recently deleted.
- Confirm your
WHEREclause matches the records you expect; a common issue is a date filter that's narrower than intended.
See also
Updated 1 day ago