So this is more of a Integration Design approach question, using Middleware system

I am working on a requirement, to fetch data from multiple APIs from an external system and display it on a LWC Card on a Console Page.

So the card, for example needs to perform 6 different GET calls to display data on Salesforce record page in a single LWC card. We have Mulesoft as the middleware.

In my opinion Middleware needs to perform all the calls and return one consolidated response, which will reduce outbound calls in a single transaction and subsequently have a reduced response time.

But, the Middleware is being built based on single API approach, for example:

  • Get Billing Info - Is one API to be exposed
  • Get Financial Info - is one more API to be exposed.
  • Get Account Info - is another API to be exposed.

So that multiple systems can access the APIs and it is not restricted to salesforce requirement alone.

Salesforce needs to display data from both APIs together, so as per my understanding middleware team should expose a 3rd API which would provide data from both individual endpoints.

Salesforce will also be using the APIs on individual basis(like, I want to view only Financial Info) on some other screens

I have gone through the Integration Patterns and Practices document and have a strong opinion on having a single call in one transaction and Middleware performing other calls

Taking into consideration, that middleware will be used by multiple systems and this is a Salesforce specific requirement, wanted to understand, what is a better approach.

Whether to have multiple callouts in same transaction for displaying multiple API data or to perform a single callout?

  • 3
    This is along the lines of Mulesoft's System vs Process vs Experience APIs. What's the right level of granularity for exposed APIs? There's no right answer here, it depends on many variables specific to your project/company/implementation.
    – identigral
    Jun 27, 2021 at 22:39

1 Answer 1


I agree with you to use salesforce to process data for individual callouts and use middleware for API orchestrating and data accumulation.

Though middleware is designated to provide common services to applications we should also not forgot Data Accumulating is one common use case for any middleware.

Based on your requirement I think it's safe to assume your landscape use Microservice architecture rather than being monolithic and in any Microservice architectural pattern implementation, it is always advised to leverage the middleware to perform multiple requests to accumulate the responses. Another reason to choose this approach is the chances of increases in the API request linearly as we see an increase in the number of services to be utilized for a process.

Though this orchestration is not being used by any other application now except salesforce, there could be a fair chance for another system to use this if they adopt the same business flow.

Lastly, I would like to mention that though we can technically make salesforce to accumulate data from multiple Microservice it is not the right platform and Middleware are exclusive built for this very sole purpose.

  • Thanks @ssoundiran. +1 . We are aligned here, I agree 100%. I am also looking for some supporting documents, both from Middleware and Salesforce(combined) to support this. Else, will wait for some more inputs from other members as well, before accepting the answer. Jun 27, 2021 at 16:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.