+ Start a Discussion
Christoffer OliveiraChristoffer Oliveira 

Pass a list of <SObjects> in Einstein Bot

Hello. Im trying to pass a list of SObject an apex action in Einstein Bot. But it doesnt work. It gives an error, saying that the class is missing the required input, which, of course, its not true.
This is the error message:
"Error when invoking /support/conversations/0X90E0000004CsX/invocations/0SC0E0000004NZEWA2: [{"actionName":"APIT88_KnowledgePrint","errors":[{"statusCode":"REQUIRED_FIELD_MISSING","message":"Missing required input parameter: inputKnowledge","fields":[]}],"isSuccess":false,"outputValues":null}]"

Action in Einstein Bot

User-added image


Code in Apex

public with sharing class RecebendoAgencias {
    public class AgenciaBot {
        @InvocableVariable(required = true)
        public List<Agencia__c> agencia;
    @InvocableMethod(label = 'imprime agencias')
    public static void imprimeAgencias(List<AgenciaBot> agencias){


It's a basic code where I don't do much, but the error already happens. Can anybody help me?
REQUIRED_FIELD_MISSING - Missing required input parameter Exception in Salesforce Einstein BOT occurs when the required input parameter is not passed to the Apex Action from the BOT.