Greetings my fellow SF Experts,

I have a massive outbound XML integration that I need to build in salesforce (Multiple XSD schemas with several thousand lines of xsd elements). Waiting for official estimates, but for now it looks like the xml generated could have a payload size of 30-50+mb.

I have been looking for governor limits specific to XML integrations in Salesforce, but the only limit I have found is on the "parsing" of nodes (50 nodes or less), and my understanding is that this would only apply to "GET" methods in SF, not POST methods (unless I wanted to do a parse of my xml before sending it). I have looked into this article Any way to validate XML against XSD file in Apex? but this only get's into the validation problem against the schema. I'm hoping to think through this after I determine governor limit issue.

What I know*:

(*This could be wrong :D )

I know that this article Apex Governor LImits describes the heap size limits. My concern is that with generating a massive xml document is going to violate the Heap limit 6-12mb.

I don't believe there is a payload limit on POST calls, but on GET calls it would appear there are limits on how many records you can bring into SF.


I have integration I'm being asked to build for a client that has big xml payload 30-50mb plus and several xsd schemas I need to validate it against.

Looking for:

  • Limits that this could violate (e.g. Heap Size).
  • Integration tools that could help with the job (e.g. MuleSoft).
  • Additional limits surrounding

Always appreciative of this community and their helpfulness.

Thanks [1]: https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm

1 Answer 1


The maximum callout size is "heap size" worth of data (per transaction), 6MB for synchronous Apex, 12MB for asynchronous Apex. As such, you won't be able to do this purely in Apex. You may want to look at using an external service to help, like you say. I'm not familiar with Mulesoft, but you could easily host your own solution in Heroku, AWS EB, Salesforce Functions (when available), or some other solution.

You must log in to answer this question.

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