In Setup > Integrations > External Services, click Add an External Service and provide the named credential and an OpenAPI schema URL or paste the schema directly
Salesforce validates the schema and generates Apex classes in the ExternalService namespace; confirm the generated class and method names in the External Services list
In Apex, instantiate the generated class (e.g., ExternalService.MyService client = new ExternalService.MyService()) and call the generated method corresponding to the API operation
Pass input parameters as a typed request object generated alongside the client class; retrieve the response via the typed response object — no raw HTTP or JSON parsing needed
Handle the generated ExternalService.MyService.MyOperation_Response object, checking its Code property for HTTP status and accessing typed body fields directly
For operations requiring dynamic headers not expressible in the named credential, use a named credential with a per-user principal to inject user-specific tokens at runtime
Known gotchas
Reimporting an updated OpenAPI schema regenerates the Apex classes, which resets any manual changes to the generated code — treat generated classes as read-only and wrap them in a service layer
External Services only support a subset of OpenAPI features; schemas using allOf, oneOf, or complex polymorphic models are likely to fail validation or generate incomplete classes
Generated methods count against the same callout limits as direct HttpRequest calls — there is no batching mechanism in the generated client
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp