---
schema_version: "1"
id: ed6ba075971fbce3e70bb37256447254759da228d7ac80806d8bc09961f84e1f
title: Apex Action (Legacy) Element
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_apex_plugin.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_apex_plugin.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 30dad5fa64a8fffbe073f114756e38ab4bd47f6b5a31a3ede8aba644704e3b36
description: 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.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_tip.png)

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](https://help.salesforce.com/s/articleView?id=platform.flow_build_extend_apex.htm&release=264.0.0&type=5 "Flow Builder provides many capabilities, but sometimes your flow requires functionality beyond the default elements. In that case, call an Apex class from your flow by using an Apex action.").

## 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_important.png)

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.

#### See Also

- [Add and Edit Elements](https://help.salesforce.com/s/articleView?id=platform.flow_build_elements.htm&release=264.0.0&type=5 "Use elements to define actions that the flow can run. When they’re on the canvas, connect them to create the order in which they run.")
- [Let Flows Execute Apex Actions](https://help.salesforce.com/s/articleView?id=platform.flow_build_extend_apex.htm&release=264.0.0&type=5 "Flow Builder provides many capabilities, but sometimes your flow requires functionality beyond the default elements. In that case, call an Apex class from your flow by using an Apex action.")
- [Customize What Happens When a Flow Fails](https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_fault.htm&release=264.0.0&type=5 "Learn how fault paths customize what happens when a flow fails. Choose how to notify admins, guide users, and take a follow-up action.")
- [Move and Connect Elements to Change a Flow Route](https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_route_add.htm&release=264.0.0&type=5 "Identify which elements the flow runs and in what order by connecting the elements on your canvas together. To change the run order, move elements and add or remove connectors.")
- [_Apex Reference Guide_ : Process Namespace](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_namespace_process.htm)