Loading
Prepare for Email to Become the Default Login ExperienceRead More
Intermittent freezing when using using certain browser versionsRead More
Automate Your Business Processes with Salesforce Flow
Apex Action (Legacy) Element

Apex Action (Legacy) Element

Call an Apex class that uses a legacy Apex interface. Apex classes are available as legacy Apex actions only if the Process.Plugin interface has been implemented.

Required Editions

View supported editions.

Add an Action element to your flow. Filter the list of actions by type rather than by category. Select Apex Action (Legacy), and then select the action that you want to configure.

Tip
Tip If your developer hasn’t already implemented the Process.Plugin interface on the desired class, we recommend using the @InvocableMethod annotation instead. Unlike the Process.Plugin interface, the @InvocableMethod annotation supports sObject, Collection, Blob, and Time data types and bulkification. It’s also easier to implement. To compare the interface and the annotation, see Let Flows Execute Apex Actions.

Set Input Values

When you set the inputs for the Apex action, use values from earlier in the flow.

Store Output Values

To use the legacy Apex action’s outputs later in the flow, store them in variables. The values are assigned when the code is run.

Usage & Limitations

If the Apex class creates, updates, or deletes a record, the action isn’t performed until the interview’s transaction is completed. Transactions are complete when the interview either finishes or runs 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.

Legacy Apex actions aren’t organized by the tag in the plug-in code.

Cloud Flow Designer lets you save an Apex Plug-in element without setting values for its required input parameters. If you open the corresponding legacy Apex action in Flow Builder, you can’t save changes to the element unless you set values for the required input parameters.

Important
Important Legacy Apex actions aren’t supported in auto-layout in Flow Builder. Legacy Apex actions are only available to be added in free-form in Flow Builder. Existing actions can be edited in both auto-layout and free-form mode.
 
Loading
Salesforce Help | Article