I am currently leveraging the Salesforce integration that is provided by Outsystems. While this works fine for single records being sent to Salesforce at a time it does not allow for batches to be sent. My business case would greatly benefit from the ability to send batches rather than a single record. I copied the Salesforce_DRV module and added an additional method to support batches being sent but cannot figure out how to handle the authorization header/token or how to get it. Please let me know the best possible way to handle batching to Salesforce is/if I am doing it wrong.
HI Timothi, You can use ,Composite Batch API: Allows multiple REST API requests to be combined into a single call. Ideal for smaller batches (up to 25 sub-requests per batch).Bulk API: Designed for handling large volumes of data. Suitable for asynchronous processing of large batches.
Hi Varada, how do I create/access these api's? Do I need to create them manually or do they exist somewhere within the integration created by integration builder?
Hello @Timothy Mercendetti ,
Authorization
Salesforce API requires an OAuth 2.0 token for authentication.The token is typically fetched using a combination of the following: Client ID and Client Secret: Provided in Salesforce Connected App settings. Username and Password: Combined with a security token if applicable.
You must include the following headers:
Here is some information about getting the token and overall information about the authorization process:
Updating a List of Records
To update multiple records, you can use the Salesforce Bulk API, which is designed for handling large volumes of data.
The Bulk API has a different endpoint structure. You would typically use the following endpoint to create a job. Here you have additional information about it:
@Timothy Mercendetti besides Salesforce_DRV there is another module Salesforce_IS which takes care of the Authentication. You can see a server action like GetAccessToken & GetAccessToken_ForceRefresh in IS Module.
Consumer modules refer to methods from the IS module, which in turn call methods from the DRV module that interacts with Salesforce. To add a new method, you need to implement it in both modules. To begin with, consume the REST end point in DRV module and then create a public wrapper method which call the REST API. Finally call the wrapper method in IS module. While calling the wrapper method you need to pass the AccessToken. You should be able to do this by referring an existing implementation.