1

I want to know whether using Salesforce Composite API will give me any performance gain or not in my scenario. I am not expert in Salesforce and don't know much about Composite API. So, before I move to Composite API, I want to know whether it is suitable to me or not.

I have gone through some tutorial over internet and what I understand is - main benefit of using Composite API is to combine multiple API calls. Reduction of API Cal will give performance gain. So, as per my understanding, this will be mainly useful for integration system where you are exchanging data and updating data.

Let me present my case.

I have one Salesforce application and one Web Service (.Net). Purpose of Web Service is to fetch data from Salesforce, merge data in the document and attach document to the Salesforce record.

High level flow is like this.

  1. Salesforce App calls web service passing some parameters.
  2. Web Service calls Apex Custom Rest API to fetch data from Salesforce objects.
  3. Custom Custom Rest API gather data from around 10-15 objects and return it in json format. It also does some data calculation before writing value to json string.
  4. Web Service processes data received from Rest API, merge in one document and attach that document to one Salesforce record.

Here, there is hardly 2 or 3 DML operation happening in this whole process.

So, does anyone have any thoughts whether I should really use Composite API or not.

Any input will be very useful to me and It will save my lots of efforts.

1

1 Answer 1

1

I don't see a use case for the Composite API here at all.

The Composite API allows you to

Execute[..] a series of REST API requests in a single call. You can use the output of one request as the input to a subsequent request. The response bodies and HTTP statuses of the requests are returned in a single response body. The entire request counts as a single call toward your API limits.

Here, you appear to be executing only one inbound API call at a time, with processing on the remote server taking place in between. Step (2) is a call into a complex Apex REST endpoint, but the functionality you describe sounds like it could not be trivially replaced by composition of calls to out-of-the-box REST endpoints via the Composite API.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .