DataRaptor Load and Extract
Use this skill when building or troubleshooting DataRaptor Extract (reading data from Salesforce via SOQL) or DataRaptor Load (writing data to Salesforce via DML) in OmniStudio. This covers multi-object extracts, Turbo Extract vs standard Extract selection, load upsert configuration, output mapping, and error handling patterns.
Before Starting
Gather this context before working on anything in this domain:
- Identify whether you need to read data (Extract) or write data (Load). These are different DataRaptor types with different configuration surfaces.
- For Extract: know the SOQL relationships you need — cross-object lookups use dot notation, parent-child relationships use sub-selects.
- For Load: know the DML operation (insert, update, upsert, delete) and the upsert key field if using upsert.
- Be aware that DataRaptor Load does NOT support Bulk API — it uses standard row-at-a-time DML. Do not use DataRaptor Load for high-volume data operations.
Core Concepts
DataRaptor Extract
DataRaptor Extract is an OmniStudio data retrieval tool that executes SOQL queries and maps results to output JSON. Key behaviors:
| Setting |
Behavior |
| SOQL base object |
The primary FROM object. Cross-object fields use dot notation (e.g., Account.Name). |
| Parent-to-child relationships |
Use SOQL sub-selects to retrieve child records. |
| Output mapping |
Maps SOQL field paths to JSON keys in the output, using dot-notation to define nested JSON structure. |
| Preview tab |
Always test your extract in the Preview tab before embedding in an Integration Procedure. |
Turbo Extract vs Standard Extract
DataRaptor Turbo Extract is a faster read-only variant:
- Supports only direct field reads — no relationship queries, no sub-selects
- Cannot traverse parent-child relationships
- Significantly faster for simple lookups
- Use Turbo Extract for single-object field retrieval where performance matters
Standard Extract supports relationship queries, sub-selects, and complex output mapping. Use it when you need cross-object data.
DataRaptor Load
DataRaptor Load is an OmniStudio DML tool for writing records to Salesforce sObjects. Key behaviors:
| Setting |
Behavior |
| Supported operations |
Insert, Update, Upsert, Delete. |
| Upsert key |
For upsert operations, specify the External ID field for matching. Must be designated as External ID on the field definition. |
| Multi-object support |
A single Load can write to multiple objects in sequence. |
| Error handling |
Load returns an iferror node in output JSON when DML fails. Check this node downstream in your Integration Procedure. |
| No Bulk API |
Uses standard DML — row-at-a-time. Not suitable for high-volume operations. |
| No rollback on partial failure |
Records written to early objects in a multi-object Load are not rolled back if a later object fails. |
Common Patterns
Multi-Object Relationship Extract
When to use: Need to retrieve an Account and its related Contacts together for an OmniScript.
How it works in Extract configuration:
- Set base object to
Account
- SOQL:
SELECT Id, Name, (SELECT Id, LastName, Email FROM Contacts) FROM Account WHERE Id = :accountId
- Output mapping:
Name → account.name, use the Contacts sub-select relationship name for nested child records
Why not two separate extracts: Single extract with sub-select is more efficient — one SOQL query vs two. Child records are automatically nested in output JSON.
Upsert with External ID
When to use: Receiving data from an external system where records may or may not already exist.
How it works in Load configuration:
- Set operation to
Upsert
- Specify the External ID field (e.g.,
External_Id__c) — must be designated as External ID on the field
- Map the incoming JSON path to
External_Id__c and all other fields to update
Handling iferror in Load
When to use: Any Load step that needs to handle DML failures gracefully.
How it works:
- After the Load step in your Integration Procedure, add a conditional check
- Check output path
<LoadStepName>:iferror — if present, a DML error occurred
- Read
<LoadStepName>:iferror:message for the error description
- Branch on the error to return a user-friendly message or attempt compensating actions
Decision Guidance
| Situation |
Recommended Approach |
Reason |
| Single object, simple fields, performance-sensitive |
Turbo Extract |
Faster, no query overhead |
| Cross-object data (parent + child) |
Standard Extract with sub-select |
Turbo Extract does not support relationships |
| Writing to Salesforce from OmniScript |
DataRaptor Load |
Purpose-built DML tool |
| Writing high volumes, or driving a Load from a loop |
Do NOT use DataRaptor Load |
Load is platform DML, not Bulk API, so it is bounded by the calling transaction (150 DML statements / 10,000 DML rows). A loop-driven Load dies at the 151st iteration. Use Batch Apex or Bulk API 2.0 separately |
| Need to detect write failure |
Check iferror in Load output |
Load does not throw; returns error info in output JSON |
| Need atomic multi-object write |
Aware: no rollback |
Load fails forward; design compensating actions |
Recommended Workflow
- Determine operation type. Read → Extract. Write → Load.
- For Extract: Write and validate the SOQL in Developer Console first. Confirm it returns expected data.
- For Extract: Design output mapping — map each SOQL field path to desired JSON key path. Test in Preview tab.
- For Load: Identify DML operation and input JSON structure. Map each input path to the target sObject field.
- For Load with upsert: Confirm the External ID field exists on the object and is marked External ID. Map it in Input Mapping.
- Test using the Preview tab before embedding in an Integration Procedure.
- Add error handling downstream in the Integration Procedure — check
iferror output path from any Load step.
Review Checklist
Salesforce-Specific Gotchas
- DataRaptor Load does not use Bulk API — Row-at-a-time DML means governor limits apply. For anything over a few dozen records, this causes performance problems or limit violations.
- No rollback on multi-object Load failure — If Load writes to Object A then fails on Object B, Object A records are already committed. Design single-object Loads where possible, or implement compensating actions.
- Output mapping path uses API relationship name, not label — SOQL child relationship paths must use the API relationship name (e.g.,
Contacts, not Contact). Using the label causes empty output.
Output Artifacts
| Artifact |
Description |
| DataRaptor Extract configuration |
SOQL query, input variables, output field mappings |
| DataRaptor Load configuration |
Operation type, upsert key, input field mappings, error handling note |
Related Skills
- dataraptor-patterns — DataRaptor Transform operations (different type)
- integration-procedures — Using DataRaptor as steps within an Integration Procedure
- omnistudio-debugging — Debugging DataRaptor Preview and Integration Procedure execution
1---2name: dataraptor-load-and-extract3description: Build or debug DataRaptor Extract and Load — multi-object extracts, upserts, iferror mapping. Triggers: DataRaptor Extract, DataRaptor Load, Turbo Extract debug. NOT for Extract vs Load design tradeoffs — use omnistudio/dataraptor-patterns.4---56# DataRaptor Load and Extract78Use this skill when building or troubleshooting DataRaptor Extract (reading data from Salesforce via SOQL) or DataRaptor Load (writing data to Salesforce via DML) in OmniStudio. This covers multi-object extracts, Turbo Extract vs standard Extract selection, load upsert configuration, output mapping, and error handling patterns.910---1112## Before Starting1314Gather this context before working on anything in this domain:1516- Identify whether you need to read data (Extract) or write data (Load). These are different DataRaptor types with different configuration surfaces.17- For Extract: know the SOQL relationships you need — cross-object lookups use dot notation, parent-child relationships use sub-selects.18- For Load: know the DML operation (insert, update, upsert, delete) and the upsert key field if using upsert.19- Be aware that DataRaptor Load does NOT support Bulk API — it uses standard row-at-a-time DML. Do not use DataRaptor Load for high-volume data operations.2021---2223## Core Concepts2425### DataRaptor Extract2627DataRaptor Extract is an OmniStudio data retrieval tool that executes SOQL queries and maps results to output JSON. Key behaviors:2829| Setting | Behavior |30|---|---|31| SOQL base object | The primary FROM object. Cross-object fields use dot notation (e.g., `Account.Name`). |32| Parent-to-child relationships | Use SOQL sub-selects to retrieve child records. |33| Output mapping | Maps SOQL field paths to JSON keys in the output, using dot-notation to define nested JSON structure. |34| Preview tab | Always test your extract in the Preview tab before embedding in an Integration Procedure. |3536### Turbo Extract vs Standard Extract3738DataRaptor Turbo Extract is a faster read-only variant:39- Supports only direct field reads — no relationship queries, no sub-selects40- Cannot traverse parent-child relationships41- Significantly faster for simple lookups42- Use Turbo Extract for single-object field retrieval where performance matters4344Standard Extract supports relationship queries, sub-selects, and complex output mapping. Use it when you need cross-object data.4546### DataRaptor Load4748DataRaptor Load is an OmniStudio DML tool for writing records to Salesforce sObjects. Key behaviors:4950| Setting | Behavior |51|---|---|52| Supported operations | Insert, Update, Upsert, Delete. |53| Upsert key | For upsert operations, specify the External ID field for matching. Must be designated as External ID on the field definition. |54| Multi-object support | A single Load can write to multiple objects in sequence. |55| Error handling | Load returns an `iferror` node in output JSON when DML fails. Check this node downstream in your Integration Procedure. |56| No Bulk API | Uses standard DML — row-at-a-time. Not suitable for high-volume operations. |57| No rollback on partial failure | Records written to early objects in a multi-object Load are not rolled back if a later object fails. |5859---6061## Common Patterns6263### Multi-Object Relationship Extract6465**When to use:** Need to retrieve an Account and its related Contacts together for an OmniScript.6667**How it works in Extract configuration:**681. Set base object to `Account`692. SOQL: `SELECT Id, Name, (SELECT Id, LastName, Email FROM Contacts) FROM Account WHERE Id = :accountId`703. Output mapping: `Name` → `account.name`, use the Contacts sub-select relationship name for nested child records7172**Why not two separate extracts:** Single extract with sub-select is more efficient — one SOQL query vs two. Child records are automatically nested in output JSON.7374### Upsert with External ID7576**When to use:** Receiving data from an external system where records may or may not already exist.7778**How it works in Load configuration:**791. Set operation to `Upsert`802. Specify the External ID field (e.g., `External_Id__c`) — must be designated as External ID on the field813. Map the incoming JSON path to `External_Id__c` and all other fields to update8283### Handling iferror in Load8485**When to use:** Any Load step that needs to handle DML failures gracefully.8687**How it works:**881. After the Load step in your Integration Procedure, add a conditional check892. Check output path `<LoadStepName>:iferror` — if present, a DML error occurred903. Read `<LoadStepName>:iferror:message` for the error description914. Branch on the error to return a user-friendly message or attempt compensating actions9293---9495## Decision Guidance9697| Situation | Recommended Approach | Reason |98|---|---|---|99| Single object, simple fields, performance-sensitive | Turbo Extract | Faster, no query overhead |100| Cross-object data (parent + child) | Standard Extract with sub-select | Turbo Extract does not support relationships |101| Writing to Salesforce from OmniScript | DataRaptor Load | Purpose-built DML tool |102| Writing high volumes, or driving a Load from a loop | Do NOT use DataRaptor Load | Load is platform DML, not Bulk API, so it is bounded by the calling transaction (150 DML statements / 10,000 DML rows). A loop-driven Load dies at the 151st iteration. Use Batch Apex or Bulk API 2.0 separately |103| Need to detect write failure | Check `iferror` in Load output | Load does not throw; returns error info in output JSON |104| Need atomic multi-object write | Aware: no rollback | Load fails forward; design compensating actions |105106---107108## Recommended Workflow1091101. **Determine operation type.** Read → Extract. Write → Load.1112. **For Extract:** Write and validate the SOQL in Developer Console first. Confirm it returns expected data.1123. **For Extract:** Design output mapping — map each SOQL field path to desired JSON key path. Test in Preview tab.1134. **For Load:** Identify DML operation and input JSON structure. Map each input path to the target sObject field.1145. **For Load with upsert:** Confirm the External ID field exists on the object and is marked External ID. Map it in Input Mapping.1156. **Test using the Preview tab** before embedding in an Integration Procedure.1167. **Add error handling** downstream in the Integration Procedure — check `iferror` output path from any Load step.117118---119120## Review Checklist121122- [ ] Extract SOQL validated in Developer Console before configuring the DataRaptor123- [ ] Output mapping tested in Preview tab and JSON structure confirmed124- [ ] Turbo Extract used where only simple field reads are needed125- [ ] Load upsert key field confirmed as External ID on the sObject126- [ ] Integration Procedure checks `iferror` output from Load steps127- [ ] No loop-driven Load exceeds ~150 iterations — that is the per-transaction DML **statement** limit, and it is what binds first (the DML **row** limit is 10,000 and is not the constraint here). Bulk API is not supported by Data Mapper Load128- [ ] Multi-object Load: team aware there is no rollback on partial failure129130---131132## Salesforce-Specific Gotchas1331341. **DataRaptor Load does not use Bulk API** — Row-at-a-time DML means governor limits apply. For anything over a few dozen records, this causes performance problems or limit violations.1352. **No rollback on multi-object Load failure** — If Load writes to Object A then fails on Object B, Object A records are already committed. Design single-object Loads where possible, or implement compensating actions.1363. **Output mapping path uses API relationship name, not label** — SOQL child relationship paths must use the API relationship name (e.g., `Contacts`, not `Contact`). Using the label causes empty output.137138---139140## Output Artifacts141142| Artifact | Description |143|---|---|144| DataRaptor Extract configuration | SOQL query, input variables, output field mappings |145| DataRaptor Load configuration | Operation type, upsert key, input field mappings, error handling note |146147---148149## Related Skills150151- dataraptor-patterns — DataRaptor Transform operations (different type)152- integration-procedures — Using DataRaptor as steps within an Integration Procedure153- omnistudio-debugging — Debugging DataRaptor Preview and Integration Procedure execution