• Hardika Doshi
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I have an Einstein Bot that Calls an Apex Action
public class Add {
         
    @InvocableMethod(label='Add initial and suggested symptoms')
    public static List<List<String>> add(List<Data> data){
        List<String> ls = data[0].initialSymptoms;
        return new List<List<String>> {ls};
    }
    
    public class Data{
        @InvocableVariable(required=true) public List<String> initialSymptoms;
        @InvocableVariable(required=true) public String selectedSuggestedSymptoms;        
    }
}

When I run this in the bot, it gives an exception message that initialSymptoms haven't been set.
I have check that the values passed are not empty.
Can someone please help me here?
I have the following Apex class -
public with sharing class Search {
    
    @InvocableMethod(label='Search Options for symptoms')
    public static List<AllData> getSearchList(List<AllData> inputData){
        return inputData;
    }
    
    public class AllData{
        @InvocableVariable public List<String> initialSymptoms;
        @InvocableVariable public List<String> suggestedSymptoms; 
        @InvocableVariable public List<SearchSymptom> searchSymptoms;
        @InvocableVariable public String phrase ;
        @InvocableVariable public String sex;
        @InvocableVariable public Integer age;        
    }
    
    public class SearchSymptom{
        public String id;
        public String label;
    }
}

When I invoke this in Einstein Bot Action I can only see the non-list variables as inputs to the action as shown below -

InputsWhereas all variables are available for ouput

Outputs
Can you please tell how can I access lists in inputs?
Hi everyone,
I would be very grateful if someone can help me.

I are trying to re use the selected value from a dynamic menu to use as an input to call other apex class.

I store values here (img 1), after I output this with success (img2).
I want to use the values as a input for call in next apex class(img3), but I get plain text "{!Matched_Order.OrderNumber}" on apex side and the Id is not passing.
Is it the correct way to pass the value or what am I missing?

Please help me finding the solution to make it work.
User-added imageUser-added imageUser-added image
Best regards,
Andre Chambel
I need to pass a list of objects to an APEX action, but are not allowed variables in the entry?
User-added image