How to Display Custom Icon for Apex Invocable Action in Flow

#1MinuteTip Introduced in Salesforce Summer ’22 release here is a nice little tip to make your flows look a bit more interesting when calling Apex Invocable actions. When you add an Apex Invocable Action to your Flow, a default icon is displayed that looks like this.

Default Icon for Apex Invocable Action in Flow

But you do have the option to change this icon to something more interesting and relevant. Like the one shown below.

Custom Icon for Apex Invocable Action in Flow

All you need to do for this is to add the ‘iconName’ as a property of the Invocable Method definition in Apex class.

@invocableMethod(label='Analyze Sentiment' description='Analyze sentiment of the text passed to the method' iconName='slds:<category>:<name>')

For example

@invocableMethod(label='Analyze Sentiment' description='Analyze sentiment of the text passed to the method' iconName='slds:standard:endorsement')
Define iconName as a property of the  Invocable Method definition in Apex class

There are quite a few predefined icons available on Salesforce Lighting Design System that you can choose from (please refer to the links below). Or you can upload your own icon in SVG format.

References & Useful URLs

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass