Which is preferable: DataRaptor or Integration Procedure?
If you’re looking to read or write Salesforce SObject data or perform straightforward data structure transformations in a single step, then OmniStudio DataRaptors are the way to go. However, if your requirements involve interacting with multiple types of data, such as REST APIs and Apex classes, and processing that data in multiple steps, then Integration Procedures are likely the better option for you.
Here are some situations where you might want to consider using DataRaptor:
- If you need to read data from or write data to SObjects that have a defined relationship, DataRaptor would be a suitable choice. For instance, Accounts and Contacts have a relationship as a Contact record contains an AccountId value. With DataRaptor, you can conveniently work with such relationships and perform the required read or write operations between these SObjects.
- Your data is in JSON or XML format and does not involve SObjects.
- You can perform any necessary filtering, calculation, or reformatting of data values using formulas.
- You only need to read data from SObjects or write data to SObjects, but not both.
- You need to modify the data structure by mapping input JSON nodes to output JSON nodes.
- You do not need to read or write CSV files, Apex classes, REST APIs, or external objects.
- You do not need to send email, merge lists, or handle errors.
Here are some situations where using an Integration Procedure would be necessary:
- You need to call at least two DataRaptors in order to read from and write to one or more SObjects.
- There is no defined relationship between the SObjects you need to read from or write to.
- You cannot transform your data just using formulas and need more complex logic, such as filtering or calculations based on different conditions.
- Your JSON node mappings are complex and require multiple processes.
- You need to read from or write to multiple data source types, such as SObjects, CSV files, external objects, Apex classes, or REST APIs.
- You need to perform actions such as sending emails, merging lists, or handling errors.
I hope this information is helpful for you.