Sub topic 1
How systems get connected: point-to-point, hub-and-spoke, and API-led
Prerequisites
Assume you know Salesforce objects, records, REST APIs, and JSON. An integration connects Salesforce with another system so data or actions can cross the system boundary.
Integration styles
- Point-to-point: Salesforce connects directly to each external system. This is simple for one connection, but every new system adds another custom connection to maintain.
- Hub-and-spoke: A central middleware hub connects Salesforce and other systems. Each system needs one connection to the hub, which reduces direct dependencies.
- API-led: Systems expose reusable application programming interfaces (APIs). Separate system APIs, process APIs, and experience APIs compose data and actions for different consumers.
Integration patterns
A request-reply integration sends a request and waits for a response. An Apex callout can retrieve an order immediately. Fire-and-forget publishes an event without waiting for a consumer. Batch synchronization moves many records on a schedule. Publish-subscribe lets multiple subscribers react to one event.
Salesforce fits each pattern differently. Flow can start actions from record changes, schedules, or platform events. Apex supports custom callouts and complex logic. Named Credentials store endpoint and authentication settings outside code. Platform Events publish business events for asynchronous subscribers. Salesforce APIs let external systems query, create, and update records.
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'));
}Limits that shape design
Salesforce APIs and Apex have quotas, transaction limits, timeout limits, and concurrency constraints. A synchronous callout can fail when the external service is slow. A large data load can exceed API limits or trigger automation repeatedly. These limits often push designs toward asynchronous processing, batching, retries, and careful monitoring.
What middleware adds
Middleware centralizes transformation, routing, protocol mediation, orchestration, security, retries, and monitoring. It can convert an ERP payload into Salesforce field names, call several systems in sequence, and record failures for replay. MuleSoft Anypoint Platform applies these ideas through reusable APIs and managed flows.
Exercise
Which style best reduces direct connections when Salesforce must integrate with five external systems?
Show answer
Hub-and-spoke, or an API-led design when reusable APIs and multiple consumers are required.