You are here:
Apex Action Element
Call an Apex class. Apex classes are available as Apex actions only if one of the
methods is annotated with @InvocableMethod.
Required Editions
| View supported editions. |
Add an Action element to the flow. Filter the list of actions by type rather than category.
If your canvas is in free-form layout, select Apex. If your canvas is
in auto-layout, select Apex Action. Select the action that you want
to configure. For details about creating Apex actions, see “InvocableMethod Annotation” in the Apex Developer Guide.
Set Input Values
When you set the inputs for the Apex action, use values from earlier in the flow.
Apex actions don’t support lookup fields in record variables as input values.
Store Output Values
To reference output values that are stored automatically, specify the API name of the Action element.To store the action’s output values manually, select Manually assign variables (advanced). The values are assigned when the code is executed.
Usage
If a flow invokes Apex, the running user must have the corresponding Apex class assignment in their profile or permission set.
If the invoked method creates, updates, or deletes a record, that action isn’t performed until the interview’s transaction completes. Transactions are complete when the interview either finishes or executes a Screen, Local Action, or Wait element.
Flow Builder doesn’t display descriptions for input and output values. For details about each parameter, ask the Apex developer for more information.
Flow Builder displays Apex actions from managed packages only if the associated method is marked global.

