I need to pass boolean value (NOT asked to the customer) to apex action and need to hard code it. I have an invocable method which takes a list parameters like (psuedo code)

public class SomeClass{
 @InvocableMethod(Label='Do Something')
 public static List<Id> provideProcessedResult( List<InputParam> input) { 
   return List<Id>;

 public class InputParam{
   public String contactIds;

   @InvocableVariable(Label='Send SMS')
   public Boolean sendViaSMS;

I am not sure what I need to pass to sendSMS, should it be true/1/TRUE? I tried all these values in variation but it doesn't seem to work. I get the below error

Error when invoking /support/conversations/0X93G0000004C9c/invocations/0SC3G0000004CJkWAM: [{"actionName":"SomeClass","errors":[{"statusCode":"INVALID_INPUT","message":"Unable to convert value '1' to Apex type Boolean for Apex action SomeClass Variable sendViaSMS","fields":[]}],"isSuccess":false,"outputValues":null}]

It's not able to convert true/1/True to Apex type boolean true, anyone have a clue how I could sort this or what should be passed for it to be evaluated to true (I tried {!true} as well but that doesn't work either)?enter image description here

1 Answer 1


We are having the same issue and our workaround is just to create the variable as String and then parse it inside the apex method.

You must log in to answer this question.

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