Sub topic 13
Cost, skills, and who runs it
This chapter assumes you know basic Salesforce concepts (objects, records, APIs), REST and JSON, and the native options covered earlier: Flow, Apex callouts, Named Credentials, and Platform Events. It compares the cost of native and middleware approaches. Cost here means more than license price.
Three kinds of cost
Every integration has three costs, and teams often count only the first.
- Build cost: the effort to design, build, and test the first version.
- Run cost: licenses, infrastructure, monitoring, and support after go-live.
- Change cost: the effort to modify the integration when a system, field, or process changes.
Native tools usually have a low build cost for a simple integration. An Apex callout with a Named Credential is a few dozen lines. Middleware has a higher starting cost: you need a platform, environments, and a design. Its change cost can be lower when many systems share the same integration.
Comparing native and middleware
| Dimension | Native Salesforce | Middleware such as MuleSoft |
|---|---|---|
| License | Included in your Salesforce edition, within API and platform limits | Separate subscription, usually priced by capacity (for example, vCores) |
| Skills | Admins (Flow), Apex developers | Integration developers who know DataWeave, API design, and the runtime |
| Monitoring | Debug logs, event monitoring, custom logging you build | Central dashboards, alerts, and tracing across systems |
| Who runs it | The Salesforce team | A platform team, or a shared integration team |
| Upgrades | Salesforce releases three times a year | You schedule runtime and connector upgrades |
| Cost growth | Grows with custom code you must maintain | Grows with capacity and number of environments |
Skills and ownership
Native integrations sit inside the Salesforce team. The same people who own the objects own the callouts. This is fast, but it hides a risk: the integration logic lives in Apex classes and Flows, spread across the org, with no single place to see all connections.
Middleware moves logic out of Salesforce. That needs people with different skills, such as API design, data mapping, and operating a runtime. You must decide who is on call when a message fails at 2 a.m. If no team owns that duty, the platform becomes expensive shelfware.
Ownership questions to answer before choosing middleware:
- Which team builds and deploys integrations?
- Which team monitors them and responds to failures?
- Who pays for the platform: one project or a shared budget?
- Can you hire or train the needed skills within the project timeline?
A worked cost comparison
Suppose you must connect Salesforce to one ERP system, with one request-reply call on order lookup.
The native route is a callout like this one:
HttpRequest req = new HttpRequest();
req.setEndpoint('callout:ERP_Credential/orders/' + orderId);
req.setMethod('GET');
HttpResponse res = new Http().send(req);
if (res.getStatusCode() == 200) {
Map<String, Object> order = (Map<String, Object>) JSON.deserializeUntyped(res.getBody());
System.debug(order.get('status'));
}This costs days to build, needs no new license, and one Apex developer can maintain it. Adding middleware here would add a subscription and a second team's work for no gain.
Now suppose six systems need the same order data, each with its own format. Six native callouts means six copies of mapping and error logic, all maintained by hand. A shared middleware API maps the data once. The license cost is then spread across six consumers, and each change happens in one place.
The numbers are illustrative, not measured. The shape matters: middleware starts higher and grows more slowly.
Common mistakes
- Comparing license price only, and ignoring maintenance and on-call effort.
- Buying middleware for one integration, then never reusing it.
- Choosing native for everything, then losing track of dozens of undocumented callouts.
Exercise
A team has two simple integrations from Salesforce to one internal service. They have no integration developers and no platform team. List two cost reasons to stay native, and one signal that would change your advice.
Show answer
Staying native avoids a new subscription and needs only skills the Salesforce team already has (Apex, Flow), so build and run costs stay low. A signal to revisit: more systems needing the same data, so mapping and error handling are duplicated, or a requirement for central monitoring across systems that the team cannot build natively.