I am trying to learn about these two annotations that has been introduced as Spring 15 release. Can anyone please explain why and under what circumstances do we need to use these two annotations. An example would be great.

Thanks in advance.

  • The question Can't invoke @InvocableMethod via the REST API gives a working example of calling the resulting REST service with workbench. May 5, 2015 at 8:18
  • I saw this Daniel. Thank you. I just wanted to understand this in simple words and then dig deeper into various blogs. Do you think you can help me with that? May 5, 2015 at 8:20
  • InvocableVariable allows you to "a class variable used as an input or output parameter for an InvocableMethod method’s invocable action". May 5, 2015 at 8:20
  • @sfdcfox - Could you please explain the solution to this question based on your person experience and findings? May 30, 2015 at 16:10

1 Answer 1


As per the Spring 15 release notes. @InvocableMethod exists to make it easier for a flow to call a method on an Apex class. It has some limitations around the supported data types that can be passed to the method, but should be simpler than implementing the Process.Plugin Interface

Have a look at the example in the release notes that demonstrates getting the account ids by name. The @InvocableMethod is much shorter (11 lines to 28) and more straight forward to follow. As noted, the shorter version is also more efficient when dealing with multiple records.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .