Create a global Apex class with a static method annotated @InvocableMethod and provide a label and description for the Flow UI
Define an inner class for inputs annotated with @InvocableVariable for each field with required=true where appropriate
Define a separate inner class for outputs also using @InvocableVariable so Flow can map results to variables after the action
The invocable method must accept a List of the input class and return a List of the output class to support bulk Flow contexts
Write test coverage for the invocable method by calling it directly with a constructed list of input objects
After deployment the action appears in the Flow builder Action element picker under your label name
Known gotchas
The method signature must accept a List even if logically only one record is processed; a non-List parameter type causes a deployment error
If the Flow is triggered in bulk context (e.g., a Record-Triggered Flow on a batch save), the List passed to the invocable method contains multiple inputs; code that assumes index 0 only will fail silently for subsequent records
Complex types like Map or custom Apex object hierarchies cannot be used as InvocableVariable types; only primitive types and supported sObject types are allowed
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