BookatlasTwo-Day MuleSoft → Salesforce Bootcamp

Module 9 — API-Led Architecture

AllInterview Q&A 76Cheat sheets 17Code 278

This is very interview-heavy because MuleSoft uses the term API-led connectivity constantly.

The classic three layers are:

Experience API
      ↓
Process API
      ↓
System API

The goal is to avoid brittle point-to-point integrations and create reusable boundaries around systems and business processes.

9.1Start with the problem API-led architecture solvesBad architecture:26 words9.2The three layersThink:7 words9.3System APIA System API wraps a backend system.33 words9.4codeExample Salesforce System APIBackend:17 words9.5Why this is usefulSuppose Salesforce changes:12 words9.6System APIs should be system-orientedA System API shouldn't usually contain giant business workflows.30 words9.7Process APIA Process API implements business orchestration.31 words9.8codeExample Process APIRequest:14 words9.9Process APIs hide orchestrationThe consumer should not need to know:15 words9.10Experience APIAn Experience API adapts data and behavior for a particular consumer experience.30 words9.11codeExampleProcess API returns:10 words9.12Why not let mobile call Process API directly?Sometimes it absolutely can.56 words9.13The canonical pictureMemorize this:9 words9.14Another example: order processingConsumers:13 words9.15What belongs where?A useful decision table:74 words9.16Salesforce System API should hide Salesforce IDs where possibleSuppose Process API only understands:22 words9.17codeHide Salesforce field names tooBad Process API logic:30 words9.18codeError normalization at System API boundarySalesforce might return:22 words9.19Don't over-hide useful backend capabilitiesThere's also a tradeoff.33 words9.20Reuse is the major goalSuppose three processes need customer data:17 words9.21But reuse has a costIf every internal call becomes:27 words9.22System API as separate deployable app vs reusable subflowThis is an architectural question.33 words9.23Q&AInterview trap: “Should every Salesforce call go through a System API?”Don't answer:58 words9.24API-led vs point-to-pointPoint-to-point:16 words9.25API-led doesn't eliminate point-to-point internallyImportant nuance:21 words9.26codeAPI contract matters more than implementationSystem API contract:22 words9.27codeAPI specificationIn MuleSoft environments you'll commonly encounter:36 words9.28API-first developmentA good workflow can be:11 words9.29APIKitYou may hear:35 words9.30Example APIKit architectureAPI spec:16 words9.31Contract validationIf OpenAPI says:23 words9.32VersioningSuppose:27 words9.33codeAvoid leaking Process API internals into Experience APIsIf Process API exposes:33 words9.34System API granularityToo fine-grained:24 words9.35Process API granularityBad:6 words9.36codeExperience APIs may perform presentation-oriented transformationExample:9 words9.37Don't put core business rules in Experience APIBad:12 words9.38Reuse exampleSuppose both:12 words9.39Q&AAn interview scenarioWe have Salesforce, SAP, and a billing platform. Mobile and web both need a unified customer view. How would you structure it?60 words9.40Another scenarioOnly one internal application talks to Salesforce. Should we create System, Process, and Experience APIs?67 words9.41Performance concernThree layers can mean:28 words9.42Experience → System directly?Yes, potentially.25 words9.43Process → multiple Process APIs?Also possible.15 words9.44APIs vs messagingAPI-led doesn't mean:29 words9.45API ManagementMuleSoft's Anypoint Platform can apply policies around APIs such as:41 words9.46System API securitySuppose the Salesforce System API is internal.21 words9.47Process API shouldn't pass Salesforce auth throughBad architecture:20 words9.48Fault isolationSuppose Salesforce fails.27 words9.49Observability across API layersIf a request traverses:39 words9.50Don't create a “distributed monolith”You can architect 30 Mule APIs that are technically separate but where:32 words9.51Testing each layerFocus:31 words9.52Don't make every automated test end-to-endBad:16 words9.53Contract testing between layersSuppose:24 words9.54Q&AAPI-led connectivity interview definitionIf asked:65 words9.55Q&A“What's a System API?”“A reusable boundary around a backend system that hides system-specific schemas, authentication, query language, connector behavior, and…20 words9.56Q&A“What's a Process API?”“It implements business logic and orchestration, often combining multiple System APIs into a business capability.”16 words9.57Q&A“What's an Experience API?”“It adapts APIs to the needs of a particular consumer or channel—mobile, web, partner, and so on—without duplicating core business logic.”22 words9.58Q&A“Does every application need all three?”“No. I'd only introduce separate deployable layers where they provide useful reuse, decoupling, governance, consumer adaptation, or…37 wordscheat sheetModule 9 cheat sheetThe one sentence to remember:69 words