Flag Invocable Apex Methods That Make Callouts

For invocable actions that perform callouts, you can now add a callout attribute to the invocable Apex method annotation. With this information, a flow calling the action knows how to manage the transaction at run time.

Where: This change applies to Lightning Experience and Salesforce Classic.

How: To flag callouts in Apex methods annotated with @InvocableMethod, add the callout attribute to the annotation and set it to true.

@InvocableMethod(callout=true, label=”My Action Label”)

If your action makes a callout, set the callout attribute to true. If the action is executed by a flow, at run time the flow determines how to successfully execute the action, in a new transaction or in the currently running transaction.

If the callout attribute is set to false, the action is flagged to safely perform in the transaction regardless of whether the transaction has uncommitted work.