Platform Events pattern
// Publish when Opportunity is Closed Won
Opportunity_Won__e evt = new Opportunity_Won__e(OpportunityId__c = opp.Id);
Database.SaveResult res = EventBus.publish(evt);
Named Credentials
- Store endpoints/keys; callouts via
Auth.Providersor simpleHttpRequest
HttpRequest req = new HttpRequest();
req.setEndpoint(‘callout:MyService/resource’);
req.setMethod(‘GET’);
Http http = new Http();
HTTPResponse res = http.send(req);
External Services
- Import OpenAPI → auto‑generated invocable actions → use in Flow
Resilience
- Queueable + DLQ table; log correlation IDs; idempotency keys