---
schema_version: "1"
id: a97d07986f9b9d72366c59fb6ec4bdb91a85b908d785df213b49696b54f0d938
title: Apex Action 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_invocable.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_apex_invocable.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 266990536a77c8a537e114fffc716872792eb7df06570dc965160d9b7b75a89a
description: Call an Apex class. An Apex class functions as an Apex action only if one of its methods includes the @InvocableMethod annotation.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Apex Action Element

Call an Apex class. An Apex class functions as an Apex action only if one of its methods includes the `@InvocableMethod` annotation.

### 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 the flow. Filter the list of actions by type rather than category.

If your canvas is in auto-layout, select **Apex Action**. If your canvas is in free-form layout, select **Apex**.

Select the action that you want to configure. For details about creating Apex actions, see “`InvocableMethod` Annotation” in the [Apex Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_InvocableMethod.htm).

## 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 run.

## Usage

To invoke Apex from a flow, the running user requires the corresponding Apex class assignment in their profile or permission set.

If the invoked method creates, updates, or deletes a record, that action runs when the interview's transaction completes. Transactions complete either when the interview finishes or when it runs a Screen, Local Action, or Wait element.

Flow Builder doesn’t show descriptions for input and output values. For details about each parameter, ask the Apex developer for more information.

Flow Builder shows Apex actions from managed packages only if the package owner defined the associated method as globally available.

Starting in API version 66.0, custom Apex classes used as action parameters require an accessible no-argument constructor. Flow Builder shows an error if the class lacks this constructor. If you receive this error, contact the developer who created the Apex action to update the class. For more information, see [Spring ’26 (API Version 66.0)](https://help.salesforce.com/s/articleView?id=platform.automate_flow_versioned_updates_66.htm&release=264.0.0&type=5 "These updates affect only flows that are configured to run on API version 66.0 and later.").

#### 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.")